[gnome-logs/wip/latest-mockup] Use a single header bar



commit b0929fe5d211d3764900fd75e1e87df96369761b
Author: David King <davidk gnome org>
Date:   Tue Oct 8 12:06:40 2013 +0100

    Use a single header bar
    
    Remove the left header bar.

 data/gl-style.css |   11 -----------
 data/gl-window.ui |   47 +++++------------------------------------------
 src/gl-window.c   |    6 +++---
 3 files changed, 8 insertions(+), 56 deletions(-)
---
diff --git a/data/gl-style.css b/data/gl-style.css
index d3d0278..10a12dc 100644
--- a/data/gl-style.css
+++ b/data/gl-style.css
@@ -1,14 +1,3 @@
-/* Fix rounded corners for side-by-side header bars. */
-.left_toolbar:dir(ltr),
-.right_toolbar:dir(rtl) {
-    border-top-right-radius: 0;
-}
-
-.right_toolbar:dir(ltr),
-.left_toolbar:dir(rtl) {
-    border-top-left-radius: 0;
-}
-
 /* Theme overrides. */
 .categories {
     background-color: shade(@theme_bg_color, 0.99)
diff --git a/data/gl-window.ui b/data/gl-window.ui
index 39185d0..f23b0b8 100644
--- a/data/gl-window.ui
+++ b/data/gl-window.ui
@@ -4,42 +4,12 @@
         <property name="default-height">480</property>
         <signal name="key-press-event" handler="on_gl_window_key_press_event"/>
         <child type="titlebar">
-            <object class="GtkBox" id="titlebar">
-                <property name="orientation">horizontal</property>
+            <object class="GlEventToolbar" id="event_toolbar">
                 <property name="visible">True</property>
-                <child>
-                    <object class="GtkHeaderBar" id="left_toolbar">
-                        <property name="visible">True</property>
-                        <style>
-                            <class name="titlebar"/>
-                            <class name="left_toolbar"/>
-                        </style>
-                        <child type="title">
-                            <object class="GtkLabel" id="categories_title">
-                                <property name="label" translatable="yes">Categories</property>
-                                <property name="visible">True</property>
-                                <style>
-                                    <class name="title"/>
-                                </style>
-                            </object>
-                        </child>
-                    </object>
-                </child>
-                <child>
-                    <object class="GtkSeparator" id="titlebar_separator">
-                        <property name="orientation">vertical</property>
-                        <property name="visible">True</property>
-                    </object>
-                </child>
-                <child>
-                    <object class="GlEventToolbar" id="right_toolbar">
-                        <property name="visible">True</property>
-                        <style>
-                            <class name="titlebar"/>
-                            <class name="right_toolbar"/>
-                        </style>
-                    </object>
-                </child>
+                <style>
+                    <class name="titlebar"/>
+                    <class name="event_toolbar"/>
+                </style>
             </object>
         </child>
         <child>
@@ -87,11 +57,4 @@
             </object>
         </child>
     </template>
-        <object class="GtkSizeGroup" id="left_column">
-            <property name="mode">GTK_SIZE_GROUP_HORIZONTAL</property>
-            <widgets>
-                <widget name="left_toolbar"/>
-                <widget name="categories"/>
-            </widgets>
-        </object>
 </interface>
diff --git a/src/gl-window.c b/src/gl-window.c
index af78c21..b94b4d9 100644
--- a/src/gl-window.c
+++ b/src/gl-window.c
@@ -27,7 +27,7 @@
 
 typedef struct
 {
-    GtkWidget *right_toolbar;
+    GtkWidget *event_toolbar;
     GtkWidget *event_search;
     GtkWidget *search_entry;
     GtkWidget *events;
@@ -134,7 +134,7 @@ on_view_mode (GSimpleAction *action,
 
     priv = gl_window_get_instance_private (GL_WINDOW (user_data));
     mode = g_variant_get_string (variant, NULL);
-    toolbar = GL_EVENT_TOOLBAR (priv->right_toolbar);
+    toolbar = GL_EVENT_TOOLBAR (priv->event_toolbar);
     eclass = g_type_class_ref (GL_TYPE_EVENT_VIEW_MODE);
     evalue = g_enum_get_value_by_nick (eclass, mode);
 
@@ -254,7 +254,7 @@ gl_window_class_init (GlWindowClass *klass)
     gtk_widget_class_set_template_from_resource (widget_class,
                                                  "/org/gnome/Logs/gl-window.ui");
     gtk_widget_class_bind_template_child_private (widget_class, GlWindow,
-                                                  right_toolbar);
+                                                  event_toolbar);
     gtk_widget_class_bind_template_child_private (widget_class, GlWindow,
                                                   event_search);
     gtk_widget_class_bind_template_child_private (widget_class, GlWindow,


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