From df0642420e12e08be78d78598d216e75171b06f5 Mon Sep 17 00:00:00 2001 From: Qball Cow Date: Fri, 3 Jul 2009 00:40:37 +0200 Subject: [PATCH] Highlight point on click --- src/gpx-viewer.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/gpx-viewer.c b/src/gpx-viewer.c index a86ae52..73b21ca 100644 --- a/src/gpx-viewer.c +++ b/src/gpx-viewer.c @@ -317,6 +317,7 @@ void map_zoom_level_change_value_cb(GtkSpinButton *spin, gpointer user_data) } } +#define MARKER_SIZE 10 static gboolean graph_point_remove(ClutterActor *marker) { clutter_actor_destroy(marker); @@ -331,7 +332,23 @@ static void graph_point_clicked(double lat_dec, double lon_dec) champlain_view_add_layer(view, marker_layer); } - ClutterActor *marker = champlain_marker_new_with_text("", "Seric 12", NULL, NULL); + GtkIconInfo *ii = gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(), + "gtk-find", + 24, 0); + + ClutterActor *marker = NULL; if(ii) { + gchar *path2 = gtk_icon_info_get_filename(ii); + if(path2) + { + marker = champlain_marker_new_from_file(path2, NULL); + champlain_marker_set_draw_background (CHAMPLAIN_MARKER (marker), FALSE); + } + } + if(!marker) + { + marker = champlain_marker_new (); + } + /* Create the marker */ champlain_base_marker_set_position(CHAMPLAIN_BASE_MARKER(marker), lat_dec, lon_dec); champlain_marker_set_color (CHAMPLAIN_MARKER (marker), &waypoint); clutter_container_add(CLUTTER_CONTAINER(marker_layer), CLUTTER_ACTOR(marker),NULL); -- 2.11.4.GIT