wprintw(menu->mw, ftm, args) to generate the menu label.
Allows static menu labels to contain the current value (like a lot of the
dynamic menus do).
Correct width calculations, and bound menu table lookup.
(Needs a libcurses fix as well).
No need to ponce about with __m_endwin (to remember we've done endwin()),
the old recovery was wrong in any case - but I've left something that
will do an explicit redraw.
Allow the 'help' text to be from a variable (and hence translated).
Fix the display of help so that the screen underneath is actually cleared.
Preserve the screen contents while displaying help - redraw is too hard.
Use endwin(); doupdate(); to do the full refresh when ^L is typed.
Move menus up the screen if they would hit the bottom with too few lines
to show an item and the scroll text (happens with big titles).
Make 'y=0' center the window vertically - use of 0 means you can't have
a menu starting on the topline, but this is unlikely to be a problem.
Make all the menu options settable from the control file, not just from
dynamic menus.
Redo menu option list part of man page.
is fast enough anyway. Lets the calling code change some fields (eg
the title for the 'yes/no' menu) between calls.
- Don't update m->x, m->y, m->w the changed values aren't needed once
the window has been created.
- Allow the window title to span multiple lines.
- Fix a nasty bug caused by having pointers into the memory area freed
by realloc when creating lots of dynamic menus.
- Fix check that ought to have allowed dynamic menus to be deleted.
Make y == -1 => after current messages (if msg_defs.h included).
Defer menu initialisation until after post_act() called (so function can
fiddle with more things.)
Let 'display action' routine set menu->cursel (ie default menu item).
Remove 'opt' parameter I added to action routine (not that useful).
Make man page slightly closer to reality.
- pass 'menudesc' and 'arg' values to post_act() and exit_act()
- add set_menu_numopt() for variable length menus
- fix (badly broken) allocation/free of dynamic menus
- option to allow default selection to be the exit line
Correct calculation of menu height and whether scrolling needs (was wrong
if a height was specified that was smaller that the number of lines needed).
Move keypad(m->mw, TRUE) to stop core dump when newwin() fails.
Allow for calling code hacking m->h (to reduce number of lines displayed).
Add a MC_NOCLEAR option to leave menu text showing when doing action.
than *'s.
2) On displays that handle color, do a cheesy white-on-blue theme.
As silly as it may seem, many people seem to respond better to color
and nice borders for sysinst.
XXX will rig up a way to do this more cleanly.
* bring closer to KNF
* when selecting a item in a menu, call the opt_action() callback with
a pointer to the struct menudesc, so the callback has a chance to find
out which item was selected. Having a seperate callback for each
item is ok for small menus, but not for ones with many objects.
* Add menu-option MC_NOSHORTCUT to not print letters ("a: ", ...)
in front of list items. Again, this is for menues with lots of entries
as e.g. the upcoming sysinst set_timezone() function composes.
* Fix a long-standing bug WRT pagewise scrolling - the cursor is now
properly placed one page up/down
via initscr() by calling t_getstr() with curses' internal terminal info
initialized in setterm() (which is called by initscr()).
XXX THIS IS A HORRIBLE KLUDGE! ...and I'm almost embarassed to commit it.
XXX It really should be fixed by using normal curses facilities.
(say width or height).
* work harder to make menu fit width-wise. (if necessary, move the menu
further left, and if that's not good enough exit with an error.)
* move menu system initialization out of process_menu() so that it can
be called earlier (e.g. by the sysinst main()), since it initializes
curses and other code might want to access the curses data structures
before process_menu() is invoked.