diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-08-27 17:07:53 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-08-27 17:07:53 (GMT) |
commit | c766cdb2d0b36d065a6f2a56aa1541146592374d (patch) | |
tree | 24f273ba2d91a21fd592679f5f099544da14f0a8 /src/gui | |
parent | 5f950cb71ac47c6c41df1565c0732a34d930a73f (diff) |
Disconnected glance signals on view change.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/panels/glance.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gui/panels/glance.c b/src/gui/panels/glance.c index 638adc7..ea16489 100644 --- a/src/gui/panels/glance.c +++ b/src/gui/panels/glance.c @@ -295,16 +295,28 @@ GPanelItem *g_glance_panel_new(void) static void change_glance_panel_current_view(GGlancePanel *panel, GLoadedPanel *old, GLoadedPanel *new) { - GtkWidget *parent; /* Support défilant de la vue */ GtkAdjustment *adj; /* Gestionnaire du défilement */ + GtkWidget *parent; /* Support défilant de la vue */ if (panel->view != NULL) { g_object_unref(G_OBJECT(panel->view)); panel->view = NULL; - g_object_unref(G_OBJECT(panel->support)); - panel->support = NULL; + if (panel->support != NULL) + { + adj = gtk_scrolled_window_get_hadjustment(panel->support); + g_signal_handlers_disconnect_by_func(adj, G_CALLBACK(on_view_scroll_setup), panel); + g_signal_handlers_disconnect_by_func(adj, G_CALLBACK(on_view_scrolled), panel); + + adj = gtk_scrolled_window_get_vadjustment(panel->support); + g_signal_handlers_disconnect_by_func(adj, G_CALLBACK(on_view_scroll_setup), panel); + g_signal_handlers_disconnect_by_func(adj, G_CALLBACK(on_view_scrolled), panel); + + g_object_unref(G_OBJECT(panel->support)); + panel->support = NULL; + + } if (panel->cache != NULL) { |