[project @ 2006-01-02 15:57:55 by rjw]

Only pass on selection changes.

svn path=/import/netsurf/; revision=1950
This commit is contained in:
Richard Wilson 2006-01-02 15:57:55 +00:00
parent 0f6fd9bba3
commit 9fb14f4d93
1 changed files with 5 additions and 6 deletions

View File

@ -363,21 +363,20 @@ bool ro_gui_wimp_event_menu_selection(wimp_w w, wimp_i i, wimp_menu *menu,
return false;
for (event = window->first; event; event = event->next)
if (event->i == i)
if ((event->type == EVENT_MENU_GRIGHT) && (event->i == i))
break;
if (!event)
return false;
if (event->type != EVENT_MENU_GRIGHT) {
LOG(("Incorrect or missing menu reference."));
return false;
}
menu_entry = &menu->entries[selection->items[0]];
for (i = 1; selection->items[i] != -1; i++)
menu_entry = &menu_entry->sub_menu->
entries[selection->items[i]];
/* if the entry is already ticked then we do nothing */
if (menu_entry->menu_flags & wimp_MENU_TICKED)
return true;
ro_gui_set_icon_string(window->w, event->data.menu_gright.field,
menu_entry->data.indirected_text.text);
ro_gui_wimp_event_prepare_menu(window->w, event);