[gnome-chat] contacts-list-dialog: Work header with the last gtk+ version



commit cd458405718fdd7a32286cea0b5273b899a8663d
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Thu Jul 17 21:26:50 2014 +0300

    contacts-list-dialog: Work header with the last gtk+ version

 configure.ac                     |    2 +-
 src/chat-contacts-list-dialog.c  |    2 -
 src/chat-contacts-list-dialog.ui |   49 +++++++++++--------------------------
 3 files changed, 16 insertions(+), 37 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5281642..e591029 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@ AC_HEADER_STDC
 GLIB_GSETTINGS
 
 GLIB_MIN_VERSION=2.35.1
-GTK_MIN_VERSION=3.9.11
+GTK_MIN_VERSION=3.13.1
 
 TP_GLIB_MIN_VERSION=0.19.9
 AC_DEFINE(TP_SEAL_ENABLE, 1, [Prevent to use sealed variables])
diff --git a/src/chat-contacts-list-dialog.c b/src/chat-contacts-list-dialog.c
index 2886e7f..81ddade 100644
--- a/src/chat-contacts-list-dialog.c
+++ b/src/chat-contacts-list-dialog.c
@@ -345,8 +345,6 @@ GtkWidget *
 chat_contacts_list_dialog_new (void)
 {
   return g_object_new (CHAT_TYPE_CONTACTS_LIST_DIALOG,
-#if GTK_CHECK_VERSION (3, 11, 5)
                        "use-header-bar", TRUE,
-#endif
                        NULL);
 }
diff --git a/src/chat-contacts-list-dialog.ui b/src/chat-contacts-list-dialog.ui
index fd73175..3977018 100644
--- a/src/chat-contacts-list-dialog.ui
+++ b/src/chat-contacts-list-dialog.ui
@@ -9,43 +9,24 @@
     <property name="default_height">600</property>
     <property name="destroy_with_parent">True</property>
     <property name="type_hint">dialog</property>
-    <child type="titlebar">
-      <object class="GtkHeaderBar" id="header_bar">
+    <property name="use_header_bar">1</property>
+    <child type="action">
+      <object class="GtkButton" id="cancel_button">
         <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="vexpand">False</property>
-        <property name="title" translatable="yes">New Conversation</property>
-        <child>
-          <object class="GtkButton" id="cancel_button">
-            <property name="visible">True</property>
-            <property name="valign">center</property>
-            <property name="can_focus">False</property>
-            <property name="label" translatable="yes">Cancel</property>
-            <style>
-              <class name="text-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="pack_type">start</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="done_button">
-            <property name="visible">True</property>
-            <property name="valign">center</property>
-            <property name="can_focus">False</property>
-            <property name="label" translatable="yes">Done</property>
-            <style>
-              <class name="text-button"/>
-              <class name="suggested-action"/>
-            </style>
-          </object>
-          <packing>
-            <property name="pack_type">end</property>
-          </packing>
-        </child>
+        <property name="label" translatable="yes">Cancel</property>
+      </object>
+    </child>
+    <child type="action">
+      <object class="GtkButton" id="done_button">
+        <property name="visible">True</property>
+        <property name="label" translatable="yes">Done</property>
+        <property name="can_default">True</property>
       </object>
     </child>
+    <action-widgets>
+      <action-widget response="cancel">cancel_button</action-widget>
+      <action-widget response="ok" default="true">done_button</action-widget>
+    </action-widgets>
     <child internal-child="vbox">
       <object class="GtkBox" id="box">
         <property name="can_focus">False</property>


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