[eog-plugins/map-plugin-fixes: 5/7] Add a jumpt to button to jump at the picture's location
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [eog-plugins/map-plugin-fixes: 5/7] Add a jumpt to button to jump at the picture's location
- Date: Fri, 5 Feb 2010 22:42:55 +0000 (UTC)
commit 05880fd225119200c7db49eb639e690ea123011d
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date: Fri Feb 5 17:27:44 2010 -0500
Add a jumpt to button to jump at the picture's location
plugins/map/eog-map-plugin.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/plugins/map/eog-map-plugin.c b/plugins/map/eog-map-plugin.c
index f2e6120..8a56b1f 100644
--- a/plugins/map/eog-map-plugin.c
+++ b/plugins/map/eog-map-plugin.c
@@ -250,6 +250,23 @@ selection_changed_cb (EogThumbView *view,
}
static void
+jump_to (GtkWidget *widget,
+ WindowData *data)
+{
+ gdouble lat, lon;
+
+ if (!data->marker)
+ return;
+
+ g_object_get (data->marker,
+ "latitude", &lat,
+ "longitude", &lon,
+ NULL);
+
+ champlain_view_center_on (data->map, lat, lon);
+}
+
+static void
zoom_in (GtkWidget *widget,
ChamplainView *view)
{
@@ -296,6 +313,17 @@ impl_activate (EogPlugin *plugin,
vbox = gtk_vbox_new (FALSE, 0);
bbox = gtk_toolbar_new ();
+
+ button = GTK_WIDGET (gtk_tool_button_new_from_stock (GTK_STOCK_JUMP_TO));
+ g_signal_connect (button,
+ "clicked",
+ G_CALLBACK (jump_to),
+ data);
+ gtk_container_add (GTK_CONTAINER (bbox), button);
+
+ button = GTK_WIDGET (gtk_separator_tool_item_new ());
+ gtk_container_add (GTK_CONTAINER (bbox), button);
+
button = GTK_WIDGET (gtk_tool_button_new_from_stock (GTK_STOCK_ZOOM_IN));
g_signal_connect (button,
"clicked",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]