[gnome-builder] editor: ensure transient panel is hidden by default



commit f9ef3fc29089dadb8e1714014256556fc67304b4
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jul 24 17:59:33 2017 -0700

    editor: ensure transient panel is hidden by default
    
    Until the user has requested this be visible, just keep it hidden. This
    helps avoid transient grabs at startup when the focus might enter just
    because of how the UI is being built.

 libide/editor/ide-editor-perspective.c  |    8 ++++----
 libide/editor/ide-editor-perspective.ui |    1 -
 libide/layout/ide-layout.c              |    2 +-
 3 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/libide/editor/ide-editor-perspective.c b/libide/editor/ide-editor-perspective.c
index 8f9c398..64247dc 100644
--- a/libide/editor/ide-editor-perspective.c
+++ b/libide/editor/ide-editor-perspective.c
@@ -206,7 +206,7 @@ ide_editor_perspective_create_edge (DzlDockBin      *dock_bin,
     return g_object_new (IDE_TYPE_LAYOUT_TRANSIENT_SIDEBAR,
                          "edge", edge,
                          "reveal-child", FALSE,
-                         "visible", TRUE,
+                         "visible", FALSE,
                          NULL);
 
   return DZL_DOCK_BIN_CLASS (ide_editor_perspective_parent_class)->create_edge (dock_bin, edge);
@@ -254,9 +254,6 @@ ide_editor_perspective_init (IdeEditorPerspective *self)
 
   gtk_widget_init_template (GTK_WIDGET (self));
 
-  sidebar = ide_editor_perspective_get_sidebar (self);
-  _ide_editor_sidebar_set_open_pages (sidebar, G_LIST_MODEL (self->grid));
-
   _ide_editor_perspective_init_actions (self);
   _ide_editor_perspective_init_shortcuts (self);
 
@@ -264,6 +261,9 @@ ide_editor_perspective_init (IdeEditorPerspective *self)
                             "notify::current-view",
                             G_CALLBACK (ide_editor_perspective_notify_current_view),
                             self);
+
+  sidebar = ide_editor_perspective_get_sidebar (self);
+  _ide_editor_sidebar_set_open_pages (sidebar, G_LIST_MODEL (self->grid));
 }
 
 /**
diff --git a/libide/editor/ide-editor-perspective.ui b/libide/editor/ide-editor-perspective.ui
index f58d811..8cc9f56 100644
--- a/libide/editor/ide-editor-perspective.ui
+++ b/libide/editor/ide-editor-perspective.ui
@@ -3,7 +3,6 @@
   <template class="IdeEditorPerspective" parent="IdeLayout">
     <child internal-child="right">
       <object class="IdeLayoutTransientSidebar">
-        <property name="reveal-child">false</property>
         <child>
           <object class="IdeEditorProperties" id="properties">
             <property name="sensitive">false</property>
diff --git a/libide/layout/ide-layout.c b/libide/layout/ide-layout.c
index 68e49e8..d27f094 100644
--- a/libide/layout/ide-layout.c
+++ b/libide/layout/ide-layout.c
@@ -32,7 +32,7 @@ ide_layout_create_edge (DzlDockBin      *dock,
 
   return g_object_new (IDE_TYPE_LAYOUT_PANE,
                        "edge", edge,
-                       "visible", TRUE,
+                       "visible", FALSE,
                        "reveal-child", FALSE,
                        NULL);
 }


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