mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-12 20:00:09 +00:00
ScrolledWindow: Dodge possible surplus disconnects
In case the outgoing Adjustment for whatever reason has other handlers referring to this SW, be sure to avoid disconnecting any but our own.
This commit is contained in:
parent
9a6adcbce4
commit
021e0d5e3d
@ -2019,7 +2019,12 @@ gtk_scrolled_window_set_hadjustment (GtkScrolledWindow *scrolled_window,
|
||||
if (old_adjustment == hadjustment)
|
||||
return;
|
||||
|
||||
g_signal_handlers_disconnect_by_data (old_adjustment, scrolled_window);
|
||||
g_signal_handlers_disconnect_by_func (old_adjustment,
|
||||
gtk_scrolled_window_adjustment_changed,
|
||||
scrolled_window);
|
||||
g_signal_handlers_disconnect_by_func (old_adjustment,
|
||||
gtk_scrolled_window_adjustment_value_changed,
|
||||
scrolled_window);
|
||||
|
||||
gtk_adjustment_enable_animation (old_adjustment, NULL, 0);
|
||||
gtk_scrollbar_set_adjustment (GTK_SCROLLBAR (priv->hscrollbar), hadjustment);
|
||||
@ -2089,7 +2094,12 @@ gtk_scrolled_window_set_vadjustment (GtkScrolledWindow *scrolled_window,
|
||||
if (old_adjustment == vadjustment)
|
||||
return;
|
||||
|
||||
g_signal_handlers_disconnect_by_data (old_adjustment, scrolled_window);
|
||||
g_signal_handlers_disconnect_by_func (old_adjustment,
|
||||
gtk_scrolled_window_adjustment_changed,
|
||||
scrolled_window);
|
||||
g_signal_handlers_disconnect_by_func (old_adjustment,
|
||||
gtk_scrolled_window_adjustment_value_changed,
|
||||
scrolled_window);
|
||||
|
||||
gtk_adjustment_enable_animation (old_adjustment, NULL, 0);
|
||||
gtk_scrollbar_set_adjustment (GTK_SCROLLBAR (priv->vscrollbar), vadjustment);
|
||||
|
Loading…
Reference in New Issue
Block a user