aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-map.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-map.c')
-rw-r--r--widgets/misc/e-map.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index 17c1ecbb35..758d4f960c 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -124,11 +124,11 @@ static GtkWidgetClass *parent_class;
/**
* e_map_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the #EMap class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the #EMap class.
**/
@@ -608,10 +608,10 @@ e_map_key_press (GtkWidget *widget, GdkEventKey *event)
/**
* e_map_new:
- * @void:
- *
+ * @void:
+ *
* Creates a new empty map widget.
- *
+ *
* Return value: A newly-created map widget.
**/
@@ -635,7 +635,7 @@ e_map_new (void)
/* These functions translate coordinates between longitude/latitude and
* the image x/y offsets, using the equidistant cylindrical projection.
- *
+ *
* Longitude E <-180, 180]
* Latitude E <-90, 90] */
@@ -692,7 +692,7 @@ double
e_map_get_magnification (EMap *map)
{
EMapPrivate *priv;
-
+
priv = map->priv;
if (priv->zoom_state == E_MAP_ZOOMED_IN) return 2.0;
else return 1.0;
@@ -812,7 +812,7 @@ e_map_remove_point (EMap *map, EMapPoint *point)
update_render_pixbuf (map, GDK_INTERP_BILINEAR, TRUE);
repaint_point (map, point);
}
-
+
g_free (point);
}
@@ -878,11 +878,11 @@ e_map_point_is_in_view (EMap *map, EMapPoint *point)
if (!priv->map_render_pixbuf) return FALSE;
e_map_world_to_window (map, point->longitude, point->latitude, &x, &y);
-
+
if (x >= 0 && x < GTK_WIDGET (map)->allocation.width &&
y >= 0 && y < GTK_WIDGET (map)->allocation.height)
return TRUE;
-
+
return FALSE;
}
@@ -932,7 +932,7 @@ repaint_visible (EMap *map)
area.y = 0;
area.width = GTK_WIDGET (map)->allocation.width;
area.height = GTK_WIDGET (map)->allocation.height;
-
+
request_paint_area (map, &area);
}
@@ -1014,7 +1014,7 @@ update_render_pixbuf (EMap *map, GdkInterpType interp, gboolean render_overlays)
zoom, zoom, /* Scale (x, y) */
interp);
}
-
+
if (render_overlays)
{
/* Add points */
@@ -1056,7 +1056,7 @@ request_paint_area (EMap *view, GdkRectangle *area)
if (priv->yofs + height > gdk_pixbuf_get_height (priv->map_render_pixbuf))
height = gdk_pixbuf_get_height (priv->map_render_pixbuf) - priv->yofs;
-
+
/* We rely on the fast case always being the case, since we load and
* preprocess the source pixbuf ourselves */
@@ -1148,7 +1148,7 @@ repaint_point (EMap *map, EMapPoint *point)
GdkRectangle area;
double px, py;
- if (!e_map_point_is_in_view (map, point)) return;
+ if (!e_map_point_is_in_view (map, point)) return;
e_map_world_to_window (map, point->longitude, point->latitude, &px, &py);
@@ -1212,7 +1212,7 @@ smooth_center_at (EMap *map, int x, int y)
dx = (x < priv->xofs) ? -1 : (x > priv->xofs) ? 1 : 0;
dy = (y < priv->yofs) ? -1 : (y > priv->yofs) ? 1 : 0;
-
+
scroll_to (map, priv->xofs + dx, priv->yofs + dy);
}
}
@@ -1564,32 +1564,32 @@ zoom_in_smooth (EMap *map)
height = gdk_pixbuf_get_height (priv->map_render_pixbuf);
/* Center the target point as much as possible */
-
+
e_map_world_to_window (map, priv->zoom_target_long, priv->zoom_target_lat, &x, &y);
smooth_center_at (map, x + priv->xofs, y + priv->yofs);
/* Render and paint a temporary map without overlays, so they don't get in
* the way (look ugly) while zooming */
-
+
update_render_pixbuf (map, GDK_INTERP_BILINEAR, FALSE);
request_paint_area (map, &area);
-
+
/* Find out where in the area we're going to zoom to */
e_map_world_to_window (map, priv->zoom_target_long, priv->zoom_target_lat, &x, &y);
-
+
/* Pre-render the zoomed-in map, so we can put it there quickly when the
* blowup sequence ends */
-
+
priv->zoom_state = E_MAP_ZOOMED_IN;
update_render_pixbuf (map, GDK_INTERP_BILINEAR, TRUE);
-
+
/* Do the blowup */
-
+
blowup_window_area (window, priv->xofs, priv->yofs, x, y, width, height, 1.68);
/* Set new scroll offsets and paint the zoomed map */
-
+
e_map_world_to_window (map, priv->zoom_target_long, priv->zoom_target_lat, &x, &y);
priv->xofs = CLAMP (priv->xofs + x - area.width / 2.0, 0, E_MAP_GET_WIDTH (map) - area.width);
priv->yofs = CLAMP (priv->yofs + y - area.height / 2.0, 0, E_MAP_GET_HEIGHT (map) - area.height);
@@ -1673,7 +1673,7 @@ zoom_do (EMap *map)
/* if (e_map_get_smooth_zoom(map)) zoom_out_smooth(map); */
zoom_out (map);
}
-
+
g_signal_handlers_unblock_matched (priv->hadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, map);
g_signal_handlers_unblock_matched (priv->vadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, map);