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:
@@ -81,12 +81,8 @@ namespace
|
||||
|
||||
inline bool UseNative()
|
||||
{
|
||||
#ifdef __WXGTK3__
|
||||
return true;
|
||||
#else
|
||||
// native GtkInfoBar widget is only available in GTK+ 2.18 and later
|
||||
return gtk_check_version(2, 18, 0) == 0;
|
||||
#endif
|
||||
return wx_is_at_least_gtk2(18);
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
Reference in New Issue
Block a user