empathy r1597 - trunk/src



Author: xclaesse
Date: Fri Oct 17 12:45:58 2008
New Revision: 1597
URL: http://svn.gnome.org/viewvc/empathy?rev=1597&view=rev

Log:
Added an "Import accounts" button to the accounts dialog. (Jonny Lamb)

Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>

Modified:
   trunk/src/empathy-accounts-dialog.c
   trunk/src/empathy-accounts-dialog.glade

Modified: trunk/src/empathy-accounts-dialog.c
==============================================================================
--- trunk/src/empathy-accounts-dialog.c	(original)
+++ trunk/src/empathy-accounts-dialog.c	Fri Oct 17 12:45:58 2008
@@ -46,6 +46,7 @@
 #include <libempathy-gtk/empathy-account-widget-sip.h>
 
 #include "empathy-accounts-dialog.h"
+#include "empathy-import-dialog.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
 #include <libempathy/empathy-debug.h>
@@ -65,6 +66,7 @@
 
 	GtkWidget        *button_add;
 	GtkWidget        *button_remove;
+	GtkWidget        *button_import;
 
 	GtkWidget        *frame_new_account;
 	GtkWidget        *combobox_profile;
@@ -144,6 +146,8 @@
 							     EmpathyAccountsDialog    *dialog);
 static void       accounts_dialog_button_remove_clicked_cb  (GtkWidget                *button,
 							     EmpathyAccountsDialog    *dialog);
+static void       accounts_dialog_button_import_clicked_cb  (GtkWidget                *button,
+							     EmpathyAccountsDialog    *dialog);
 static void       accounts_dialog_response_cb               (GtkWidget                *widget,
 							     gint                      response,
 							     EmpathyAccountsDialog    *dialog);
@@ -999,6 +1003,13 @@
 }
 
 static void
+accounts_dialog_button_import_clicked_cb (GtkWidget             *button,
+					  EmpathyAccountsDialog *dialog)
+{
+	empathy_import_dialog_show (GTK_WINDOW (dialog->window));
+}
+
+static void
 accounts_dialog_response_cb (GtkWidget            *widget,
 			     gint                  response,
 			     EmpathyAccountsDialog *dialog)
@@ -1090,6 +1101,7 @@
 				       "label_name", &dialog->label_name,
 				       "button_add", &dialog->button_add,
 				       "button_remove", &dialog->button_remove,
+				       "button_import", &dialog->button_import,
 				       NULL);
 	g_free (filename);
 
@@ -1101,6 +1113,7 @@
 			      "button_back", "clicked", accounts_dialog_button_back_clicked_cb,
 			      "button_add", "clicked", accounts_dialog_button_add_clicked_cb,
 			      "button_remove", "clicked", accounts_dialog_button_remove_clicked_cb,
+			      "button_import", "clicked", accounts_dialog_button_import_clicked_cb,
 			      "button_help", "clicked", accounts_dialog_button_help_clicked_cb,
 			      NULL);
 

Modified: trunk/src/empathy-accounts-dialog.glade
==============================================================================
--- trunk/src/empathy-accounts-dialog.glade	(original)
+++ trunk/src/empathy-accounts-dialog.glade	Fri Oct 17 12:45:58 2008
@@ -40,25 +40,46 @@
                   </widget>
                 </child>
                 <child>
-                  <widget class="GtkHBox" id="hbox148">
+                  <widget class="GtkVBox" id="vbox1">
                     <property name="visible">True</property>
-                    <property name="spacing">6</property>
                     <property name="homogeneous">True</property>
                     <child>
-                      <widget class="GtkButton" id="button_add">
+                      <widget class="GtkHBox" id="hbox148">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="label">gtk-add</property>
-                        <property name="use_stock">True</property>
-                        <property name="response_id">0</property>
+                        <property name="spacing">6</property>
+                        <property name="homogeneous">True</property>
+                        <child>
+                          <widget class="GtkButton" id="button_add">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label">gtk-add</property>
+                            <property name="use_stock">True</property>
+                            <property name="response_id">0</property>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="button_remove">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label">gtk-remove</property>
+                            <property name="use_stock">True</property>
+                            <property name="response_id">0</property>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
                       </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                      </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="button_remove">
+                      <widget class="GtkButton" id="button_import">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label">gtk-remove</property>
-                        <property name="use_stock">True</property>
+                        <property name="label" translatable="yes">Import accounts</property>
                         <property name="response_id">0</property>
                       </widget>
                       <packing>
@@ -68,7 +89,6 @@
                   </widget>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="fill">False</property>
                     <property name="position">1</property>
                   </packing>
                 </child>



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