aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/gossip-contact.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy/gossip-contact.c')
-rw-r--r--libempathy/gossip-contact.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/libempathy/gossip-contact.c b/libempathy/gossip-contact.c
index 86b6ee6e0..82147f67e 100644
--- a/libempathy/gossip-contact.c
+++ b/libempathy/gossip-contact.c
@@ -460,6 +460,10 @@ gossip_contact_set_id (GossipContact *contact,
priv = GET_PRIV (contact);
+ if (priv->id && strcmp (id, priv->id) == 0) {
+ return;
+ }
+
g_free (priv->id);
priv->id = g_strdup (id);
@@ -477,6 +481,10 @@ gossip_contact_set_name (GossipContact *contact,
priv = GET_PRIV (contact);
+ if (priv->name && strcmp (name, priv->name) == 0) {
+ return;
+ }
+
g_free (priv->name);
priv->name = g_strdup (name);
@@ -493,6 +501,10 @@ gossip_contact_set_avatar (GossipContact *contact,
priv = GET_PRIV (contact);
+ if (priv->avatar == avatar) {
+ return;
+ }
+
if (priv->avatar) {
gossip_avatar_unref (priv->avatar);
priv->avatar = NULL;
@@ -516,6 +528,10 @@ gossip_contact_set_account (GossipContact *contact,
priv = GET_PRIV (contact);
+ if (account == priv->account) {
+ return;
+ }
+
if (priv->account) {
g_object_unref (priv->account);
}
@@ -534,6 +550,10 @@ gossip_contact_set_presence (GossipContact *contact,
priv = GET_PRIV (contact);
+ if (presence == priv->presence) {
+ return;
+ }
+
if (priv->presence) {
g_object_unref (priv->presence);
priv->presence = NULL;
@@ -581,6 +601,10 @@ gossip_contact_set_subscription (GossipContact *contact,
priv = GET_PRIV (contact);
+ if (priv->subscription == subscription) {
+ return;
+ }
+
priv->subscription = subscription;
g_object_notify (G_OBJECT (contact), "subscription");
@@ -596,6 +620,10 @@ gossip_contact_set_handle (GossipContact *contact,
priv = GET_PRIV (contact);
+ if (priv->handle == handle) {
+ return;
+ }
+
priv->handle = handle;
g_object_notify (G_OBJECT (contact), "handle");