diff options
author | Pierre-Luc Beaudoin <pierre-luc@pierlux.com> | 2008-12-17 06:41:40 +0800 |
---|---|---|
committer | Pierre-Luc Beaudoin <pierre-luc@pierlux.com> | 2009-05-28 00:52:04 +0800 |
commit | 1ad83ec843cb36808310afb5fe9e5ea296d3f0fb (patch) | |
tree | adb4a2934bdd9819a68e40ee10e9c7dd34e877bc /libempathy-gtk/empathy-contact-widget.c | |
parent | 62993977a9409a995e2dfdbadbb90a759e032489 (diff) | |
download | gsoc2013-empathy-1ad83ec843cb36808310afb5fe9e5ea296d3f0fb.tar gsoc2013-empathy-1ad83ec843cb36808310afb5fe9e5ea296d3f0fb.tar.gz gsoc2013-empathy-1ad83ec843cb36808310afb5fe9e5ea296d3f0fb.tar.bz2 gsoc2013-empathy-1ad83ec843cb36808310afb5fe9e5ea296d3f0fb.tar.lz gsoc2013-empathy-1ad83ec843cb36808310afb5fe9e5ea296d3f0fb.tar.xz gsoc2013-empathy-1ad83ec843cb36808310afb5fe9e5ea296d3f0fb.tar.zst gsoc2013-empathy-1ad83ec843cb36808310afb5fe9e5ea296d3f0fb.zip |
Add marker on map
Diffstat (limited to 'libempathy-gtk/empathy-contact-widget.c')
-rw-r--r-- | libempathy-gtk/empathy-contact-widget.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index faa6b1bea..90fb7ba9e 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -1239,6 +1239,8 @@ contact_widget_location_update (EmpathyContactWidget *information) GHashTable *location = empathy_contact_get_location (information->contact); GValue *value; gdouble lat, lon; + ClutterActor *marker; + ChamplainLayer *layer; value = g_hash_table_lookup (location, EMPATHY_LOCATION_LAT); if (value == NULL) @@ -1292,6 +1294,14 @@ contact_widget_location_update (EmpathyContactWidget *information) g_object_set (G_OBJECT (information->map_view), "show-license", FALSE, NULL); + layer = champlain_layer_new (); + champlain_view_add_layer (CHAMPLAIN_VIEW (information->map_view), layer); + + marker = champlain_marker_new_with_label ( + empathy_contact_get_name (information->contact), NULL, NULL, NULL); + champlain_marker_set_position (CHAMPLAIN_MARKER (marker), lat, lon); + clutter_container_add (CLUTTER_CONTAINER (layer), marker, NULL); + champlain_view_center_on (CHAMPLAIN_VIEW(information->map_view), lat, lon); gtk_widget_show_all (information->vbox_location); } |