[gnome-builder] workbench: move headerbar into a stack



commit bd1ca56c1ad6c738bf0bdfe0499ed663a46ead50
Author: Christian Hergert <christian hergert me>
Date:   Fri Jun 24 20:17:05 2016 -0700

    workbench: move headerbar into a stack
    
    We will still have some perspectives that require their own headerbar, so
    we need to maintain a stack for that.

 libide/workbench/ide-workbench-private.h |    1 +
 libide/workbench/ide-workbench.c         |    1 +
 libide/workbench/ide-workbench.ui        |   25 +++++++++++++++----------
 3 files changed, 17 insertions(+), 10 deletions(-)
---
diff --git a/libide/workbench/ide-workbench-private.h b/libide/workbench/ide-workbench-private.h
index 4b613bf..e18d962 100644
--- a/libide/workbench/ide-workbench-private.h
+++ b/libide/workbench/ide-workbench-private.h
@@ -43,6 +43,7 @@ struct _IdeWorkbench
    */
   GListStore                *perspectives;
 
+  GtkStack                  *header_stack;
   IdeWorkbenchHeaderBar     *header_bar;
   IdePerspectiveMenuButton  *perspective_menu_button;
   GtkStack                  *perspectives_stack;
diff --git a/libide/workbench/ide-workbench.c b/libide/workbench/ide-workbench.c
index e60eee9..1b22668 100644
--- a/libide/workbench/ide-workbench.c
+++ b/libide/workbench/ide-workbench.c
@@ -367,6 +367,7 @@ ide_workbench_class_init (IdeWorkbenchClass *klass)
   gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-workbench.ui");
   gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, header_bar);
   gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, header_size_group);
+  gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, header_stack);
   gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, perspective_menu_button);
   gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, perspectives_stack);
 }
diff --git a/libide/workbench/ide-workbench.ui b/libide/workbench/ide-workbench.ui
index 2596b96..3faa15d 100644
--- a/libide/workbench/ide-workbench.ui
+++ b/libide/workbench/ide-workbench.ui
@@ -3,18 +3,23 @@
   <!-- interface-requires gtk+ 3.21 -->
   <template class="IdeWorkbench" parent="GtkApplicationWindow">
     <child type="titlebar">
-      <object class="IdeWorkbenchHeaderBar" id="header_bar">
+      <object class="GtkStack" id="header_stack">
         <property name="visible">true</property>
-        <child internal-child="left">
-          <object class="EggPriorityBox">
-            <child>
-              <object class="IdePerspectiveMenuButton" id="perspective_menu_button">
-                <property name="stack">perspectives_stack</property>
-                <property name="visible">false</property>
+        <child>
+          <object class="IdeWorkbenchHeaderBar" id="header_bar">
+            <property name="visible">true</property>
+            <child internal-child="left">
+              <object class="EggPriorityBox">
+                <child>
+                  <object class="IdePerspectiveMenuButton" id="perspective_menu_button">
+                    <property name="stack">perspectives_stack</property>
+                    <property name="visible">false</property>
+                  </object>
+                  <packing>
+                    <property name="priority">-100000</property>
+                  </packing>
+                </child>
               </object>
-              <packing>
-                <property name="priority">-100000</property>
-              </packing>
             </child>
           </object>
         </child>


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