[empathy: 1/2] Make the accounts-dialog attractive and GNOME3ish



commit c22df1977b4c9cc7c8b33e24b4f76f8a62310567
Author: Danielle Madeley <danielle madeley collabora co uk>
Date:   Wed Jun 15 10:25:42 2011 +0100

    Make the accounts-dialog attractive and GNOME3ish

 src/empathy-accounts-dialog.c  |   11 ++++
 src/empathy-accounts-dialog.ui |   99 +++++++++++++++++++--------------------
 2 files changed, 59 insertions(+), 51 deletions(-)
---
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 14de1d3..75b7481 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -2180,6 +2180,8 @@ accounts_dialog_build_ui (EmpathyAccountsDialog *dialog)
   GtkWidget                    *content_area;
   GtkWidget *action_area, *vbox, *hbox, *align;
   GtkWidget *alig;
+  GtkWidget *sw, *toolbar;
+  GtkStyleContext *context;
 
   filename = empathy_file_lookup ("empathy-accounts-dialog.ui", "src");
 
@@ -2196,6 +2198,8 @@ accounts_dialog_build_ui (EmpathyAccountsDialog *dialog)
       "hbox_protocol", &priv->hbox_protocol,
       "notebook_account", &priv->notebook_account,
       "alignment_loading", &alig,
+      "accounts_sw", &sw,
+      "add_remove_toolbar", &toolbar,
       NULL);
   g_free (filename);
 
@@ -2324,6 +2328,13 @@ accounts_dialog_build_ui (EmpathyAccountsDialog *dialog)
 
   gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
 
+  /* join the add/remove toolbar to the treeview */
+  context = gtk_widget_get_style_context (sw);
+  gtk_style_context_set_junction_sides (context, GTK_JUNCTION_BOTTOM);
+
+  context = gtk_widget_get_style_context (toolbar);
+  gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP);
+
   /* add dialog buttons */
   gtk_button_box_set_layout (GTK_BUTTON_BOX (action_area), GTK_BUTTONBOX_END);
 
diff --git a/src/empathy-accounts-dialog.ui b/src/empathy-accounts-dialog.ui
index a1282fd..fd8c75c 100644
--- a/src/empathy-accounts-dialog.ui
+++ b/src/empathy-accounts-dialog.ui
@@ -11,89 +11,94 @@
         <property name="visible">True</property>
         <property name="spacing">6</property>
         <child>
-          <object class="GtkScrolledWindow" id="scrolledwindow17">
-            <property name="height_request">200</property>
+          <object class="GtkVBox" id="vbox1">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="hscrollbar_policy">never</property>
-            <property name="vscrollbar_policy">automatic</property>
-            <property name="shadow_type">in</property>
+            <property name="spacing">0</property>
             <child>
-              <object class="GtkTreeView" id="treeview">
+              <object class="GtkScrolledWindow" id="accounts_sw">
+                <property name="height_request">200</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="enable_search">False</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="treeview">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="enable_search">False</property>
+                  </object>
+                </child>
               </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
             </child>
-          </object>
-          <packing>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkVBox" id="vbox1">
-            <property name="visible">True</property>
-            <property name="spacing">6</property>
-            <property name="homogeneous">True</property>
             <child>
-              <object class="GtkHBox" id="hbox1">
+              <object class="GtkToolbar" id="add_remove_toolbar">
                 <property name="visible">True</property>
-                <property name="spacing">6</property>
-                <property name="homogeneous">True</property>
+		<property name="icon_size">1</property>
+		<style>
+		  <class name="inline-toolbar"/>
+		</style>
                 <child>
-                  <object class="GtkButton" id="button_add">
-                    <property name="label" translatable="yes">_Addâ</property>
+                  <object class="GtkToolButton" id="button_add">
+                    <property name="tooltip-text" translatable="yes">Addâ</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
-                    <property name="image">add_image</property>
+                    <property name="icon_name">list-add-symbolic</property>
                     <property name="use_underline">True</property>
                   </object>
                   <packing>
-                    <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="button_remove">
-                    <property name="label" translatable="yes">_Remove</property>
+                  <object class="GtkToolButton" id="button_remove">
+                    <property name="tooltip-text" translatable="yes">Remove</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
-                    <property name="image">remove_image</property>
+                    <property name="icon_name">list-remove-symbolic</property>
                     <property name="use_underline">True</property>
                   </object>
                   <packing>
-                    <property name="position">1</property>
                   </packing>
                 </child>
               </object>
               <packing>
+                <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button_import">
-                <property name="label" translatable="yes">_Importâ</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
                 <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="button_import">
+            <property name="label" translatable="yes">_Importâ</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <property name="use_underline">True</property>
+          </object>
+          <packing>
             <property name="expand">False</property>
-            <property name="fill">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
       </object>
       <packing>
-        <property name="expand">False</property>
-        <property name="fill">False</property>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
         <property name="position">0</property>
       </packing>
     </child>
@@ -278,12 +283,4 @@
       </packing>
     </child>
   </object>
-  <object class="GtkImage" id="remove_image">
-    <property name="visible">True</property>
-    <property name="stock">gtk-remove</property>
-  </object>
-  <object class="GtkImage" id="add_image">
-    <property name="visible">True</property>
-    <property name="stock">gtk-add</property>
-  </object>
 </interface>



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