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:
Robert Roebling
2008-05-29 23:47:20 +00:00
parent a1e9e50736
commit dee6abf6d4

View File

@@ -200,15 +200,19 @@ wxRendererGTK::GetComboBoxWidget()
static GtkWidget *s_button = 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 );
gtk_widget_realize( s_window );
s_button = gtk_combo_box_new();
gtk_container_add( GTK_CONTAINER(s_window), s_button );
gtk_widget_realize( s_button );
if ( !s_button )
{
s_window = gtk_window_new( GTK_WINDOW_POPUP );
gtk_widget_realize( s_window );
s_button = gtk_combo_box_new();
gtk_container_add( GTK_CONTAINER(s_window), s_button );
gtk_widget_realize( s_button );
}
}
#endif
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
void wxRenderer_DrawComboBox(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
{
if (gtk_check_version(2,4,0))
return;
GtkWidget *combo = wxRendererGTK::GetComboBoxWidget();
GdkWindow* gdk_window = wxGetGdkWindowForDC(win, dc);