[gnome-system-tools/rendering-cleanup: 14/20] e-map: Introduce e_map_get_current_location()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-tools/rendering-cleanup: 14/20] e-map: Introduce e_map_get_current_location()
- Date: Tue, 5 Oct 2010 16:41:22 +0000 (UTC)
commit 8eca3325e1606ae0ff11947b23b9d1c012f41012
Author: Benjamin Otte <otte redhat com>
Date: Tue Oct 5 16:03:49 2010 +0200
e-map: Introduce e_map_get_current_location()
... and use it when zooming out
src/time/e-map/e-map.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/src/time/e-map/e-map.c b/src/time/e-map/e-map.c
index 0f96b0a..0c3387b 100644
--- a/src/time/e-map/e-map.c
+++ b/src/time/e-map/e-map.c
@@ -1376,28 +1376,28 @@ zoom_in (EMap *map)
}
static void
-zoom_out (EMap *map)
+e_map_get_current_location (EMap *map, double *longitude, double *latitude)
{
GtkAllocation allocation;
- GdkRectangle area;
+
+ gtk_widget_get_allocation (GTK_WIDGET (map), &allocation);
+
+ e_map_window_to_world (map,
+ allocation.width / 2.0, allocation.height / 2.0,
+ longitude, latitude);
+}
+
+static void
+zoom_out (EMap *map)
+{
EMapPrivate *priv;
gdouble longitude, latitude;
gdouble x, y;
priv = map->priv;
- gtk_widget_get_allocation (GTK_WIDGET (map), &allocation);
-
- area.x = 0;
- area.y = 0;
- area.width = allocation.width;
- area.height = allocation.height;
-
/* Must be done before update_render_surface() */
-
- e_map_window_to_world (
- map, area.width / 2, area.height / 2,
- &longitude, &latitude);
+ e_map_get_current_location (map, &longitude, &latitude);
priv->zoom_state = E_MAP_ZOOMED_OUT;
update_render_surface (map, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]