aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-widget.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-03 18:46:30 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-03 18:46:30 +0800
commit1dab11523a8fffd546d154ca21c79a8c76d0c3c0 (patch)
treecfa53ccb32ca38aaf6342a46498f6305a071117f /libempathy-gtk/empathy-account-widget.c
parentb0ef41dd204e2841a3f1eeb6c5dca709f2e725b1 (diff)
downloadgsoc2013-empathy-1dab11523a8fffd546d154ca21c79a8c76d0c3c0.tar
gsoc2013-empathy-1dab11523a8fffd546d154ca21c79a8c76d0c3c0.tar.gz
gsoc2013-empathy-1dab11523a8fffd546d154ca21c79a8c76d0c3c0.tar.bz2
gsoc2013-empathy-1dab11523a8fffd546d154ca21c79a8c76d0c3c0.tar.lz
gsoc2013-empathy-1dab11523a8fffd546d154ca21c79a8c76d0c3c0.tar.xz
gsoc2013-empathy-1dab11523a8fffd546d154ca21c79a8c76d0c3c0.tar.zst
gsoc2013-empathy-1dab11523a8fffd546d154ca21c79a8c76d0c3c0.zip
update display name after editing if it hasn't been overridden (#603463)
Diffstat (limited to 'libempathy-gtk/empathy-account-widget.c')
-rw-r--r--libempathy-gtk/empathy-account-widget.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 3b8741095..e75c683b7 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -768,6 +768,7 @@ account_widget_apply_clicked_cb (GtkWidget *button,
EmpathyAccountWidget *self)
{
EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
+ gboolean display_name_overridden;
if (priv->radiobutton_reuse != NULL)
{
@@ -778,11 +779,15 @@ account_widget_apply_clicked_cb (GtkWidget *button,
empathy_account_settings_set_boolean (priv->settings, "register", !reuse);
}
- if (priv->creating_account)
+ g_object_get (priv->settings,
+ "display-name-overridden", &display_name_overridden, NULL);
+
+ if (priv->creating_account || !display_name_overridden)
{
gchar *display_name;
- /* set default display name */
+ /* set default display name for new accounts or update if user didn't
+ * manually override it. */
display_name = empathy_account_widget_get_default_display_name (self);
empathy_account_settings_set_display_name_async (priv->settings,