From 59f72d14daf897583c421517ddbecce04fe1e0b8 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Wed, 2 Jan 2008 15:38:35 +0200 Subject: [PATCH] Use idle cb for map zoom in/out. Set zoom level when going to home or to destination. --- src/cb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cb.c b/src/cb.c index ab65113..60d507b 100644 --- a/src/cb.c +++ b/src/cb.c @@ -291,6 +291,7 @@ menu_cb_goto_home(GtkAction *action) if (map_goto_position(&_home)==FALSE) { MACRO_BANNER_SHOW_INFO(_window, _("Home not set.")); } else { + map_set_zoom(3); MACRO_BANNER_SHOW_INFO(_window, _("At home location")); } return TRUE; @@ -302,6 +303,7 @@ menu_cb_goto_destination(GtkAction *action) if (map_goto_position(&_dest)==FALSE) { MACRO_BANNER_SHOW_INFO(_window, _("Destination not set.")); } else { + map_set_zoom(3); MACRO_BANNER_SHOW_INFO(_window, _("At destination")); } return TRUE; @@ -405,7 +407,7 @@ gboolean cb_zoomin(GtkAction * action) { map_set_autozoom(FALSE); -map_zoom(-1); +g_idle_add((GSourceFunc)map_zoom_in, NULL); return TRUE; } @@ -413,7 +415,7 @@ gboolean cb_zoomout(GtkAction * action) { map_set_autozoom(FALSE); -map_zoom(1); +g_idle_add((GSourceFunc)map_zoom_out, NULL); return TRUE; } -- 2.39.5