aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-15 22:28:18 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-17 00:43:30 +0800
commit692672af8d6a30c6550571a424b4546a0dea98f7 (patch)
tree3082b255451814e2c8fbef5d0a84f31f86b03b44 /src/empathy-accounts-dialog.c
parent49b69761e064aa1b43d6aa01af60bc9f2e536277 (diff)
downloadgsoc2013-empathy-692672af8d6a30c6550571a424b4546a0dea98f7.tar
gsoc2013-empathy-692672af8d6a30c6550571a424b4546a0dea98f7.tar.gz
gsoc2013-empathy-692672af8d6a30c6550571a424b4546a0dea98f7.tar.bz2
gsoc2013-empathy-692672af8d6a30c6550571a424b4546a0dea98f7.tar.lz
gsoc2013-empathy-692672af8d6a30c6550571a424b4546a0dea98f7.tar.xz
gsoc2013-empathy-692672af8d6a30c6550571a424b4546a0dea98f7.tar.zst
gsoc2013-empathy-692672af8d6a30c6550571a424b4546a0dea98f7.zip
accounts-dialog: display the import dialog if there is no account
This is the first step of merging the accounts-dialog and assistant. https://bugzilla.gnome.org/show_bug.cgi?id=652669
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r--src/empathy-accounts-dialog.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 6c452b6b2..934e4986e 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -53,6 +53,7 @@
#include <libempathy-gtk/empathy-images.h>
#include <libempathy-gtk/empathy-new-account-dialog.h>
+#include "empathy-accounts-common.h"
#include "empathy-accounts-dialog.h"
#include "empathy-import-dialog.h"
#include "empathy-import-utils.h"
@@ -2053,6 +2054,20 @@ accounts_dialog_set_selected_account (EmpathyAccountsDialog *dialog,
}
static void
+maybe_show_import_dialog (EmpathyAccountsDialog *self)
+{
+ EmpathyAccountsDialogPriv *priv = GET_PRIV (self);
+
+ if (empathy_accounts_has_non_salut_accounts (priv->account_manager))
+ return;
+
+ if (!empathy_import_accounts_to_import ())
+ return;
+
+ display_import_dialog (self);
+}
+
+static void
finished_loading (EmpathyAccountsDialog *self)
{
EmpathyAccountsDialogPriv *priv = GET_PRIV (self);
@@ -2073,6 +2088,8 @@ finished_loading (EmpathyAccountsDialog *self)
gtk_spinner_stop (GTK_SPINNER (priv->spinner));
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook_account),
NOTEBOOK_PAGE_ACCOUNT);
+
+ maybe_show_import_dialog (self);
}
static void