Simplify GTK+ 2 version checks with a helper function
Use wx_is_at_least_gtk2(minor) instead of gtk_check_version(2, minor) because it is more clear and also works as expected (i.e. returns true) when using GTK+ 3 instead of creating difficult to notice bugs in the code by failing the version check in this case. See #18004.
This commit is contained in:
@@ -194,9 +194,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
|
||||
g_signal_connect_after (m_widget, "changed",
|
||||
G_CALLBACK (gtkcombobox_changed_callback), this);
|
||||
|
||||
#ifndef __WXGTK3__
|
||||
if ( !gtk_check_version(2,10,0) )
|
||||
#endif
|
||||
if ( wx_is_at_least_gtk2(10) )
|
||||
{
|
||||
g_signal_connect (m_widget, "notify::popup-shown",
|
||||
G_CALLBACK (gtkcombobox_popupshown_callback), this);
|
||||
|
Reference in New Issue
Block a user