aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-account-assistant.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-03 17:15:37 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-03 17:15:37 +0800
commit37ae70ceec9ead69d1584067ed9a489f309d1961 (patch)
tree70f754b8c5f324ed8230ed65ee250bc26a3e63c4 /src/empathy-account-assistant.c
parent46d00adb33b8b356e56f633d2ac25dfa06705bbe (diff)
downloadgsoc2013-empathy-37ae70ceec9ead69d1584067ed9a489f309d1961.tar
gsoc2013-empathy-37ae70ceec9ead69d1584067ed9a489f309d1961.tar.gz
gsoc2013-empathy-37ae70ceec9ead69d1584067ed9a489f309d1961.tar.bz2
gsoc2013-empathy-37ae70ceec9ead69d1584067ed9a489f309d1961.tar.lz
gsoc2013-empathy-37ae70ceec9ead69d1584067ed9a489f309d1961.tar.xz
gsoc2013-empathy-37ae70ceec9ead69d1584067ed9a489f309d1961.tar.zst
gsoc2013-empathy-37ae70ceec9ead69d1584067ed9a489f309d1961.zip
assistant: call empathy_account_widget_get_default_display_name before actually creating the account
This saves us a D-Bus call.
Diffstat (limited to 'src/empathy-account-assistant.c')
-rw-r--r--src/empathy-account-assistant.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index 8f280e698..97b7f9692 100644
--- a/src/empathy-account-assistant.c
+++ b/src/empathy-account-assistant.c
@@ -324,19 +324,9 @@ account_assistant_apply_account_cb (GObject *source,
EmpathyAccountAssistantPriv *priv = GET_PRIV (self);
EmpathyAccountSettings *settings = EMPATHY_ACCOUNT_SETTINGS (source);
TpAccount *account;
- gchar *display_name;
empathy_account_settings_apply_finish (settings, result, &error);
- /* set default display name */
- display_name = empathy_account_widget_get_default_display_name (
- priv->current_widget_object);
-
- empathy_account_settings_set_display_name_async (settings,
- display_name, NULL, NULL);
-
- g_free (display_name);
-
priv->is_creating = FALSE;
if (error != NULL)
@@ -358,12 +348,22 @@ account_assistant_apply_account_and_finish (EmpathyAccountAssistant *self,
EmpathyAccountSettings *settings)
{
EmpathyAccountAssistantPriv *priv = GET_PRIV (self);
+ gchar *display_name;
if (settings == NULL)
return;
priv->is_creating = TRUE;
+ /* set default display name */
+ display_name = empathy_account_widget_get_default_display_name (
+ priv->current_widget_object);
+
+ empathy_account_settings_set_display_name_async (settings,
+ display_name, NULL, NULL);
+
+ g_free (display_name);
+
empathy_account_settings_apply_async (settings,
account_assistant_apply_account_cb, self);
}