-
- gtk_signal_connect( GTK_OBJECT(sel->ok_button), "clicked",
- GTK_SIGNAL_FUNC(gtk_fontdialog_ok_callback), (gpointer*)this );
-
- // strange way to internationalize
- gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->ok_button)->child ), wxConvCurrent->cWX2MB(_("OK")) );
-
- gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked",
- GTK_SIGNAL_FUNC(gtk_fontdialog_cancel_callback), (gpointer*)this );
-
- // strange way to internationalize
- gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->cancel_button)->child ), wxConvCurrent->cWX2MB(_("Cancel")) );
-
- gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
- GTK_SIGNAL_FUNC(gtk_fontdialog_delete_callback), (gpointer)this );
+
+ g_signal_connect (sel->ok_button, "clicked",
+ G_CALLBACK (gtk_fontdialog_ok_callback), this);
+
+ g_signal_connect (sel->cancel_button, "clicked",
+ G_CALLBACK (gtk_fontdialog_cancel_callback), this);
+
+ g_signal_connect (m_widget, "delete_event",
+ G_CALLBACK (gtk_fontdialog_delete_callback), this);
+
+ wxFont font = m_fontData.GetInitialFont();
+ if( font.Ok() )
+ {
+ const wxNativeFontInfo *info = font.GetNativeFontInfo();
+
+ if ( info )
+ {
+
+ const wxString& fontname = info->ToString();
+ gtk_font_selection_dialog_set_font_name(sel, wxGTK_CONV(fontname));
+ }
+ else
+ {
+ // this is not supposed to happen!
+ wxFAIL_MSG(_T("font is ok but no native font info?"));
+ }
+ }
+
+ return true;