[gitg] Use headerbar in the clone dialog



commit 1b4b38e1efd91296b68aa1ef4ced76c3cb9a64ab
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Wed Mar 26 04:23:28 2014 +0200

    Use headerbar in the clone dialog
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727068

 gitg/gitg-clone-dialog.vala            |    2 +-
 gitg/resources/ui/gitg-clone-dialog.ui |   81 ++++++++++++++++----------------
 2 files changed, 41 insertions(+), 42 deletions(-)
---
diff --git a/gitg/gitg-clone-dialog.vala b/gitg/gitg-clone-dialog.vala
index b246a7c..365d355 100644
--- a/gitg/gitg-clone-dialog.vala
+++ b/gitg/gitg-clone-dialog.vala
@@ -52,7 +52,7 @@ public class CloneDialog : Gtk.Dialog
 
        public CloneDialog(Gtk.Window? parent)
        {
-               Object();
+               Object(use_header_bar: 1);
 
                if (parent != null)
                {
diff --git a/gitg/resources/ui/gitg-clone-dialog.ui b/gitg/resources/ui/gitg-clone-dialog.ui
index 6c8ad5d..972b7f3 100644
--- a/gitg/resources/ui/gitg-clone-dialog.ui
+++ b/gitg/resources/ui/gitg-clone-dialog.ui
@@ -8,53 +8,52 @@
     <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="dialog-vbox1">
+    <child internal-child="headerbar">
+      <object class="GtkHeaderBar" id="dialog-header_bar">
+        <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">2</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area1">
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="cancel-button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok-button">
-                <property name="label" translatable="yes">Cl_one</property>
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
+        <property name="show_close_button">False</property>
+        <child>
+          <object class="GtkButton" id="cancel-button">
+            <property name="label" translatable="yes">_Cancel</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_underline">True</property>
+            <property name="valign">center</property>
+            <style>
+              <class name="text-button"/>
+            </style>
+          </object>
+          <packing>
+            <property name="pack_type">start</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="ok-button">
+            <property name="label" translatable="yes">Cl_one</property>
+            <property name="visible">True</property>
+            <property name="sensitive">False</property>
+            <property name="can_focus">True</property>
+            <property name="can_default">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_underline">True</property>
+            <style>
+              <class name="text-button"/>
+              <class name="suggested-action"/>
+            </style>
           </object>
           <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
             <property name="pack_type">end</property>
-            <property name="position">0</property>
           </packing>
         </child>
+      </object>
+    </child>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
         <child>
           <object class="GtkGrid" id="grid1">
             <property name="visible">True</property>


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