[gnome-builder] editor-view: update addins for stack when created
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editor-view: update addins for stack when created
- Date: Mon, 4 Sep 2017 06:53:40 +0000 (UTC)
commit b61ab93c559fd290f7137e97891f5734881dde0d
Author: Christian Hergert <chergert redhat com>
Date: Sun Sep 3 23:53:24 2017 -0700
editor-view: update addins for stack when created
libide/editor/ide-editor-view.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/libide/editor/ide-editor-view.c b/libide/editor/ide-editor-view.c
index bb1c9b5..0512cfa 100644
--- a/libide/editor/ide-editor-view.c
+++ b/libide/editor/ide-editor-view.c
@@ -407,6 +407,18 @@ ide_editor_view_addin_added (IdeExtensionSetAdapter *set,
g_assert (IDE_IS_EDITOR_VIEW (self));
ide_editor_view_addin_load (addin, self);
+
+ /*
+ * Notify of the current stack, but refetch the stack pointer just
+ * to be sure we aren't re-using an old pointer in case we're racing
+ * with a finalizer.
+ */
+ if (self->last_stack_ptr != NULL)
+ {
+ GtkWidget *stack = gtk_widget_get_ancestor (GTK_WIDGET (self), IDE_TYPE_LAYOUT_STACK);
+ if (stack != NULL)
+ ide_editor_view_addin_stack_set (addin, IDE_LAYOUT_STACK (stack));
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]