[empathy] Show contacts without an avatar
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] Show contacts without an avatar
- Date: Wed, 27 May 2009 12:55:16 -0400 (EDT)
commit f84dfa1e04ea5283d09ca03dd9416a93f005b5fb
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date: Wed Dec 31 16:17:49 2008 -0500
Show contacts without an avatar
---
src/empathy-map-view.c | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c
index 6ec67f9..a0ca3f5 100644
--- a/src/empathy-map-view.c
+++ b/src/empathy-map-view.c
@@ -337,23 +337,22 @@ map_view_contacts_foreach (GtkTreeModel *model,
g_object_set_data (G_OBJECT (contact), "map-view-handle",
GINT_TO_POINTER (handle_id));
- texture = clutter_texture_new ();
- avatar = empathy_pixbuf_avatar_from_contact_scaled (contact, 32, 32);
-
- if (!avatar)
- goto cleanup;
-
- gtk_clutter_texture_set_from_pixbuf (CLUTTER_TEXTURE (texture), avatar);
- clutter_actor_set_position (CLUTTER_ACTOR (texture), 5, 5);
-
clutter_container_add (CLUTTER_CONTAINER (marker), texture, NULL);
- clutter_actor_set_anchor_point (marker, 25, 50);
+ clutter_actor_set_anchor_point (marker, 16, 16);
+
+ avatar = empathy_pixbuf_avatar_from_contact_scaled (contact, 32, 32);
+ if (avatar)
+ {
+ texture = clutter_texture_new ();
+ gtk_clutter_texture_set_from_pixbuf (CLUTTER_TEXTURE (texture), avatar);
+ clutter_actor_set_position (CLUTTER_ACTOR (texture), 5, 5);
+ clutter_container_add (CLUTTER_CONTAINER (marker), texture, NULL);
+ }
map_view_marker_update (CHAMPLAIN_MARKER (marker), contact);
clutter_container_add (CLUTTER_CONTAINER (window->layer), marker, NULL);
-cleanup:
g_object_unref (contact);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]