aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-25 20:43:10 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-25 22:13:41 +0800
commit95cd2370571dafcd4aab34ebb93499b915a70bcb (patch)
tree11cd6e63b5d67af6adf546b6679993bb5c6bdf97
parent3ee94f0e0e9c0757735f9bae72ce12ae9749d790 (diff)
downloadgsoc2013-empathy-95cd2370571dafcd4aab34ebb93499b915a70bcb.tar
gsoc2013-empathy-95cd2370571dafcd4aab34ebb93499b915a70bcb.tar.gz
gsoc2013-empathy-95cd2370571dafcd4aab34ebb93499b915a70bcb.tar.bz2
gsoc2013-empathy-95cd2370571dafcd4aab34ebb93499b915a70bcb.tar.lz
gsoc2013-empathy-95cd2370571dafcd4aab34ebb93499b915a70bcb.tar.xz
gsoc2013-empathy-95cd2370571dafcd4aab34ebb93499b915a70bcb.tar.zst
gsoc2013-empathy-95cd2370571dafcd4aab34ebb93499b915a70bcb.zip
remove create_salut_account_if_needed as it's done in the assistant now
-rw-r--r--src/empathy-auto-salut-account-helper.c109
-rw-r--r--src/empathy-auto-salut-account-helper.h2
2 files changed, 0 insertions, 111 deletions
diff --git a/src/empathy-auto-salut-account-helper.c b/src/empathy-auto-salut-account-helper.c
index 85ead8ef6..a5fbcf0c3 100644
--- a/src/empathy-auto-salut-account-helper.c
+++ b/src/empathy-auto-salut-account-helper.c
@@ -79,30 +79,6 @@ should_create_salut_account (TpAccountManager *manager)
return !salut_created;
}
-static void
-salut_account_created (GObject *source,
- GAsyncResult *result,
- gpointer user_data)
-{
- EmpathyAccountSettings *settings = EMPATHY_ACCOUNT_SETTINGS (source);
- TpAccount *account;
- GError *error = NULL;
-
- if (!empathy_account_settings_apply_finish (settings, result, &error))
- {
- DEBUG ("Failed to create salut account: %s", error->message);
- g_error_free (error);
- return;
- }
-
- account = empathy_account_settings_get_account (settings);
-
- tp_account_set_enabled_async (account, TRUE, NULL, NULL);
- empathy_conf_set_bool (empathy_conf_get (),
- EMPATHY_PREFS_SALUT_ACCOUNT_CREATED,
- TRUE);
-}
-
EmpathyAccountSettings *
create_salut_account_settings (void)
{
@@ -163,88 +139,3 @@ create_salut_account_settings (void)
return settings;
}
-
-static void
-create_salut_account_am_ready_cb (GObject *source_object,
- GAsyncResult *result,
- gpointer user_data)
-{
- TpAccountManager *account_manager = TP_ACCOUNT_MANAGER (source_object);
- EmpathyConnectionManagers *managers = user_data;
- EmpathyAccountSettings *settings;
- TpConnectionManager *manager;
- const TpConnectionManagerProtocol *protocol;
- GError *error = NULL;
-
- if (!tp_account_manager_prepare_finish (account_manager, result, &error))
- {
- DEBUG ("Failed to prepare account manager: %s", error->message);
- g_error_free (error);
- goto out;
- }
-
- if (!should_create_salut_account (account_manager))
- goto out;
-
- manager = empathy_connection_managers_get_cm (managers, "salut");
- if (manager == NULL)
- {
- DEBUG ("Salut not installed, not making a salut account");
- goto out;
- }
-
- protocol = tp_connection_manager_get_protocol (manager, "local-xmpp");
- if (protocol == NULL)
- {
- DEBUG ("Salut doesn't support local-xmpp!!");
- goto out;
- }
-
- DEBUG ("Trying to add a salut account...");
-
- settings = create_salut_account_settings ();
- if (!empathy_account_settings_is_valid (settings))
- {
- g_object_unref (settings);
- goto out;
- }
-
- empathy_account_settings_apply_async (settings,
- salut_account_created, NULL);
-
- g_object_unref (settings);
-
-out:
- g_object_unref (managers);
-}
-
-static void
-create_salut_account_cms_ready_cb (EmpathyConnectionManagers *managers)
-{
- TpAccountManager *manager;
-
- manager = tp_account_manager_dup ();
-
- tp_account_manager_prepare_async (manager, NULL,
- create_salut_account_am_ready_cb, managers);
-
- g_object_unref (manager);
-}
-
-void
-create_salut_account_if_needed (void)
-{
- EmpathyConnectionManagers *managers;
-
- managers = empathy_connection_managers_dup_singleton ();
-
- if (empathy_connection_managers_is_ready (managers))
- {
- create_salut_account_cms_ready_cb (managers);
- }
- else
- {
- g_signal_connect (managers, "notify::ready",
- G_CALLBACK (create_salut_account_cms_ready_cb), NULL);
- }
-}
diff --git a/src/empathy-auto-salut-account-helper.h b/src/empathy-auto-salut-account-helper.h
index 16e8905e7..f0409d01d 100644
--- a/src/empathy-auto-salut-account-helper.h
+++ b/src/empathy-auto-salut-account-helper.h
@@ -29,8 +29,6 @@
#include <libempathy/empathy-connection-managers.h>
#include <libempathy/empathy-account-settings.h>
-void create_salut_account_if_needed (void);
-
gboolean should_create_salut_account (TpAccountManager *manager);
EmpathyAccountSettings * create_salut_account_settings (void);