aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-09-28 23:11:55 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-09-28 23:11:55 +0800
commit32726fae58b90a02f3c6cdb7435d15966684cc37 (patch)
tree6eb548c90ccee86329715ee7f9a4804083efc523 /src
parentc637daaf5750c1809e05ff39fa2070591410aac3 (diff)
downloadgsoc2013-empathy-32726fae58b90a02f3c6cdb7435d15966684cc37.tar
gsoc2013-empathy-32726fae58b90a02f3c6cdb7435d15966684cc37.tar.gz
gsoc2013-empathy-32726fae58b90a02f3c6cdb7435d15966684cc37.tar.bz2
gsoc2013-empathy-32726fae58b90a02f3c6cdb7435d15966684cc37.tar.lz
gsoc2013-empathy-32726fae58b90a02f3c6cdb7435d15966684cc37.tar.xz
gsoc2013-empathy-32726fae58b90a02f3c6cdb7435d15966684cc37.tar.zst
gsoc2013-empathy-32726fae58b90a02f3c6cdb7435d15966684cc37.zip
Add an import button back to the accounts dialog.
The button is only shown when there are actually accounts to import.
Diffstat (limited to 'src')
-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>