Oops. Sorry about that Markus.
On 7/30/07 6:23 AM, "Markus Meyer" <[EMAIL PROTECTED]> wrote:
> Update of /cvsroot/audacity/audacity-src/src
> In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv10893
>
> Modified Files:
> TrackPanel.cpp
> Log Message:
> Fix compilation on wx2.8
>
> Index: TrackPanel.cpp
> ===================================================================
> RCS file: /cvsroot/audacity/audacity-src/src/TrackPanel.cpp,v
> retrieving revision 1.367
> retrieving revision 1.368
> diff -u -d -r1.367 -r1.368
> --- TrackPanel.cpp 30 Jul 2007 01:28:52 -0000 1.367
> +++ TrackPanel.cpp 30 Jul 2007 11:23:25 -0000 1.368
> @@ -5989,12 +5989,30 @@
> RefreshTrack(lt, true);
> }
>
> -void TrackPanel::OnSetFont(wxCommandEvent &event)
> +// Small helper class to enumerate all fonts in the system
> +// We use this because the default implementation of
> +// wxFontEnumerator::GetFacenames() has changed between wx2.6 and 2.8
> +class TrackPanelFontEnumerator : public wxFontEnumerator
> {
> - wxFontEnumerator fontEnumerator;
> +public:
> + TrackPanelFontEnumerator(wxArrayString* fontNames) :
> + mFontNames(fontNames) {}
> +
> + virtual bool OnFacename(const wxString& font)
> + {
> + mFontNames->Add(font);
> + return true;
> + }
>
> +private:
> + wxArrayString* mFontNames;
> +};
> +
> +void TrackPanel::OnSetFont(wxCommandEvent &event)
> +{
> + wxArrayString facenames;
> + TrackPanelFontEnumerator fontEnumerator(&facenames);
> fontEnumerator.EnumerateFacenames(wxFONTENCODING_SYSTEM, false);
> - wxArrayString *facenames = fontEnumerator.GetFacenames();
>
> wxString facename = gPrefs->Read(wxT("/GUI/LabelFontFacename"), wxT(""));
> long fontsize = gPrefs->Read(wxT("/GUI/LabelFontSize"), 12);
> @@ -6015,9 +6033,9 @@
> lb = new wxListBox(&dlg, wxID_ANY,
> wxDefaultPosition,
> wxDefaultSize,
> - *facenames,
> + facenames,
> wxLB_SINGLE);
> - lb->SetSelection(facenames->Index(facename));
> + lb->SetSelection(facenames.Index(facename));
> S.AddWindow(lb, wxALIGN_LEFT | wxEXPAND | wxALL);
>
> S.AddPrompt(_("Face size"));
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Audacity-cvs mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/audacity-cvs
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs