[empathy] don't set display name if there is already one defined



commit e18077ddd872c65bcca5f755fce4abceb0eebfab
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Jan 20 15:54:24 2010 +0000

    don't set display name if there is already one defined
    
    Display name is already set for the salut account.

 src/empathy-account-assistant.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index b52acfe..3e56551 100644
--- a/src/empathy-account-assistant.c
+++ b/src/empathy-account-assistant.c
@@ -265,14 +265,17 @@ account_assistant_apply_account_cb (GObject *source,
 
   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);
+  if (empathy_account_settings_get_display_name (settings) == NULL)
+    {
+      /* 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);
+      empathy_account_settings_set_display_name_async (settings,
+          display_name, NULL, NULL);
 
-  g_free (display_name);
+      g_free (display_name);
+    }
 
   priv->is_creating = FALSE;
 



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