]> git.0d.be Git - empathy.git/commitdiff
Make empathy_contact_set_avatar() private
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Mon, 23 Aug 2010 11:09:53 +0000 (12:09 +0100)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Tue, 24 Aug 2010 09:29:28 +0000 (10:29 +0100)
libempathy/empathy-contact.c
libempathy/empathy-contact.h

index 6c703acde61578bfce34ce940458aee7397002c6..718274a598efcba49c9401362e97f1e4fb71155b 100644 (file)
@@ -85,6 +85,8 @@ static void empathy_contact_set_location (EmpathyContact *contact,
 static void set_capabilities_from_tp_caps (EmpathyContact *self,
     TpCapabilities *caps);
 
+static void contact_set_avatar (EmpathyContact *contact,
+    EmpathyAvatar *avatar);
 static void contact_set_avatar_from_tp_contact (EmpathyContact *contact);
 
 G_DEFINE_TYPE (EmpathyContact, empathy_contact, G_TYPE_OBJECT);
@@ -266,7 +268,7 @@ empathy_contact_class_init (EmpathyContactClass *class)
         "Avatar image",
         "The avatar image",
         EMPATHY_TYPE_AVATAR,
-        G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+        G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (object_class,
       PROP_PRESENCE,
@@ -478,9 +480,6 @@ contact_set_property (GObject *object,
       case PROP_ALIAS:
         empathy_contact_set_alias (contact, g_value_get_string (value));
         break;
-      case PROP_AVATAR:
-        empathy_contact_set_avatar (contact, g_value_get_boxed (value));
-        break;
       case PROP_PRESENCE:
         empathy_contact_set_presence (contact, g_value_get_uint (value));
         break;
@@ -724,9 +723,9 @@ empathy_contact_get_avatar (EmpathyContact *contact)
   return priv->avatar;
 }
 
-void
-empathy_contact_set_avatar (EmpathyContact *contact,
-                            EmpathyAvatar *avatar)
+static void
+contact_set_avatar (EmpathyContact *contact,
+                    EmpathyAvatar *avatar)
 {
   EmpathyContactPriv *priv;
 
@@ -1199,7 +1198,7 @@ empathy_contact_load_avatar_cache (EmpathyContact *contact,
       DEBUG ("Avatar loaded from %s", filename);
       avatar = empathy_avatar_new ((guchar *) data, len, NULL, g_strdup (token),
           filename);
-      empathy_contact_set_avatar (contact, avatar);
+      contact_set_avatar (contact, avatar);
       empathy_avatar_unref (avatar);
     }
   else
@@ -1668,12 +1667,12 @@ contact_set_avatar_from_tp_contact (EmpathyContact *contact)
       g_file_load_contents (file, NULL, &data, &len, NULL, NULL);
       avatar = empathy_avatar_new ((guchar *) data, len, g_strdup (mime), g_strdup (token),
           g_file_get_path (file));
-      empathy_contact_set_avatar (contact, avatar);
+      contact_set_avatar (contact, avatar);
       empathy_avatar_unref (avatar);
     }
   else
     {
-      empathy_contact_set_avatar (contact, NULL);
+      contact_set_avatar (contact, NULL);
     }
 }
 
index c65e0871f1d90eaa1d48599c084554d88e01fa0c..1117d7f82a0da3a402b01d2b739b46868e0b727e 100644 (file)
@@ -83,8 +83,6 @@ void empathy_contact_set_alias (EmpathyContact *contact, const gchar *alias);
 void empathy_contact_change_group (EmpathyContact *contact, const gchar *group,
     gboolean is_member);
 EmpathyAvatar * empathy_contact_get_avatar (EmpathyContact *contact);
-void empathy_contact_set_avatar (EmpathyContact *contact,
-    EmpathyAvatar *avatar);
 TpAccount * empathy_contact_get_account (EmpathyContact *contact);
 FolksPersona * empathy_contact_get_persona (EmpathyContact *contact);
 void empathy_contact_set_persona (EmpathyContact *contact,