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:45:39 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-03 18:45:39 +0800
commitb0ef41dd204e2841a3f1eeb6c5dca709f2e725b1 (patch)
tree4868b31f3eea5f9d9241ba4ba8ca24a588f7a77f /libempathy-gtk/empathy-account-widget.c
parentb31d50fb0533f178263d8ce111b56517dd0faf9a (diff)
downloadgsoc2013-empathy-b0ef41dd204e2841a3f1eeb6c5dca709f2e725b1.tar
gsoc2013-empathy-b0ef41dd204e2841a3f1eeb6c5dca709f2e725b1.tar.gz
gsoc2013-empathy-b0ef41dd204e2841a3f1eeb6c5dca709f2e725b1.tar.bz2
gsoc2013-empathy-b0ef41dd204e2841a3f1eeb6c5dca709f2e725b1.tar.lz
gsoc2013-empathy-b0ef41dd204e2841a3f1eeb6c5dca709f2e725b1.tar.xz
gsoc2013-empathy-b0ef41dd204e2841a3f1eeb6c5dca709f2e725b1.tar.zst
gsoc2013-empathy-b0ef41dd204e2841a3f1eeb6c5dca709f2e725b1.zip
account-widget: try to guess if the display name has been manually changed by the user
Diffstat (limited to 'libempathy-gtk/empathy-account-widget.c')
-rw-r--r--libempathy-gtk/empathy-account-widget.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 390884902..3b8741095 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -1631,6 +1631,7 @@ do_constructed (GObject *obj)
EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
TpAccount *account;
const gchar *protocol, *cm_name;
+ const gchar *display_name, *default_display_name;
guint i = 0;
struct {
const gchar *cm_name;
@@ -1780,6 +1781,16 @@ do_constructed (GObject *obj)
empathy_builder_unref_and_keep_widget (self->ui_details->gui,
self->ui_details->widget);
self->ui_details->gui = NULL;
+
+ display_name = empathy_account_settings_get_display_name (priv->settings);
+ default_display_name = empathy_account_widget_get_default_display_name (self);
+
+ if (tp_strdiff (display_name, default_display_name))
+ {
+ /* The display name of the account is not the one that we'd assign by
+ * default; assume that the user changed it manually */
+ g_object_set (priv->settings, "display-name-overridden", TRUE, NULL);
+ }
}
static void