Don't fail compilation with GTK+ 2.2 in 2.8 branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@53829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -200,15 +200,19 @@ wxRendererGTK::GetComboBoxWidget()
|
|||||||
static GtkWidget *s_button = NULL;
|
static GtkWidget *s_button = NULL;
|
||||||
static GtkWidget *s_window = NULL;
|
static GtkWidget *s_window = NULL;
|
||||||
|
|
||||||
if ( !s_button )
|
#ifdef __WXGTK24__
|
||||||
|
if (!gtk_check_version(2,4,0))
|
||||||
{
|
{
|
||||||
s_window = gtk_window_new( GTK_WINDOW_POPUP );
|
if ( !s_button )
|
||||||
gtk_widget_realize( s_window );
|
{
|
||||||
s_button = gtk_combo_box_new();
|
s_window = gtk_window_new( GTK_WINDOW_POPUP );
|
||||||
gtk_container_add( GTK_CONTAINER(s_window), s_button );
|
gtk_widget_realize( s_window );
|
||||||
gtk_widget_realize( s_button );
|
s_button = gtk_combo_box_new();
|
||||||
|
gtk_container_add( GTK_CONTAINER(s_window), s_button );
|
||||||
|
gtk_widget_realize( s_button );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return s_button;
|
return s_button;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -683,6 +687,9 @@ void wxRenderer_DrawTextCtrl(wxWindow* win, wxDC& dc, const wxRect& rect, int fl
|
|||||||
// Draw the equivallent of a wxComboBox
|
// Draw the equivallent of a wxComboBox
|
||||||
void wxRenderer_DrawComboBox(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
|
void wxRenderer_DrawComboBox(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
|
||||||
{
|
{
|
||||||
|
if (gtk_check_version(2,4,0))
|
||||||
|
return;
|
||||||
|
|
||||||
GtkWidget *combo = wxRendererGTK::GetComboBoxWidget();
|
GtkWidget *combo = wxRendererGTK::GetComboBoxWidget();
|
||||||
|
|
||||||
GdkWindow* gdk_window = wxGetGdkWindowForDC(win, dc);
|
GdkWindow* gdk_window = wxGetGdkWindowForDC(win, dc);
|
||||||
|
Reference in New Issue
Block a user