]> uap-core.de Git - note.git/commitdiff
implement nbconfig notebook delete button
authorOlaf Wintermann <olaf.wintermann@gmail.com>
Sat, 26 Jul 2025 19:13:40 +0000 (21:13 +0200)
committerOlaf Wintermann <olaf.wintermann@gmail.com>
Sat, 26 Jul 2025 19:13:40 +0000 (21:13 +0200)
application/nbconfig.c

index 429e4af748ad014113d8fa71378f96986119e5a3..15c69bad446fe7220b2469af17a915bf56ec29ab 100644 (file)
@@ -222,7 +222,16 @@ static void nbconfig_notebooklist_name_changed(UiEvent *event, void *userdata) {
 }
 
 static void nbconfig_notebooklist_delete(UiEvent *event, void *userdata) {
+    NotebookConfigDialog *wdata = event->window;
+    NoteStore *store = note_store_get();
     
+    UiListSelection sel = ui_list_getselection(wdata->tab2_notebooks);
+    if(sel.count == 1) {
+        CxList *list = wdata->notebooks;
+        cxListRemove(list, sel.rows[0]);
+        nbconfig_update_lists(wdata);
+    }
+    ui_listselection_free(sel);
 }
 
 static void nbconfig_notebooklist_move_up(UiEvent *event, void *userdata) {