[gitg/wip/notebook: 2/2] Use a notebook to handle the different views



commit c55a5738fbe4f53342682e8051cf77da49905ef5
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Thu Oct 18 19:45:03 2012 +0200

    Use a notebook to handle the different views

 gitg/resources/ui/gitg-window.ui |  369 +++++++++++++++++++++++++------------
 1 files changed, 249 insertions(+), 120 deletions(-)
---
diff --git a/gitg/resources/ui/gitg-window.ui b/gitg/resources/ui/gitg-window.ui
index 0651c34..e9080b7 100644
--- a/gitg/resources/ui/gitg-window.ui
+++ b/gitg/resources/ui/gitg-window.ui
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 3.3 -->
+  <!-- interface-requires gtk+ 3.6 -->
   <!-- interface-requires gitg 0.0 -->
   <object class="GtkImage" id="image_config">
     <property name="visible">True</property>
@@ -8,6 +8,12 @@
     <property name="pixel_size">16</property>
     <property name="icon_name">emblem-system-symbolic</property>
   </object>
+  <object class="GtkImage" id="image_config2">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="pixel_size">16</property>
+    <property name="icon_name">emblem-system-symbolic</property>
+  </object>
   <object class="GitgWindow" id="window">
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">gitg</property>
@@ -15,225 +21,348 @@
     <property name="default_height">600</property>
     <property name="hide_titlebar_when_maximized">True</property>
     <child>
-      <object class="GtkGrid" id="grid1">
+      <object class="GtkNotebook" id="notebook">
         <property name="visible">True</property>
-        <property name="can_focus">False</property>
+        <property name="can_focus">True</property>
+        <property name="show_tabs">False</property>
         <child>
-          <object class="GtkToolbar" id="toolbar1">
+          <object class="GtkGrid" id="grid1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="hexpand">True</property>
-            <property name="toolbar_style">icons</property>
-            <property name="icon_size">2</property>
-            <style>
-              <class name="menubar"/>
-            </style>
             <child>
-              <object class="GtkToolItem" id="toolbutton1">
+              <object class="GtkToolbar" id="toolbar1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="toolbar_style">icons</property>
+                <property name="icon_size">2</property>
                 <style>
-                  <class name="raised"/>
+                  <class name="menubar"/>
                 </style>
                 <child>
-                  <object class="GtkAlignment" id="entry-alignment">
+                  <object class="GtkToolItem" id="toolbutton1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">1</property>
-                    <property name="xscale">0</property>
+                    <style>
+                      <class name="raised"/>
+                    </style>
                     <child>
-                      <object class="GtkSearchEntry" id="search-entry">
-                        <property name="width_request">210</property>
+                      <object class="GtkAlignment" id="entry-alignment">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="invisible_char">â</property>
-                        <property name="invisible_char_set">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">1</property>
+                        <property name="xscale">0</property>
+                        <child>
+                          <object class="GtkSearchEntry" id="search-entry">
+                            <property name="width_request">210</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="invisible_char">â</property>
+                            <property name="invisible_char_set">True</property>
+                          </object>
+                        </child>
                       </object>
                     </child>
                   </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolItem" id="toolbutton2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkMenuButton" id="button_config">
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="margin_left">6</property>
+                        <property name="image">image_config</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
                 </child>
               </object>
               <packing>
-                <property name="expand">True</property>
-                <property name="homogeneous">True</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkToolItem" id="toolbutton2">
+              <object class="GtkScrolledWindow" id="scrolled_window_dash">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="name">scrolled_window_dash</property>
                 <child>
-                  <object class="GtkMenuButton" id="button_config">
-                    <property name="use_action_appearance">False</property>
+                  <object class="GtkViewport" id="viewport1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="margin_left">6</property>
-                    <property name="image">image_config</property>
+                    <child>
+                      <object class="GitgGtkDashView" id="dash_view">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="name">dash_view</property>
+                      </object>
+                    </child>
                   </object>
                 </child>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
           </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">0</property>
-            <property name="width">1</property>
-            <property name="height">1</property>
-          </packing>
+        </child>
+        <child type="tab">
+          <placeholder/>
         </child>
         <child>
-          <object class="GtkPaned" id="paned_views">
+          <object class="GtkGrid" id="grid2">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="hexpand">True</property>
-            <property name="vexpand">True</property>
-            <property name="position">200</property>
-            <property name="position_set">True</property>
+            <property name="can_focus">False</property>
             <child>
-              <object class="GtkEventBox" id="navigation_background">
+              <object class="GtkToolbar" id="toolbar2">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="toolbar_style">icons</property>
+                <property name="icon_size">2</property>
                 <style>
-                  <class name="sidebar"/>
+                  <class name="menubar"/>
                 </style>
                 <child>
-                  <object class="GtkGrid" id="grid_navigation">
+                  <object class="GtkToolItem" id="toolbutton3">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="hexpand">True</property>
+                    <style>
+                      <class name="raised"/>
+                    </style>
                     <child>
-                      <object class="GtkToolbar" id="toolbar_views">
+                      <object class="GtkAlignment" id="entry-alignment2">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                        <property name="toolbar_style">icons</property>
-                        <property name="show_arrow">False</property>
-                        <property name="icon_size">1</property>
-                        <style>
-                          <class name="inline-toolbar"/>
-                        </style>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkScrolledWindow" id="scrolled_window_navigation">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
-                        <property name="hscrollbar_policy">never</property>
-                        <property name="name">scrolled_window_navigation</property>
+                        <property name="xalign">1</property>
+                        <property name="xscale">0</property>
                         <child>
-                          <object class="GitgExtNavigationTreeView" id="tree_view_navigation">
+                          <object class="GtkSearchEntry" id="search-entry2">
+                            <property name="width_request">210</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="headers_visible">False</property>
-                            <property name="name">tree_view_navigation</property>
-                            <child internal-child="selection">
-                              <object class="GtkTreeSelection" id="gitgextnavigationtreeView-selection"/>
-                            </child>
+                            <property name="invisible_char">â</property>
+                            <property name="invisible_char_set">True</property>
                           </object>
                         </child>
                       </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">1</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolItem" id="toolbutton4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkToolbar" id="toolbar_panels">
+                      <object class="GtkMenuButton" id="button_config2">
+                        <property name="use_action_appearance">False</property>
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                        <property name="toolbar_style">icons</property>
-                        <property name="icon_size">2</property>
-                        <style>
-                          <class name="inline-toolbar"/>
-                        </style>
+                        <property name="margin_left">6</property>
+                        <property name="image">image_config2</property>
                       </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">2</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
                     </child>
                   </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
                 </child>
               </object>
               <packing>
-                <property name="resize">False</property>
-                <property name="shrink">True</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkPaned" id="paned_panels">
+              <object class="GtkPaned" id="paned_views">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="orientation">vertical</property>
-                <property name="position">300</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="position">200</property>
+                <property name="position_set">True</property>
                 <child>
-                  <object class="GtkEventBox" id="frame_background">
+                  <object class="GtkEventBox" id="navigation_background">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <style>
+                      <class name="sidebar"/>
+                    </style>
                     <child>
-                      <object class="GitgAutohideFrame" id="frame_view">
+                      <object class="GtkGrid" id="grid_navigation">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label_xalign">0</property>
-                        <property name="shadow_type">in</property>
+                        <property name="hexpand">True</property>
                         <child>
-                          <placeholder/>
+                          <object class="GtkToolbar" id="toolbar_views">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="hexpand">True</property>
+                            <property name="toolbar_style">icons</property>
+                            <property name="show_arrow">False</property>
+                            <property name="icon_size">1</property>
+                            <style>
+                              <class name="inline-toolbar"/>
+                            </style>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkScrolledWindow" id="scrolled_window_navigation">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="vexpand">True</property>
+                            <property name="hscrollbar_policy">never</property>
+                            <property name="name">scrolled_window_navigation</property>
+                            <child>
+                              <object class="GitgExtNavigationTreeView" id="tree_view_navigation">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="headers_visible">False</property>
+                                <property name="name">tree_view_navigation</property>
+                                <child internal-child="selection">
+                                  <object class="GtkTreeSelection" id="gitgextnavigationtreeView-selection"/>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">1</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkToolbar" id="toolbar_panels">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="hexpand">True</property>
+                            <property name="toolbar_style">icons</property>
+                            <property name="icon_size">2</property>
+                            <style>
+                              <class name="inline-toolbar"/>
+                            </style>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">2</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
                         </child>
                       </object>
                     </child>
                   </object>
                   <packing>
-                    <property name="resize">True</property>
+                    <property name="resize">False</property>
                     <property name="shrink">True</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GitgAutohideFrame" id="frame_panel">
+                  <object class="GtkPaned" id="paned_panels">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label_xalign">0</property>
-                    <property name="shadow_type">in</property>
+                    <property name="can_focus">True</property>
+                    <property name="orientation">vertical</property>
+                    <property name="position">300</property>
                     <child>
-                      <placeholder/>
+                      <object class="GtkEventBox" id="frame_background">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GitgAutohideFrame" id="frame_view">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label_xalign">0</property>
+                            <property name="shadow_type">in</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="resize">True</property>
+                        <property name="shrink">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GitgAutohideFrame" id="frame_panel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="resize">False</property>
+                        <property name="shrink">True</property>
+                      </packing>
                     </child>
                   </object>
                   <packing>
-                    <property name="resize">False</property>
+                    <property name="resize">True</property>
                     <property name="shrink">True</property>
                   </packing>
                 </child>
               </object>
               <packing>
-                <property name="resize">True</property>
-                <property name="shrink">True</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
           </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">1</property>
-            <property name="width">1</property>
-            <property name="height">1</property>
-          </packing>
+        </child>
+        <child type="tab">
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child type="tab">
+          <placeholder/>
         </child>
       </object>
     </child>
   </object>
 </interface>
+
+<!-- ex: et ts=2 -->



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