X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3fc69ebc38c90da3b94791bb4f57a2f7dd1ecdcd..6f026b5b63fe7ccb025e84509886f74772b9df13:/src/generic/fontpickerg.cpp diff --git a/src/generic/fontpickerg.cpp b/src/generic/fontpickerg.cpp index 971f1cbdbb..62599b7892 100644 --- a/src/generic/fontpickerg.cpp +++ b/src/generic/fontpickerg.cpp @@ -4,7 +4,6 @@ // Author: Francesco Montorsi // Modified by: // Created: 15/04/2006 -// RCS-ID: $Id$ // Copyright: (c) Francesco Montorsi // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -47,8 +46,8 @@ bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString &name) { wxString label = (style & wxFNTP_FONTDESC_AS_LABEL) ? - wxEmptyString : // label will be updated by UpdateFont - wxT("Choose font"); + wxString() : // label will be updated by UpdateFont + _("Choose font"); // create this button if (!wxButton::Create( parent, id, label, pos, @@ -59,7 +58,7 @@ bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id, } // and handle user clicks on it - Connect(wxEVT_COMMAND_BUTTON_CLICKED, + Connect(GetId(), wxEVT_BUTTON, wxCommandEventHandler(wxGenericFontButton::OnButtonClick), NULL, this); @@ -79,7 +78,7 @@ void wxGenericFontButton::InitFontData() void wxGenericFontButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev)) { - // update the wxFontData to be shown in the the dialog + // update the wxFontData to be shown in the dialog m_data.SetInitialFont(m_selectedFont); // create the font dialog and display it @@ -97,7 +96,7 @@ void wxGenericFontButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev)) void wxGenericFontButton::UpdateFont() { - if ( !m_selectedFont.Ok() ) + if ( !m_selectedFont.IsOk() ) return; SetForegroundColour(m_data.GetColour());