aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/empathy-accounts-dialog.c17
-rw-r--r--src/empathy-accounts-dialog.ui11
2 files changed, 27 insertions, 1 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index e57c80393..85b738d1c 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -78,6 +78,7 @@ typedef struct {
GtkWidget *treeview;
GtkWidget *button_add;
+ GtkWidget *button_import;
GtkWidget *frame_new_account;
GtkWidget *combobox_protocol;
@@ -1452,6 +1453,18 @@ accounts_dialog_button_help_clicked_cb (GtkWidget *button,
}
static void
+accounts_dialog_button_import_clicked_cb (GtkWidget *button,
+ EmpathyAccountsDialog *dialog)
+{
+ EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
+ GtkWidget *import_dialog;
+
+ import_dialog = empathy_import_dialog_new (GTK_WINDOW (priv->window),
+ FALSE);
+ gtk_widget_show (import_dialog);
+}
+
+static void
accounts_dialog_close_response_cb (GtkDialog *message_dialog,
gint response_id,
gpointer user_data)
@@ -1570,6 +1583,7 @@ accounts_dialog_build_ui (EmpathyAccountsDialog *dialog)
"image_type", &priv->image_type,
"label_name", &priv->label_name,
"button_add", &priv->button_add,
+ "button_import", &priv->button_import,
NULL);
g_free (filename);
@@ -1581,6 +1595,7 @@ accounts_dialog_build_ui (EmpathyAccountsDialog *dialog)
"button_back", "clicked", accounts_dialog_button_back_clicked_cb,
"button_add", "clicked", accounts_dialog_button_add_clicked_cb,
"button_help", "clicked", accounts_dialog_button_help_clicked_cb,
+ "button_import", "clicked", accounts_dialog_button_import_clicked_cb,
NULL);
g_object_unref (gui);
@@ -1761,9 +1776,9 @@ do_constructed (GObject *object)
empathy_conf_get_bool (empathy_conf_get (),
EMPATHY_PREFS_IMPORT_ASKED, &import_asked);
-
if (empathy_import_accounts_to_import ())
{
+ gtk_widget_show (priv->button_import);
if (!import_asked)
{
diff --git a/src/empathy-accounts-dialog.ui b/src/empathy-accounts-dialog.ui
index e5226b270..f9cd3ec6f 100644
--- a/src/empathy-accounts-dialog.ui
+++ b/src/empathy-accounts-dialog.ui
@@ -54,6 +54,17 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">1</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">2</property>
</packing>
</child>