Fix wxGTK build with glib < 2.32 and streamline the code a bit
Define g_signal_handlers_disconnect_by_data() if it's not available,
i.e. when using glib older than 2.32 where it was added, to fix the
build under old systems such as CentOS 6 broken by the changes of
8278f7b618
(see #18084).
Also use it elsewhere instead of g_signal_handlers_disconnect_matched()
as it's more readable.
Closes https://github.com/wxWidgets/wxWidgets/pull/760
This commit is contained in:
@@ -425,6 +425,14 @@ static inline void wx_gdk_cairo_set_source_window(cairo_t* cr, GdkWindow* window
|
||||
#define gdk_cairo_set_source_window wx_gdk_cairo_set_source_window
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// the following were introduced in Glib 2.32
|
||||
|
||||
#ifndef g_signal_handlers_disconnect_by_data
|
||||
#define g_signal_handlers_disconnect_by_data(instance, data) \
|
||||
g_signal_handlers_disconnect_matched ((instance), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, (data))
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// the following were introduced in GTK+ 3.0
|
||||
|
||||
|
Reference in New Issue
Block a user