[gnome-clocks] world: Use header bar in the add city dialog



commit e699b4eccac75e945971534caab85a5a2fc43acc
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Mon Feb 17 19:54:41 2014 +0200

    world: Use header bar in the add city dialog

 data/ui/worldlocationdialog.ui |   90 ++++++++++++++++++++--------------------
 src/world.vala                 |    2 +-
 2 files changed, 46 insertions(+), 46 deletions(-)
---
diff --git a/data/ui/worldlocationdialog.ui b/data/ui/worldlocationdialog.ui
index 9983c05..f6c5192 100644
--- a/data/ui/worldlocationdialog.ui
+++ b/data/ui/worldlocationdialog.ui
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires libgweather 3.0 -->
-  <!-- interface-requires gtk+ 3.10 -->
+  <!-- interface-requires gtk+ 3.12 -->
   <template class="ClocksWorldLocationDialog" parent="GtkDialog">
     <property name="can_focus">False</property>
-    <property name="title" translatable="yes">Add a New World Clock</property>
     <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="window_position">center-on-parent</property>
@@ -12,55 +11,56 @@
     <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">_Add</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="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">gtk-add</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="has_default">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">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="location_dialog_content">
             <property name="visible">True</property>
diff --git a/src/world.vala b/src/world.vala
index 63323ed..52b498a 100644
--- a/src/world.vala
+++ b/src/world.vala
@@ -185,7 +185,7 @@ private class LocationDialog : Gtk.Dialog {
     private GWeather.LocationEntry location_entry;
 
     public LocationDialog (Gtk.Window parent) {
-        Object (transient_for: parent);
+        Object (transient_for: parent, use_header_bar: 1);
     }
 
     [GtkCallback]


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