[gnome-builder] source-view: stop inflight animations during dispose
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] source-view: stop inflight animations during dispose
- Date: Mon, 11 May 2015 23:56:59 +0000 (UTC)
commit 2ea3db9496ac81f734dd29a7a97888aa7df7460c
Author: Christian Hergert <christian hergert me>
Date: Mon May 11 16:56:54 2015 -0700
source-view: stop inflight animations during dispose
We need to make sure we fire our destroy notify immediately before we
complete dispose, so do this early and forcefully stop the animation.
libide/ide-source-view.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index 39f9dd5..7ae5a90 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -4822,6 +4822,18 @@ ide_source_view_dispose (GObject *object)
IdeSourceView *self = (IdeSourceView *)object;
IdeSourceViewPrivate *priv = ide_source_view_get_instance_private (self);
+ if (priv->hadj_animation)
+ {
+ ide_animation_stop (priv->hadj_animation);
+ ide_clear_weak_pointer (&priv->hadj_animation);
+ }
+
+ if (priv->vadj_animation)
+ {
+ ide_animation_stop (priv->vadj_animation);
+ ide_clear_weak_pointer (&priv->vadj_animation);
+ }
+
ide_source_view_clear_snippets (self);
if (priv->delayed_scroll_replay)
@@ -4840,9 +4852,6 @@ ide_source_view_dispose (GObject *object)
g_clear_object (&priv->buffer_signals);
g_clear_object (&priv->file_setting_bindings);
- ide_clear_weak_pointer (&priv->hadj_animation);
- ide_clear_weak_pointer (&priv->vadj_animation);
-
G_OBJECT_CLASS (ide_source_view_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]