diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-03-10 12:04:37 +0100 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-05-16 11:09:08 +1000 |
commit | c2b38a596964d24b0532ba0468ab89252799faf5 (patch) | |
tree | 33ae4433f7d6c9dfe5816720bfe1791ebec8622c | |
parent | c5cdcf1222c7b879460e6b2951ba9001f43e82f1 (diff) | |
download | empathy-c2b38a596964d24b0532ba0468ab89252799faf5.tar.gz |
don't update Alias.Nickname if not needed
-rw-r--r-- | libempathy-gtk/empathy-contact-widget.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index 19956c3ef..4377390ee 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -1076,11 +1076,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 { |