[gnome-builder] editor: ensure actions are created before accessing



commit 4f8325ac16e9dedba76025285551b2ff38047bca
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jul 10 14:36:55 2017 -0700

    editor: ensure actions are created before accessing
    
    The actions are not created until the panels have been added
    to the dockbin. So we need to ensure those panels are created
    upfront.
    
    Signed-off-by: Christian Hergert <chergert redhat com>

 libide/editor/ide-editor-perspective.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libide/editor/ide-editor-perspective.c b/libide/editor/ide-editor-perspective.c
index 650da92..65390e9 100644
--- a/libide/editor/ide-editor-perspective.c
+++ b/libide/editor/ide-editor-perspective.c
@@ -519,6 +519,11 @@ ide_editor_perspective_init (IdeEditorPerspective *self)
   g_action_map_add_action_entries (G_ACTION_MAP (self->actions), entries,
                                    G_N_ELEMENTS (entries), self);
 
+  /* Ensure panels are created up front */
+  (void)ide_editor_perspective_get_left_edge (self);
+  (void)ide_editor_perspective_get_bottom_edge (self);
+  (void)ide_editor_perspective_get_right_edge (self);
+
   actions = gtk_widget_get_action_group (GTK_WIDGET (self->layout), "dockbin");
 
   for (i = 0; proxy_actions[i]; i++)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]