From 0ef611623d30cd227232a856dc66337a812d09a6 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Sat, 3 Nov 2007 00:43:37 +0200 Subject: [PATCH] Changes to how mouse button works. Pan with button down, double click centers. --- src/map.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/map.c b/src/map.c index 3247d01..d027167 100644 --- a/src/map.c +++ b/src/map.c @@ -1167,14 +1167,15 @@ _cmenu_position_y = event->y + 0.5; switch (event->button) { case 1: if (event->type==GDK_2BUTTON_PRESS) { - map_set_zoom(_zoom - 1); + map_center_unit(x2unit((gint) (event->x + 0.5)), y2unit((gint) (event->y + 0.5))); return FALSE; } if (event->type==GDK_3BUTTON_PRESS) return FALSE; + map_drag_start(event->x, event->y); break; case 2: - map_drag_start(event->x, event->y); + map_set_zoom(_zoom - 1); break; case 3: #ifndef WITH_HILDON @@ -1206,14 +1207,14 @@ case 1: case MAP_MODE_SET_ROUTE_TO: break; default: + map_drag_stop(event->x, event->y); + map_render_data(); break; } - g_idle_add((GSourceFunc)map_update_location_from_center, NULL); - map_center_unit(x2unit((gint) (event->x + 0.5)), y2unit((gint) (event->y + 0.5))); + g_idle_add_full(G_PRIORITY_HIGH_IDLE,(GSourceFunc)map_update_location_from_center, NULL, NULL); break; case 2: - map_drag_stop(event->x, event->y); - map_render_data(); + /* */ break; case 3: break; -- 2.39.5