aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-12-15 22:49:08 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-12-15 22:59:46 +0800
commit07c1e70246e3d01ccc1000e8bf624ad039b063a6 (patch)
tree436ba250c4116161ad145e42bcb131a69efe4a91 /src/empathy-accounts.c
parent79d91365e3f7d986d28441ad072567bd72b9c776 (diff)
downloadgsoc2013-empathy-07c1e70246e3d01ccc1000e8bf624ad039b063a6.tar
gsoc2013-empathy-07c1e70246e3d01ccc1000e8bf624ad039b063a6.tar.gz
gsoc2013-empathy-07c1e70246e3d01ccc1000e8bf624ad039b063a6.tar.bz2
gsoc2013-empathy-07c1e70246e3d01ccc1000e8bf624ad039b063a6.tar.lz
gsoc2013-empathy-07c1e70246e3d01ccc1000e8bf624ad039b063a6.tar.xz
gsoc2013-empathy-07c1e70246e3d01ccc1000e8bf624ad039b063a6.tar.zst
gsoc2013-empathy-07c1e70246e3d01ccc1000e8bf624ad039b063a6.zip
get the value of selected_account_name in the callback (#637307)
There is no point to pass it as user_data as selected_account_name is global and it's not defined yet when calling tp_account_manager_prepare_async() as the GApplication has not be prepared yet.
Diffstat (limited to 'src/empathy-accounts.c')
-rw-r--r--src/empathy-accounts.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/empathy-accounts.c b/src/empathy-accounts.c
index 16a4c0bfb..5d992ceb3 100644
--- a/src/empathy-accounts.c
+++ b/src/empathy-accounts.c
@@ -93,7 +93,6 @@ account_manager_ready_for_accounts_cb (GObject *source_object,
gpointer user_data)
{
TpAccountManager *manager = TP_ACCOUNT_MANAGER (source_object);
- const gchar *account_id = (const gchar*) user_data;
GError *error = NULL;
if (!tp_account_manager_prepare_finish (manager, result, &error))
@@ -103,7 +102,7 @@ account_manager_ready_for_accounts_cb (GObject *source_object,
return;
}
- if (account_id != NULL)
+ if (selected_account_name != NULL)
{
gchar *account_path;
TpAccount *account = NULL;
@@ -112,7 +111,7 @@ account_manager_ready_for_accounts_cb (GObject *source_object,
/* create and prep the corresponding TpAccount so it's fully ready by the
* time we try to select it in the accounts dialog */
account_path = g_strdup_printf ("%s%s", TP_ACCOUNT_OBJECT_PATH_BASE,
- account_id);
+ selected_account_name);
bus = tp_dbus_daemon_dup (NULL);
if ((account = tp_account_new (bus, account_path, &error)))
{
@@ -240,7 +239,7 @@ main (int argc, char *argv[])
account_manager = tp_account_manager_dup ();
tp_account_manager_prepare_async (account_manager, NULL,
- account_manager_ready_for_accounts_cb, selected_account_name);
+ account_manager_ready_for_accounts_cb, NULL);
g_signal_connect (app, "command-line", G_CALLBACK (app_command_line_cb),
NULL);