static int badd_cback (int action) { char *s = select_new_item (); if (s) { listbox_add_item (l_listmode, 0, 0, s, NULL); } return 0; }
static int badd_cback (int action) { char *s = select_new_item (); if (s) { listbox_add_item (l_listmode, LISTBOX_APPEND_AT_END, 0, s, NULL, FALSE); g_free (s); } return 0; }
char *listmode_edit (char *oldlistformat) { char *newformat = NULL; char *s; s = strdup (oldlistformat); init_listmode (s); free (s); while (newformat == NULL) { /* display file info */ attrset (SELECTED_COLOR); run_dlg (listmode_dlg); switch (listmode_dlg->ret_value) { case B_CANCEL: newformat = strdup (oldlistformat); break; case B_ADD: s = select_new_item (); if (s) listbox_add_item (l_listmode, 0, 0, s, NULL); break; case B_REMOVE: listbox_remove_current (l_listmode, 0); break; case B_ENTER: newformat = collect_new_format (); break; } } listmode_done (); return newformat; }