[gthumb] map view: added a scale on the map
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] map view: added a scale on the map
- Date: Tue, 20 Mar 2012 16:51:26 +0000 (UTC)
commit 3a0c8e0eb38dc47533ee25840ce3e2a0801486fb
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Mar 18 11:45:20 2012 +0100
map view: added a scale on the map
extensions/map_view/gth-map-view.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/extensions/map_view/gth-map-view.c b/extensions/map_view/gth-map-view.c
index 1d61561..2aac73d 100644
--- a/extensions/map_view/gth-map-view.c
+++ b/extensions/map_view/gth-map-view.c
@@ -263,6 +263,8 @@ gth_map_view_class_init (GthMapViewClass *klass)
static void
gth_map_view_init (GthMapView *self)
{
+ ClutterActor *scale;
+
self->priv = GTH_MAP_VIEW_GET_PRIVATE (self);
gtk_box_set_spacing (GTK_BOX (self), 6);
@@ -290,9 +292,17 @@ gth_map_view_init (GthMapView *self)
g_object_set (G_OBJECT (self->priv->map_view),
"reactive", TRUE,
"zoom-level", 5,
+ "zoom-on-double-click", TRUE,
"kinetic-mode", TRUE,
NULL);
+ scale = champlain_scale_new ();
+ champlain_scale_connect_view (CHAMPLAIN_SCALE (scale), self->priv->map_view);
+ champlain_view_bin_layout_add (self->priv->map_view,
+ scale,
+ CLUTTER_BIN_ALIGNMENT_START,
+ CLUTTER_BIN_ALIGNMENT_END);
+
self->priv->marker_layer = champlain_marker_layer_new ();
champlain_view_add_layer (self->priv->map_view, CHAMPLAIN_LAYER (self->priv->marker_layer));
clutter_actor_show (CLUTTER_ACTOR (self->priv->marker_layer));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]