aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>2009-05-12 12:10:34 +0800
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>2009-05-28 00:52:05 +0800
commit28107b1f3fc85df86d1325791804b27e9059d1d7 (patch)
tree985103cde836959516a2d3380d6f643f343a0b1a /src
parent3967ad986cf0a678f5fa918e7e995267ed71fa07 (diff)
downloadgsoc2013-empathy-28107b1f3fc85df86d1325791804b27e9059d1d7.tar
gsoc2013-empathy-28107b1f3fc85df86d1325791804b27e9059d1d7.tar.gz
gsoc2013-empathy-28107b1f3fc85df86d1325791804b27e9059d1d7.tar.bz2
gsoc2013-empathy-28107b1f3fc85df86d1325791804b27e9059d1d7.tar.lz
gsoc2013-empathy-28107b1f3fc85df86d1325791804b27e9059d1d7.tar.xz
gsoc2013-empathy-28107b1f3fc85df86d1325791804b27e9059d1d7.tar.zst
gsoc2013-empathy-28107b1f3fc85df86d1325791804b27e9059d1d7.zip
Update to use libchamplain 0.3's API
Diffstat (limited to 'src')
-rw-r--r--src/empathy-map-view.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c
index df2681c1a..6f89d7492 100644
--- a/src/empathy-map-view.c
+++ b/src/empathy-map-view.c
@@ -114,9 +114,9 @@ empathy_map_view_show ()
window->list_store = list_store;
/* Set up map view */
- window->map_view = CHAMPLAIN_VIEW (champlain_view_new (
- CHAMPLAIN_VIEW_MODE_KINETIC));
- g_object_set (G_OBJECT (window->map_view), "zoom-level", 1, NULL);
+ window->map_view = CHAMPLAIN_VIEW (champlain_view_new ());
+ g_object_set (G_OBJECT (window->map_view), "zoom-level", 1,
+ "scroll-mode", CHAMPLAIN_SCROLL_MODE_KINETIC, NULL);
champlain_view_center_on (window->map_view, 36, 0);
embed = champlain_view_embed_new (window->map_view);
@@ -125,7 +125,7 @@ empathy_map_view_show ()
gtk_widget_show_all (embed);
window->layer = champlain_layer_new ();
- champlain_view_add_layer (CHAMPLAIN_VIEW (window->map_view), window->layer);
+ champlain_view_add_layer (window->map_view, window->layer);
/* Set up contact list. */
model = GTK_TREE_MODEL (window->list_store);
@@ -268,7 +268,7 @@ map_view_marker_update (ChamplainMarker *marker,
lon = g_value_get_double (value);
clutter_actor_show (CLUTTER_ACTOR (marker));
- champlain_marker_set_position (marker, lat, lon);
+ champlain_base_marker_set_position (CHAMPLAIN_BASE_MARKER (marker), lat, lon);
}
@@ -297,6 +297,7 @@ map_view_contacts_foreach (GtkTreeModel *model,
GValue *value;
GdkPixbuf *avatar;
guint handle_id;
+ const gchar *name;
gtk_tree_model_get (model, iter, EMPATHY_CONTACT_LIST_STORE_COL_CONTACT,
&contact, -1);
@@ -317,9 +318,13 @@ map_view_contacts_foreach (GtkTreeModel *model,
{
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);
+ champlain_marker_set_image (CHAMPLAIN_MARKER (marker), texture);
}
+ else
+ champlain_marker_set_image (CHAMPLAIN_MARKER (marker), NULL);
+
+ name = empathy_contact_get_name (contact);
+ champlain_marker_set_text (CHAMPLAIN_MARKER (marker), name);
map_view_marker_update (CHAMPLAIN_MARKER (marker), contact);