}
// Edit an existing notebook
@SuppressWarnings("unused")
private void stackNotebook() {
logger.log(logger.HIGH, "Entering NeverNote.stackNotebook");
StackNotebook edit = new StackNotebook();
List<QTreeWidgetItem> selections = notebookTree.selectedItems();
QTreeWidgetItem currentSelection;
for (int i=0; i<selections.size(); i++) {
currentSelection = selections.get(0);
String guid = currentSelection.text(2);
if (guid.equalsIgnoreCase("")) {
QMessageBox.critical(this, tr("Unable To Stack") ,tr("You can't stack the \"All Notebooks\" item."));
return;
}
if (guid.equalsIgnoreCase("STACK")) {
QMessageBox.critical(this, tr("Unable To Stack") ,tr("You can't stack a stack."));
return;
}
}
edit.setStackNames(conn.getNotebookTable().getAllStackNames());
edit.exec();
if (!edit.okPressed())
return;
String stack = edit.getStackName();
for (int i=0; i<selections.size(); i++) {
currentSelection = selections.get(i);
String guid = currentSelection.text(2);
listManager.updateNotebookStack(guid, stack);