[gitg] Use headerbar in the commit dialog



commit ce5c424a7758b1340b4d207720b0434c694c6d3f
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Wed Mar 26 04:22:40 2014 +0200

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

 gitg/commit/gitg-commit-dialog.vala     |    2 +-
 gitg/resources/ui/gitg-commit-dialog.ui |   83 +++++++++++++++----------------
 2 files changed, 42 insertions(+), 43 deletions(-)
---
diff --git a/gitg/commit/gitg-commit-dialog.vala b/gitg/commit/gitg-commit-dialog.vala
index ff752ab..939dd5f 100644
--- a/gitg/commit/gitg-commit-dialog.vala
+++ b/gitg/commit/gitg-commit-dialog.vala
@@ -679,7 +679,7 @@ class Dialog : Gtk.Dialog
        public Dialog(Ggit.Signature author,
                      Ggit.Diff?     diff)
        {
-               Object(author: author, diff: diff);
+               Object(author: author, diff: diff, use_header_bar: 1);
        }
 
        private void update_font_settings()
diff --git a/gitg/resources/ui/gitg-commit-dialog.ui b/gitg/resources/ui/gitg-commit-dialog.ui
index 4a1a659..421c502 100644
--- a/gitg/resources/ui/gitg-commit-dialog.ui
+++ b/gitg/resources/ui/gitg-commit-dialog.ui
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 3.10 -->
+  <!-- interface-requires gtk+ 3.12 -->
   <!-- interface-requires gtksourceview 3.0 -->
   <template class="GitgCommitDialog" parent="GtkDialog">
     <property name="can_focus">False</property>
@@ -10,53 +10,52 @@
     <property name="default_width">600</property>
     <property name="default_height">400</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">C_ommit</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">C_ommit</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]