[epiphany] Use header bar on preferences dialog



commit bcbc459693e4ea830d6787519dfc92c84ba9acd6
Author: William Jon McCann <william jon mccann gmail com>
Date:   Thu Feb 6 15:59:37 2014 -0500

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

 src/ephy-shell.c              |    4 +++-
 src/resources/prefs-dialog.ui |   34 +++++++++++++---------------------
 2 files changed, 16 insertions(+), 22 deletions(-)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index b66b19d..8bd40f2 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -928,7 +928,9 @@ GObject *
 ephy_shell_get_prefs_dialog (EphyShell *shell)
 {
   if (shell->priv->prefs_dialog == NULL) {
-    shell->priv->prefs_dialog = g_object_new (EPHY_TYPE_PREFS_DIALOG, NULL);
+    shell->priv->prefs_dialog = g_object_new (EPHY_TYPE_PREFS_DIALOG,
+                                              "use-header-bar", TRUE,
+                                              NULL);
     g_signal_connect (shell->priv->prefs_dialog,
                       "destroy",
                       G_CALLBACK (gtk_widget_destroyed),
diff --git a/src/resources/prefs-dialog.ui b/src/resources/prefs-dialog.ui
index 3359148..a45c8ef 100644
--- a/src/resources/prefs-dialog.ui
+++ b/src/resources/prefs-dialog.ui
@@ -24,39 +24,33 @@
   </object>
   <template class="PrefsDialog" parent="GtkDialog">
     <property name="can_focus">False</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Preferences</property>
+    <property name="border_width">0</property>
     <property name="role">epiphany-preferences</property>
     <property name="modal">True</property>
     <property name="window_position">center</property>
     <property name="destroy_with_parent">True</property>
     <property name="icon_name">gtk-preferences</property>
     <property name="type_hint">dialog</property>
+    <child internal-child="headerbar">
+      <object class="GtkHeaderBar" id="headerbar1">
+        <property name="title" translatable="yes">Preferences</property>
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="show-close-button">True</property>
+      </object>
+    </child>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox2">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="border_width">0</property>
         <property name="orientation">vertical</property>
         <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="closebutton1">
-                <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>
-              </packing>
-            </child>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -69,7 +63,8 @@
           <object class="GtkNotebook" id="prefs_notebook">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
-            <property name="border_width">5</property>
+            <property name="border_width">0</property>
+            <property name="show_border">False</property>
             <child>
               <object class="GtkBox" id="general_page_box">
                 <property name="visible">True</property>
@@ -1407,8 +1402,5 @@
         </child>
       </object>
     </child>
-    <action-widgets>
-      <action-widget response="-7">closebutton1</action-widget>
-    </action-widgets>
   </template>
 </interface>


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