[gnome-clocks] alarm: Use header bar in the new alarm dialog



commit bf9c8bfc66634b7adecfff039065fc6ae468e7ad
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Mon Feb 17 19:57:55 2014 +0200

    alarm: Use header bar in the new alarm dialog

 data/ui/alarmsetupdialog.ui |   85 ++++++++++++++++++++++---------------------
 src/alarm.vala              |    2 +-
 2 files changed, 44 insertions(+), 43 deletions(-)
---
diff --git a/data/ui/alarmsetupdialog.ui b/data/ui/alarmsetupdialog.ui
index 66053ec..4968467 100644
--- a/data/ui/alarmsetupdialog.ui
+++ b/data/ui/alarmsetupdialog.ui
@@ -21,54 +21,55 @@
     <property name="type_hint">dialog</property>
     <property name="gravity">center</property>
     <property name="has_resize_grip">False</property>
+    <property name="use_header_bar">1</property>
+    <child internal-child="headerbar">
+      <object class="GtkHeaderBar" id="dialog-header-bar">
+        <property name="visible">True</property>
+        <property name="title" translatable="yes">Add a New World Clock</property>
+        <property name="show_close_button">False</property>
+        <child>
+          <object class="GtkButton" id="button1">
+            <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="button2">
+            <property name="label" translatable="yes">_Done</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="can_default">True</property>
+            <property name="has_default">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_underline">True</property>
+            <property name="valign">center</property>
+            <style>
+              <class name="text-button"/>
+              <class name="suggested-action"/>
+            </style>
+          </object>
+          <packing>
+            <property name="pack_type">end</property>
+          </packing>
+        </child>
+      </object>
+    </child>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="can_focus">False</property>
         <property name="valign">start</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="button1">
-                <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="button2">
-                <property name="label" translatable="yes">_Done</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_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>
-          </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>
         <child>
           <object class="GtkGrid" id="setup_dialog_content">
             <property name="visible">True</property>
diff --git a/src/alarm.vala b/src/alarm.vala
index b8c7abf..dc714ce 100644
--- a/src/alarm.vala
+++ b/src/alarm.vala
@@ -305,7 +305,7 @@ private class SetupDialog : Gtk.Dialog {
     private List<Item> alarms_list;
 
     public SetupDialog (Gtk.Window parent, Item? alarm, List<Item> alarms) {
-        Object (transient_for: parent, title: alarm != null ? _("Edit Alarm") : _("New Alarm"));
+        Object (transient_for: parent, title: alarm != null ? _("Edit Alarm") : _("New Alarm"), 
use_header_bar: 1);
 
         alarms_list = new List<Item> ();
         foreach (unowned Item i in alarms) {


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