aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-16 19:48:05 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-17 00:43:30 +0800
commit6fc913d958a7569ce8848797b4d365776cc7af20 (patch)
tree72eea291a362fa10a5cad76376ffaa808c5ce2af /src
parentdb8942598423d5dd11ea28cdfb4b2935f1e2a374 (diff)
downloadgsoc2013-empathy-6fc913d958a7569ce8848797b4d365776cc7af20.tar
gsoc2013-empathy-6fc913d958a7569ce8848797b4d365776cc7af20.tar.gz
gsoc2013-empathy-6fc913d958a7569ce8848797b4d365776cc7af20.tar.bz2
gsoc2013-empathy-6fc913d958a7569ce8848797b4d365776cc7af20.tar.lz
gsoc2013-empathy-6fc913d958a7569ce8848797b4d365776cc7af20.tar.xz
gsoc2013-empathy-6fc913d958a7569ce8848797b4d365776cc7af20.tar.zst
gsoc2013-empathy-6fc913d958a7569ce8848797b4d365776cc7af20.zip
Stop using the accounts assistant
Its features have been re-implemented in empathy-accounts-dialog. Thanks to Danielle for this new design. https://bugzilla.gnome.org/show_bug.cgi?id=652669
Diffstat (limited to 'src')
-rw-r--r--src/empathy-accounts-common.c67
1 files changed, 5 insertions, 62 deletions
diff --git a/src/empathy-accounts-common.c b/src/empathy-accounts-common.c
index 9704b2e9b..7da2788bc 100644
--- a/src/empathy-accounts-common.c
+++ b/src/empathy-accounts-common.c
@@ -41,7 +41,6 @@
#include "empathy-accounts-common.h"
#include "empathy-accounts-dialog.h"
-#include "empathy-account-assistant.h"
#include "empathy-auto-salut-account-helper.h"
#define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
@@ -82,13 +81,16 @@ empathy_accounts_has_accounts (TpAccountManager *manager)
return has_accounts;
}
-static void
-do_show_accounts_ui (TpAccountManager *manager,
+void
+empathy_accounts_show_accounts_ui (TpAccountManager *manager,
TpAccount *account,
GApplication *app)
{
static GtkWidget *accounts_window = NULL;
+ g_return_if_fail (TP_IS_ACCOUNT_MANAGER (manager));
+ g_return_if_fail (!account || TP_IS_ACCOUNT (account));
+
if (accounts_window == NULL)
{
accounts_window = empathy_accounts_dialog_show (NULL, account);
@@ -99,62 +101,3 @@ do_show_accounts_ui (TpAccountManager *manager,
gtk_window_present (GTK_WINDOW (accounts_window));
}
-
-static GtkWidget *
-show_account_assistant (EmpathyConnectionManagers *connection_mgrs,
- GApplication *app)
-{
- GtkWidget *assistant;
-
- assistant = empathy_account_assistant_show (NULL, connection_mgrs);
-
- gtk_application_add_window (GTK_APPLICATION (app), GTK_WINDOW (assistant));
-
- return assistant;
-}
-
-static void
-connection_managers_prepare_for_accounts (GObject *source,
- GAsyncResult *result,
- gpointer user_data)
-{
- EmpathyConnectionManagers *cm_mgr = EMPATHY_CONNECTION_MANAGERS (source);
- GApplication *app = user_data;
-
- if (!empathy_connection_managers_prepare_finish (cm_mgr, result, NULL))
- goto out;
-
- show_account_assistant (cm_mgr, app);
- DEBUG ("would show the account assistant");
-
-out:
- g_object_unref (cm_mgr);
- g_application_release (app);
-}
-
-void
-empathy_accounts_show_accounts_ui (TpAccountManager *manager,
- TpAccount *account,
- GApplication *app)
-{
- g_return_if_fail (TP_IS_ACCOUNT_MANAGER (manager));
- g_return_if_fail (!account || TP_IS_ACCOUNT (account));
-
- if (empathy_accounts_has_non_salut_accounts (manager) ||
- account != NULL)
- {
- do_show_accounts_ui (manager, account, app);
- }
- else
- {
- EmpathyConnectionManagers *cm_mgr;
-
- cm_mgr = empathy_connection_managers_dup_singleton ();
-
- /* Hold the application while preparing cm_mgr */
- g_application_hold (app);
-
- empathy_connection_managers_prepare_async (cm_mgr,
- connection_managers_prepare_for_accounts, app);
- }
-}