[epiphany] Use header bar on history dialog



commit db9875bf308734f30eba04dbe3b040960cc7cd9d
Author: William Jon McCann <william jon mccann gmail com>
Date:   Thu Feb 6 16:40:36 2014 -0500

    Use header bar on history dialog
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723803

 src/ephy-history-window.c       |    1 +
 src/resources/history-dialog.ui |   63 +++++++++++++++++---------------------
 2 files changed, 29 insertions(+), 35 deletions(-)
---
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 7b94277..6bcb9ba 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -704,6 +704,7 @@ ephy_history_window_new (EphyHistoryService *history_service)
        g_return_val_if_fail (history_service != NULL, NULL);
 
        self = g_object_new (EPHY_TYPE_HISTORY_WINDOW,
+                            "use-header-bar" , TRUE,
                             "history-service", history_service,
                             NULL);
 
diff --git a/src/resources/history-dialog.ui b/src/resources/history-dialog.ui
index 00676cc..bbf3cd9 100644
--- a/src/resources/history-dialog.ui
+++ b/src/resources/history-dialog.ui
@@ -15,14 +15,39 @@
   <template class="EphyHistoryWindow" parent="GtkDialog">
     <property name="height_request">500</property>
     <property name="can_focus">False</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">History</property>
+    <property name="border_width">0</property>
     <property name="modal">True</property>
     <property name="window_position">center</property>
     <property name="default_width">1000</property>
     <property name="default_height">600</property>
     <property name="destroy_with_parent">True</property>
     <property name="type_hint">dialog</property>
+    <child internal-child="headerbar">
+      <object class="GtkHeaderBar" id="headerbar1">
+        <property name="title" translatable="yes">History</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="show-close-button">True</property>
+        <child>
+          <object class="GtkButton" id="clear_button">
+            <property name="label" translatable="yes">C_lear All</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="can_default">True</property>
+            <property name="receives_default">False</property>
+            <property name="use_underline">True</property>
+            <property name="valign">center</property>
+            <style>
+              <class name="destructive-action"/>
+              <class name="text-button"/>
+            </style>
+          </object>
+          <packing>
+            <property name="pack_type">start</property>
+          </packing>
+        </child>
+      </object>
+    </child>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox2">
         <property name="visible">True</property>
@@ -31,40 +56,9 @@
         <property name="spacing">2</property>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area2">
-            <property name="visible">True</property>
+            <property name="visible">False</property>
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="clear_button">
-                <property name="label" translatable="yes">C_lear All</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-                <property name="secondary">True</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="close_button">
-                <property name="label" translatable="yes">_Close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -304,7 +298,6 @@
     </child>
     <action-widgets>
       <action-widget response="-2">clear_button</action-widget>
-      <action-widget response="-7">close_button</action-widget>
     </action-widgets>
   </template>
   <object class="GtkMenu" id="treeview_popup_menu">


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