-/*
- printf( "OnDelete from " );
- if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
- printf( win->GetClassInfo()->GetClassName() );
- printf( ".\n" );
-*/
-
- win->Close();
-
- return true;
-}
-}
-
-//-----------------------------------------------------------------------------
-// "clicked" for OK-button
-//-----------------------------------------------------------------------------
-
-extern "C" {
-static
-void gtk_fontdialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFontDialog *dialog )
-{
- GtkFontSelectionDialog *fontdlg = GTK_FONT_SELECTION_DIALOG(dialog->m_widget);
-
- wxGtkString fontname(gtk_font_selection_dialog_get_font_name(fontdlg));
- dialog->SetChosenFont( fontname);
-
- wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
- event.SetEventObject( dialog );
- dialog->GetEventHandler()->ProcessEvent( event );
-}
-}
-
-//-----------------------------------------------------------------------------
-// "clicked" for Cancel-button
-//-----------------------------------------------------------------------------
+ int rc = wxID_CANCEL;
+ if (response_id == GTK_RESPONSE_OK)
+ {
+ rc = wxID_OK;
+#if GTK_CHECK_VERSION(3,2,0)
+ if (gtk_check_version(3,2,0) == NULL)
+ {
+ wxNativeFontInfo info;
+ info.description = gtk_font_chooser_get_font_desc(GTK_FONT_CHOOSER(dialog));
+ win->GetFontData().SetChosenFont(wxFont(info));
+ }
+ else
+#endif
+ {
+ GtkFontSelectionDialog* sel = GTK_FONT_SELECTION_DIALOG(dialog);
+ wxGtkString name(gtk_font_selection_dialog_get_font_name(sel));
+ win->GetFontData().SetChosenFont(wxFont(wxString::FromUTF8(name)));
+ }
+ }