import com.trolltech.qt.gui.QPixmap;
import com.trolltech.qt.gui.QPrintDialog;
import com.trolltech.qt.gui.QPrinter;
-import com.trolltech.qt.gui.QProgressBar;
import com.trolltech.qt.gui.QSizePolicy;
import com.trolltech.qt.gui.QSizePolicy.Policy;
import com.trolltech.qt.gui.QSpinBox;
import cx.fbn.nevernote.gui.TagTreeWidget;
import cx.fbn.nevernote.gui.Thumbnailer;
import cx.fbn.nevernote.gui.TrashTreeWidget;
+import cx.fbn.nevernote.gui.controls.QuotaProgressBar;
import cx.fbn.nevernote.sql.DatabaseConnection;
import cx.fbn.nevernote.sql.WatchFolderRecord;
import cx.fbn.nevernote.threads.IndexRunner;
public QToolBar toolBar; // The tool bar under the menu
QComboBox searchField; // search filter bar on the toolbar;
boolean searchPerformed = false; // Search was done?
- QProgressBar quotaBar; // The current quota usage
+ QuotaProgressBar quotaBar; // The current quota usage
ApplicationLogger logger;
List<String> selectedNotebookGUIDs; // List of notebook GUIDs
searchField.setDuplicatesEnabled(false);
searchField.editTextChanged.connect(this,"searchFieldTextChanged(String)");
- quotaBar = new QProgressBar();
+ quotaBar = new QuotaProgressBar();
// Setup the thumbnail viewer
thumbnailViewer = new ThumbnailViewer();
noteTableView.resetViewport.connect(this, "scrollToCurrentGuid()");
noteTableView.doubleClicked.connect(this, "listDoubleClick()");
listManager.trashSignal.countChanged.connect(trashTree, "updateCounts(Integer)");
+
+ quotaBar.setMouseClickAction(menuBar.accountAction);
+
trashTree.load();
trashTree.itemSelectionChanged.connect(this, "trashTreeSelection()");
trashTree.setEmptyAction(menuBar.emptyTrashAction);
if (currentNoteGuid == null)
currentNoteGuid = new String();
+ //determine current note guid
for (Note note : listManager.getNoteIndex()) {
tempNoteGuid = note.getGuid();
if (currentNoteGuid.equals(tempNoteGuid)) {
- saveCurrentNoteGuid = new String(tempNoteGuid);
+ saveCurrentNoteGuid = tempNoteGuid;
}
}
browserWindow.setDisabled(true);
}
- if (saveCurrentNoteGuid.equals("") && listManager.getNoteIndex().size() >0) {
- currentNoteGuid = listManager.getNoteIndex().get(listManager.getNoteIndex().size()-1).getGuid();
+ if (saveCurrentNoteGuid.equals("") && listManager.getNoteIndex().size() > 0) {
currentNote = listManager.getNoteIndex().get(listManager.getNoteIndex().size()-1);
+ currentNoteGuid = currentNote.getGuid();
refreshEvernoteNote(true);
} else {
- refreshEvernoteNote(false);
+ //we can reload if note not dirty
+ refreshEvernoteNote(!noteDirty);
}
reloadTagTree(false);
browserWindow.setReadOnly(true);
return;
}
+
if (!reload)
return;