[empathy/mc5: 407/483] Get the DisplayName when the account is ready



commit 266a064e053e0e5795167e47d3c1bb026e303284
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Tue Aug 18 16:47:04 2009 +0100

    Get the DisplayName when the account is ready

 libempathy/empathy-account-settings.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c
index fbd0724..209f017 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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]