aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2008-10-17 20:47:48 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-10-17 20:47:48 +0800
commit34155dce06da98803049b7bea34c3d4501a479c4 (patch)
treed7d1807021859b89dff9a880d0610019ef5da03a /src/empathy-accounts-dialog.c
parent53b4129ff7bc11c8f3f2c2a608778840c1e9ba8a (diff)
downloadgsoc2013-empathy-34155dce06da98803049b7bea34c3d4501a479c4.tar
gsoc2013-empathy-34155dce06da98803049b7bea34c3d4501a479c4.tar.gz
gsoc2013-empathy-34155dce06da98803049b7bea34c3d4501a479c4.tar.bz2
gsoc2013-empathy-34155dce06da98803049b7bea34c3d4501a479c4.tar.lz
gsoc2013-empathy-34155dce06da98803049b7bea34c3d4501a479c4.tar.xz
gsoc2013-empathy-34155dce06da98803049b7bea34c3d4501a479c4.tar.zst
gsoc2013-empathy-34155dce06da98803049b7bea34c3d4501a479c4.zip
Removed empathy_import_dialog_accounts_to_import to stop the accounts being parsed twice. (Jonny Lamb)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=1630
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r--src/empathy-accounts-dialog.c45
1 files changed, 12 insertions, 33 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 344a34d17..c510f4dc8 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -1007,7 +1007,7 @@ static void
accounts_dialog_button_import_clicked_cb (GtkWidget *button,
EmpathyAccountsDialog *dialog)
{
- empathy_import_dialog_show (GTK_WINDOW (dialog->window));
+ empathy_import_dialog_show (GTK_WINDOW (dialog->window), TRUE);
}
static void
@@ -1021,36 +1021,6 @@ accounts_dialog_response_cb (GtkWidget *widget,
}
static void
-accounts_dialog_accounts_to_import (EmpathyAccountsDialog *dialog)
-{
- GtkWidget *message;
- gint response;
- gboolean ask;
-
- empathy_conf_get_bool (empathy_conf_get (),
- EMPATHY_PREFS_IMPORT_ASKED, &ask);
-
- if (ask)
- return;
-
- empathy_conf_set_bool (empathy_conf_get (),
- EMPATHY_PREFS_IMPORT_ASKED, TRUE);
-
- message = gtk_message_dialog_new (GTK_WINDOW (dialog->window),
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO,
- _("Do you want to import accounts"
- " from Pidgin?"));
-
- response = gtk_dialog_run (GTK_DIALOG (message));
- gtk_widget_destroy (message);
-
- if (response == GTK_RESPONSE_YES)
- empathy_import_dialog_show (GTK_WINDOW (dialog->window));
-}
-
-static void
accounts_dialog_destroy_cb (GtkWidget *widget,
EmpathyAccountsDialog *dialog)
{
@@ -1105,6 +1075,8 @@ empathy_accounts_dialog_show (GtkWindow *parent,
GladeXML *glade;
gchar *filename;
GList *accounts, *l;
+ gboolean import;
+
if (dialog) {
gtk_window_present (GTK_WINDOW (dialog->window));
@@ -1208,8 +1180,15 @@ empathy_accounts_dialog_show (GtkWindow *parent,
gtk_widget_show (dialog->window);
- if (empathy_import_dialog_accounts_to_import ())
- accounts_dialog_accounts_to_import (dialog);
+ empathy_conf_get_bool (empathy_conf_get (),
+ EMPATHY_PREFS_IMPORT_ASKED, &import);
+
+ if (!import) {
+ empathy_conf_set_bool (empathy_conf_get (),
+ EMPATHY_PREFS_IMPORT_ASKED, TRUE);
+ empathy_import_dialog_show (GTK_WINDOW (dialog->window),
+ FALSE);
+ }
return dialog->window;
}