font selector dialog doesn't work with GTK+ 1.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -52,6 +52,7 @@ bool gtk_fontdialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUN
|
|||||||
// "clicked" for OK-button
|
// "clicked" for OK-button
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef __WXGTK12__
|
||||||
static
|
static
|
||||||
void gtk_fontdialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFontDialog *dialog )
|
void gtk_fontdialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFontDialog *dialog )
|
||||||
{
|
{
|
||||||
@@ -76,6 +77,7 @@ void gtk_fontdialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFontDialog *dial
|
|||||||
event.SetEventObject( dialog );
|
event.SetEventObject( dialog );
|
||||||
dialog->GetEventHandler()->ProcessEvent( event );
|
dialog->GetEventHandler()->ProcessEvent( event );
|
||||||
}
|
}
|
||||||
|
#endif // GTK+ 1.2 andlater only
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// "clicked" for Cancel-button
|
// "clicked" for Cancel-button
|
||||||
@@ -109,7 +111,9 @@ wxFontDialog::wxFontDialog( wxWindow *parent, wxFontData *data )
|
|||||||
wxFAIL_MSG( _T("wxXX creation failed") );
|
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#ifndef __WXGTK12__
|
||||||
|
wxFAIL_MSG( _T("TODO") );
|
||||||
|
#else // GTK+ 1.2
|
||||||
wxString m_message( _("Choose font") );
|
wxString m_message( _("Choose font") );
|
||||||
m_widget = gtk_font_selection_dialog_new( m_message.mbc_str() );
|
m_widget = gtk_font_selection_dialog_new( m_message.mbc_str() );
|
||||||
|
|
||||||
@@ -133,6 +137,7 @@ wxFontDialog::wxFontDialog( wxWindow *parent, wxFontData *data )
|
|||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
|
gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
|
||||||
GTK_SIGNAL_FUNC(gtk_fontdialog_delete_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_fontdialog_delete_callback), (gpointer)this );
|
||||||
|
#endif // GTK+ version
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFontDialog::~wxFontDialog()
|
wxFontDialog::~wxFontDialog()
|
||||||
|
@@ -52,6 +52,7 @@ bool gtk_fontdialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUN
|
|||||||
// "clicked" for OK-button
|
// "clicked" for OK-button
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef __WXGTK12__
|
||||||
static
|
static
|
||||||
void gtk_fontdialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFontDialog *dialog )
|
void gtk_fontdialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFontDialog *dialog )
|
||||||
{
|
{
|
||||||
@@ -76,6 +77,7 @@ void gtk_fontdialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFontDialog *dial
|
|||||||
event.SetEventObject( dialog );
|
event.SetEventObject( dialog );
|
||||||
dialog->GetEventHandler()->ProcessEvent( event );
|
dialog->GetEventHandler()->ProcessEvent( event );
|
||||||
}
|
}
|
||||||
|
#endif // GTK+ 1.2 andlater only
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// "clicked" for Cancel-button
|
// "clicked" for Cancel-button
|
||||||
@@ -109,7 +111,9 @@ wxFontDialog::wxFontDialog( wxWindow *parent, wxFontData *data )
|
|||||||
wxFAIL_MSG( _T("wxXX creation failed") );
|
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#ifndef __WXGTK12__
|
||||||
|
wxFAIL_MSG( _T("TODO") );
|
||||||
|
#else // GTK+ 1.2
|
||||||
wxString m_message( _("Choose font") );
|
wxString m_message( _("Choose font") );
|
||||||
m_widget = gtk_font_selection_dialog_new( m_message.mbc_str() );
|
m_widget = gtk_font_selection_dialog_new( m_message.mbc_str() );
|
||||||
|
|
||||||
@@ -133,6 +137,7 @@ wxFontDialog::wxFontDialog( wxWindow *parent, wxFontData *data )
|
|||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
|
gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
|
||||||
GTK_SIGNAL_FUNC(gtk_fontdialog_delete_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_fontdialog_delete_callback), (gpointer)this );
|
||||||
|
#endif // GTK+ version
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFontDialog::~wxFontDialog()
|
wxFontDialog::~wxFontDialog()
|
||||||
|
Reference in New Issue
Block a user