// If confirmed, delete the notebook
for (int i=selections.size()-1; i>=0; i--) {
QTreeWidgetItem currentSelection;
currentSelection = selections.get(i);
String guid = currentSelection.text(2);
if (currentSelection.text(2).equalsIgnoreCase("STACK")) {
conn.getNotebookTable().renameStacks(currentSelection.text(0), "");
listManager.renameStack(currentSelection.text(0), "");
} else {
conn.getNotebookTable().expungeNotebook(guid, true);
listManager.deleteNotebook(guid);