gchar *fontname = gtk_font_selection_dialog_get_font_name(fontdlg);
- dialog->m_fontData.SetChosenFont(wxFont(fontname));
+ dialog->SetChosenFont(fontname);
g_free( fontname );
// wxFontDialog
//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxFontDialog,wxDialog)
+IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog)
-wxFontDialog::wxFontDialog( wxWindow *parent, wxFontData *fontdata )
- : m_fontData(*fontdata)
+bool wxFontDialog::DoCreate(wxWindow *parent)
{
m_needParent = FALSE;
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE,
wxDefaultValidator, wxT("fontdialog") ))
{
- wxFAIL_MSG( wxT("wxXX creation failed") );
- return;
+ wxFAIL_MSG( wxT("wxFontDialog creation failed") );
+ return FALSE;
}
-
+
wxString m_message( _("Choose font") );
m_widget = gtk_font_selection_dialog_new( m_message.mbc_str() );
wxFAIL_MSG(_T("font is ok but no native font info?"));
}
}
+
+ return TRUE;
}
wxFontDialog::~wxFontDialog()
{
}
+void wxFontDialog::SetChosenFont(const char *fontname)
+{
+ m_fontData.SetChosenFont(wxFont(fontname));
+}
+
#endif // wxUSE_FONTDLG