From: Kaj-Michael Lang Date: Wed, 2 Jan 2008 13:38:35 +0000 (+0200) Subject: Use idle cb for map zoom in/out. Set zoom level when going to home or to destination. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59f72d14daf897583c421517ddbecce04fe1e0b8;p=mapper Use idle cb for map zoom in/out. Set zoom level when going to home or to destination. --- 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; }