From b57afac7f4cfa2613fa73f684af1fd71477c2986 Mon Sep 17 00:00:00 2001 From: rikky Date: Fri, 18 Mar 2011 19:15:43 +0000 Subject: [PATCH] Fix:gui/internal:Pressing "back" key in menu root switches to map git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4364 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/gui/internal/gui_internal.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/navit/navit/gui/internal/gui_internal.c b/navit/navit/gui/internal/gui_internal.c index bf7b7f8..adf6c83 100644 --- a/navit/navit/gui/internal/gui_internal.c +++ b/navit/navit/gui/internal/gui_internal.c @@ -279,7 +279,7 @@ struct gui_priv { * The setting information read from the configuration file. * values of -1 indicate no value was specified in the config file. */ - struct gui_config_settings config; + struct gui_config_settings config; struct event_idle *idle; struct callback *motion_cb,*button_cb,*resize_cb,*keypress_cb,*window_closed_cb,*idle_cb, *motion_timeout_callback; struct event_timeout *motion_timeout_event; @@ -5255,7 +5255,10 @@ static void gui_internal_keypress(void *data, char *key) gui_internal_keynav_highlight_next(this,0,1); break; case NAVIT_KEY_BACK: - gui_internal_back(this, NULL, NULL); + if (g_list_length(this->root.children) > 1) + gui_internal_back(this, NULL, NULL); + else + gui_internal_prune_menu(this, NULL); break; case NAVIT_KEY_RETURN: if (this->highlighted && this->highlighted_menu == g_list_last(this->root.children)->data) -- 2.7.4