[gtk/wip/baedert/for-master: 15/15] Fixup! Merge into scrolledwindow destroy commit
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 15/15] Fixup! Merge into scrolledwindow destroy commit
- Date: Sun, 6 Oct 2019 08:44:12 +0000 (UTC)
commit 04e0e2c3a485bf2b03a6137f452e7bd19cb52c45
Author: Timm Bäder <mail baedert org>
Date: Sun Oct 6 09:44:52 2019 +0200
Fixup! Merge into scrolledwindow destroy commit
gtk/gtkscrolledwindow.c | 28 ++++++++++++++--------------
gtk/gtktreeview.c | 5 +++--
2 files changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 12c287734a..710f01d950 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -2586,6 +2586,20 @@ gtk_scrolled_window_dispose (GObject *object)
remove_indicator (scrolled_window, &priv->hindicator);
remove_indicator (scrolled_window, &priv->vindicator);
+ if (priv->deceleration_id)
+ {
+ gtk_widget_remove_tick_callback (GTK_WIDGET (object), priv->deceleration_id);
+ priv->deceleration_id = 0;
+ }
+
+ if (priv->scroll_events_overshoot_id)
+ {
+ g_source_remove (priv->scroll_events_overshoot_id);
+ priv->scroll_events_overshoot_id = 0;
+ }
+
+ G_OBJECT_CLASS (gtk_scrolled_window_parent_class)->dispose (object);
+
if (priv->hscrollbar)
{
GtkAdjustment *hadjustment = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (priv->hscrollbar));
@@ -2607,20 +2621,6 @@ gtk_scrolled_window_dispose (GObject *object)
gtk_widget_unparent (priv->vscrollbar);
priv->vscrollbar = NULL;
}
-
- if (priv->deceleration_id)
- {
- gtk_widget_remove_tick_callback (GTK_WIDGET (object), priv->deceleration_id);
- priv->deceleration_id = 0;
- }
-
- if (priv->scroll_events_overshoot_id)
- {
- g_source_remove (priv->scroll_events_overshoot_id);
- priv->scroll_events_overshoot_id = 0;
- }
-
- G_OBJECT_CLASS (gtk_scrolled_window_parent_class)->dispose (object);
}
static void
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 020f2c3d82..a4d826246d 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2220,14 +2220,15 @@ gtk_tree_view_dispose (GObject *object)
gtk_tree_view_set_model (tree_view, NULL);
- g_clear_object (&priv->hadjustment);
- g_clear_object (&priv->vadjustment);
g_clear_object (&priv->horizontal_grid_line_texture);
g_clear_object (&priv->vertical_grid_line_texture);
g_clear_object (&priv->horizontal_tree_line_texture);
g_clear_object (&priv->vertical_tree_line_texture);
G_OBJECT_CLASS (gtk_tree_view_parent_class)->dispose (object);
+
+ g_clear_object (&priv->hadjustment);
+ g_clear_object (&priv->vadjustment);
}
/* GtkWidget::map helper */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]