diff options
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) { |