]> git.0d.be Git - empathy.git/commitdiff
Get the DisplayName when the account is ready
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Tue, 18 Aug 2009 15:47:04 +0000 (16:47 +0100)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>
Tue, 18 Aug 2009 15:57:37 +0000 (16:57 +0100)
libempathy/empathy-account-settings.c

index fbd0724d10b0e66fa149867d56bb2ab890bdbc4d..209f017b95db92201c6004693bf231c80ff00b7c 100644 (file)
@@ -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);