aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-03-10 19:04:37 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-03-10 19:04:37 +0800
commit1e2ef0f3c681511d1b1e82a51f82b52b9414605f (patch)
tree17159bdddcc940384fb24be0e2c670f84488c81e /libempathy-gtk
parentaaa8d50fa75585a71d61332a8109916099ce35a4 (diff)
downloadgsoc2013-empathy-1e2ef0f3c681511d1b1e82a51f82b52b9414605f.tar
gsoc2013-empathy-1e2ef0f3c681511d1b1e82a51f82b52b9414605f.tar.gz
gsoc2013-empathy-1e2ef0f3c681511d1b1e82a51f82b52b9414605f.tar.bz2
gsoc2013-empathy-1e2ef0f3c681511d1b1e82a51f82b52b9414605f.tar.lz
gsoc2013-empathy-1e2ef0f3c681511d1b1e82a51f82b52b9414605f.tar.xz
gsoc2013-empathy-1e2ef0f3c681511d1b1e82a51f82b52b9414605f.tar.zst
gsoc2013-empathy-1e2ef0f3c681511d1b1e82a51f82b52b9414605f.zip
don't update Alias.Nickname if not needed
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-widget.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index b82ad1665..b956e223b 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -1228,11 +1228,18 @@ contact_widget_entry_alias_focus_event_cb (GtkEditable *editable,
if (empathy_contact_is_user (information->contact))
{
TpAccount * account;
+ const gchar *current_nickname;
account = empathy_contact_get_account (information->contact);
+ current_nickname = tp_account_get_nickname (account);
- DEBUG ("Set Account.Nickname to %s", alias);
- tp_account_set_nickname_async (account, alias, set_nickname_cb, NULL);
+ if (tp_strdiff (current_nickname, alias))
+ {
+ DEBUG ("Set Account.Nickname to %s", alias);
+
+ tp_account_set_nickname_async (account, alias, set_nickname_cb,
+ NULL);
+ }
}
else
{