[project @ 2006-02-22 13:03:57 by rjw]

Make clicks on the recent URL menu move selected item to the top.

svn path=/import/netsurf/; revision=2090
This commit is contained in:
Richard Wilson 2006-02-22 13:03:57 +00:00
parent 3d9a1198db
commit 6390393bee
1 changed files with 7 additions and 4 deletions

View File

@ -597,6 +597,7 @@ void ro_gui_menu_selection(wimp_selection *selection) {
wimp_menu *menu; wimp_menu *menu;
os_error *error; os_error *error;
int previous_menu_icon = current_menu_icon; int previous_menu_icon = current_menu_icon;
char *url;
/* if we are using gui_multitask then menu selection events /* if we are using gui_multitask then menu selection events
@ -621,10 +622,12 @@ void ro_gui_menu_selection(wimp_selection *selection) {
/* perform non-automated actions */ /* perform non-automated actions */
if (current_menu == url_suggest_menu) { if (current_menu == url_suggest_menu) {
g = ro_gui_toolbar_lookup(current_menu_window); g = ro_gui_toolbar_lookup(current_menu_window);
if (g) if (g) {
browser_window_go(g->bw, url = url_suggest_menu->entries[selection->items[0]].data.indirected_text.text;
url_suggest_menu->entries[selection->items[0]]. gui_window_set_url(g, url);
data.indirected_text.text, 0); browser_window_go(g->bw, url, 0);
global_history_add_recent(url);
}
} else if ((current_menu == gui_form_select_menu) && } else if ((current_menu == gui_form_select_menu) &&
(selection->items[0] >= 0)) { (selection->items[0] >= 0)) {
g = ro_gui_window_lookup(current_menu_window); g = ro_gui_window_lookup(current_menu_window);