mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-30 11:42:54 +03:00
Thu May 21 00:09:45 1998 Norbert Warmuth <k3190@fh-sw.de>
* menu.c (menubar_event): Don't set menubar->selected to the invalid value -1. Fix for the bug reported by root@liepa.soften.ktu.lt * menu.c (menubar_drop_compute): removed the check for inrange items which isn't necessary any longer.
This commit is contained in:
parent
d6e872a113
commit
5baf384554
@ -1,3 +1,11 @@
|
||||
Thu May 21 00:09:45 1998 Norbert Warmuth <k3190@fh-sw.de>
|
||||
|
||||
* menu.c (menubar_event): Don't set menubar->selected to the
|
||||
invalid value -1. Fix for the bug reported by root@liepa.soften.ktu.lt
|
||||
|
||||
* menu.c (menubar_drop_compute): removed the check for inrange
|
||||
items which isn't necessary any longer.
|
||||
|
||||
Wed May 20 16:27:56 1998 Norbert Warmuth <k3190@fh-sw.de>
|
||||
|
||||
* widget.c (history_put): input line history was defunct because
|
||||
|
@ -68,14 +68,10 @@ Menu create_menu (char *name, menu_entry *entries, int count)
|
||||
|
||||
static void menubar_drop_compute (WMenu *menubar)
|
||||
{
|
||||
Menu menu;
|
||||
const Menu menu = menubar->menu [menubar->selected];
|
||||
int max_entry_len = 0;
|
||||
int i;
|
||||
|
||||
if (menubar->selected == -1)
|
||||
return;
|
||||
|
||||
menu = menubar->menu [menubar->selected];
|
||||
for (i = 0; i < menu->count; i++)
|
||||
max_entry_len = max (max_entry_len, strlen (menu->entries [i].text));
|
||||
menubar->max_entry_len = max_entry_len = max (max_entry_len, 20);
|
||||
@ -396,7 +392,8 @@ menubar_event (Gpm_Event *event, WMenu *menubar)
|
||||
)
|
||||
new_selection++;
|
||||
|
||||
--new_selection;
|
||||
if (new_selection) /* Don't set the invalid value -1 */
|
||||
--new_selection;
|
||||
|
||||
if (!was_active){
|
||||
menubar->selected = new_selection;
|
||||
|
Loading…
x
Reference in New Issue
Block a user