]> git.0d.be Git - empathy.git/commitdiff
Added an "Import accounts" button to the accounts dialog. (Jonny Lamb)
authorJonny Lamb <jonny.lamb@collabora.co.uk>
Fri, 17 Oct 2008 12:45:58 +0000 (12:45 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Fri, 17 Oct 2008 12:45:58 +0000 (12:45 +0000)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
svn path=/trunk/; revision=1597

src/empathy-accounts-dialog.c
src/empathy-accounts-dialog.glade

index a9666f5752842cf824a38b1a24b4a23c3cd1fe5f..d3d0ff86c48ec4f6ed45a8fd8d199712ab5064dd 100644 (file)
@@ -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 @@ typedef struct {
 
        GtkWidget        *button_add;
        GtkWidget        *button_remove;
+       GtkWidget        *button_import;
 
        GtkWidget        *frame_new_account;
        GtkWidget        *combobox_profile;
@@ -144,6 +146,8 @@ static void       accounts_dialog_button_help_clicked_cb    (GtkWidget
                                                             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);
@@ -998,6 +1002,13 @@ accounts_dialog_button_remove_clicked_cb (GtkWidget            *button,
        gtk_widget_destroy (message_dialog);
 }
 
+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,
@@ -1090,6 +1101,7 @@ empathy_accounts_dialog_show (GtkWindow *parent,
                                       "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 @@ empathy_accounts_dialog_show (GtkWindow *parent,
                              "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);
 
index 110730814f7a328634297137bebddf237b33427f..6091e4aa4684df338f3eb1eef74db95a80c190fb 100644 (file)
                   </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>