{
if (menu->dialog)
{
- strncpy (s, menu->dialog[i], l);
+ strncpy (s, NONULL (menu->dialog[i]), l);
menu->current = -1; /* hide menubar */
}
else
FREE (p); /* __FREE_CHECKED__ */
}
+void mutt_menu_add_dialog_row (MUTTMENU *m, const char *row)
+{
+ if (m->dsize <= m->max)
+ {
+ m->dsize += 10;
+ safe_realloc (&m->dialog, m->dsize * sizeof (char *));
+ }
+ m->dialog[m->max++] = safe_strdup (row);
+}
+
static MUTTMENU *get_current_menu (void)
{
return MenuStackCount ? MenuStack[MenuStackCount - 1] : NULL;
* prompt keys override movement keys.
*/
char **dialog; /* dialog lines themselves */
+ int dsize; /* number of allocated dialog lines */
char *prompt; /* prompt for user, similar to mutt_multi_choice */
char *keys; /* keys used in the prompt */
MUTTMENU *mutt_new_menu (int);
void mutt_menuDestroy (MUTTMENU **);
+void mutt_menu_add_dialog_row (MUTTMENU *, const char *);
void mutt_push_current_menu (MUTTMENU *);
void mutt_pop_current_menu (MUTTMENU *);
void mutt_set_current_menu_redraw (int);