" enter view/edit item\n",
" a add item\n",
" r / del remove selected items\n",
+" D duplicate item\n",
"\n",
" space select item\n",
" + select all\n",
return items < 1;
}
+int
+duplicate_item()
+{
+ int i;
+ list_item item;
+
+ if(curitem < 0)
+ return 1;
+
+ for(i = 0; i < ITEM_FIELDS; i++)
+ item[i] = database[curitem][i] ? strdup(database[curitem][i]) :
+ NULL;
+
+ if(add_item2database(item))
+ return 1;
+
+ curitem = LAST_ITEM;
+ refresh_list();
+
+ return 0;
+}
+
void invert_selection();
int list_current_item();
int list_is_empty();
+int duplicate_item();
enum {
case KEY_DC:
case 'd':
case 'r': ui_remove_items(); break;
+ case 'D': duplicate_item(); break;
case 12: refresh_screen(); break;
case 'k':