diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/fullscreen/eom-fullscreen-plugin.c | 12 | ||||
-rw-r--r-- | plugins/statusbar-date/eom-statusbar-date-plugin.c | 9 |
2 files changed, 17 insertions, 4 deletions
diff --git a/plugins/fullscreen/eom-fullscreen-plugin.c b/plugins/fullscreen/eom-fullscreen-plugin.c index 653a725..b2565a1 100644 --- a/plugins/fullscreen/eom-fullscreen-plugin.c +++ b/plugins/fullscreen/eom-fullscreen-plugin.c @@ -119,8 +119,7 @@ eom_fullscreen_plugin_activate (EomWindowActivatable *activatable) eom_debug (DEBUG_PLUGINS); - plugin->signal_id = g_signal_connect (G_OBJECT (view), - "button-press-event", + plugin->signal_id = g_signal_connect (view, "button-press-event", G_CALLBACK (on_button_press), plugin->window); } @@ -131,7 +130,14 @@ eom_fullscreen_plugin_deactivate (EomWindowActivatable *activatable) EomFullscreenPlugin *plugin = EOM_FULLSCREEN_PLUGIN (activatable); GtkWidget *view = eom_window_get_view (plugin->window); - g_signal_handler_disconnect (view, plugin->signal_id); +#if GLIB_CHECK_VERSION(2,62,0) + g_clear_signal_handler (&plugin->signal_id, view); +#else + if (plugin->signal_id != 0) { + g_signal_handler_disconnect (view, plugin->signal_id); + plugin->signal_id = 0; + } +#endif } static void diff --git a/plugins/statusbar-date/eom-statusbar-date-plugin.c b/plugins/statusbar-date/eom-statusbar-date-plugin.c index 81b65f2..322277d 100644 --- a/plugins/statusbar-date/eom-statusbar-date-plugin.c +++ b/plugins/statusbar-date/eom-statusbar-date-plugin.c @@ -195,7 +195,14 @@ eom_statusbar_date_plugin_deactivate (EomWindowActivatable *activatable) GtkWidget *statusbar = eom_window_get_statusbar (window); GtkWidget *view = eom_window_get_thumb_view (window); - g_signal_handler_disconnect (view, plugin->signal_id); +#if GLIB_CHECK_VERSION(2,62,0) + g_clear_signal_handler (&plugin->signal_id, view); +#else + if (plugin->signal_id != 0) { + g_signal_handler_disconnect (view, plugin->signal_id); + plugin->signal_id = 0; + } +#endif gtk_container_remove (GTK_CONTAINER (statusbar), plugin->statusbar_date); } |