wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
event.SetEventObject( dialog );
- dialog->GetEventHandler()->ProcessEvent( event );
+ dialog->HandleWindowEvent( event );
}
}
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
event.SetEventObject( dialog );
- dialog->GetEventHandler()->ProcessEvent( event );
+ dialog->HandleWindowEvent( event );
}
}
bool wxFontDialog::DoCreate(wxWindow *parent)
{
- parent = GetParentForModalDialog(parent);
+ parent = GetParentForModalDialog(parent, 0);
if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE,
wxString m_message( _("Choose font") );
m_widget = gtk_font_selection_dialog_new( wxGTK_CONV( m_message ) );
+ g_object_ref(m_widget);
if (parent)
gtk_window_set_transient_for(GTK_WINDOW(m_widget),
else
{
// this is not supposed to happen!
- wxFAIL_MSG(_T("font is ok but no native font info?"));
+ wxFAIL_MSG(wxT("font is ok but no native font info?"));
}
}
void wxFontDialog::SetChosenFont(const char *fontname)
{
- m_fontData.SetChosenFont(wxFont( wxString::FromAscii(fontname) ));
+ m_fontData.SetChosenFont(wxFont( wxString::FromUTF8(fontname) ));
}
#endif // wxUSE_FONTDLG && !__WXGPE__