From 266a064e053e0e5795167e47d3c1bb026e303284 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Tue, 18 Aug 2009 16:47:04 +0100 Subject: Get the DisplayName when the account is ready --- libempathy/empathy-account-settings.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'libempathy/empathy-account-settings.c') diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c index fbd0724d1..209f017b9 100644 --- a/libempathy/empathy-account-settings.c +++ b/libempathy/empathy-account-settings.c @@ -164,18 +164,14 @@ empathy_account_settings_constructed (GObject *object) { g_free (priv->cm_name); g_free (priv->protocol); - g_free (priv->display_name); priv->cm_name = g_strdup (empathy_account_get_connection_manager (priv->account)); priv->protocol = g_strdup (empathy_account_get_protocol (priv->account)); - priv->display_name = - g_strdup (empathy_account_get_display_name (priv->account)); } - g_assert (priv->cm_name != NULL && priv->protocol != NULL - && priv->display_name != NULL); + g_assert (priv->cm_name != NULL && priv->protocol != NULL); empathy_account_settings_check_readyness (self); @@ -342,6 +338,13 @@ empathy_account_settings_check_readyness (EmpathyAccountSettings *self) if (priv->manager == NULL) return; + if (priv->account != NULL) + { + g_free (priv->display_name); + priv->display_name = + g_strdup (empathy_account_get_display_name (priv->account)); + } + priv->tp_protocol = tp_connection_manager_get_protocol (priv->manager, priv->protocol); -- cgit v1.2.3