guint draw_width;
+ gboolean button_down;
+ gint mouse_x;
+ gint mouse_y;
+ gdouble mouse_lat;
+ gdouble mouse_lon;
+
gboolean fast_render;
guint key_zoom_new;
priv->show_markers=TRUE;
priv->show_location=TRUE;
+priv->button_down=FALSE;
priv->click_to_center=FALSE;
priv->zoom_in_on_2button=FALSE;
static gboolean
gtk_map_motion_notify_cb(GtkWidget *widget, GdkEventMotion *event, gpointer data)
{
+GtkMap *map;
+GtkMapPriv *priv;
+
+g_return_val_if_fail(GTK_IS_MAP(widget), FALSE);
+map=GTK_MAP(widget);
+priv=GTK_MAP_GET_PRIVATE(map);
+
+priv->mouse_x=(gint)event->x;
+priv->mouse_y=(gint)event->y;
+unit2latlon(x2unit((gint) (event->x+0.5)), y2unit((gint) (event->y+0.5)), priv->mouse_lat, priv->mouse_lon);
+
+g_debug("MOUSE: %d,%d (%f,%f)", priv->mouse_x, priv->mouse_y, priv->mouse_lat, priv->mouse_lon);
return FALSE;
}
switch (event->button) {
case 1:
+ priv->button_down=TRUE;
if (priv->click_to_center) {
gtk_map_set_center(widget, x2unit((gint) (event->x+0.5)), y2unit((gint) (event->y+0.5)));
return FALSE;
switch (event->button) {
case 1:
-
+ priv->button_down=FALSE;
break;
case 2: