View_Show_Trash // Show the trash window
View_Show_Editor_Button_Bar // Hide the editor button bar
View_Show_Left_Side F11 // Hide all left hand windows
+View_Toolbar // Show/hide the toolbar
Format_Bold Ctrl+B // Bold (duh)
Format_Underline Ctrl+U // Underline
TableView noteTableView; // List of notes (the widget).
public BrowserWindow browserWindow; // Window containing browser & labels
- QToolBar toolBar; // The tool bar under the menu
+ public QToolBar toolBar; // The tool bar under the menu
// QLineEdit searchField; // The search filter bar on the toolbar
QComboBox searchField; // search filter bar on the toolbar;
boolean searchPerformed = false; // Search was done?
searchPerformed = true;
logger.log(logger.HIGH, "Leaving NeverNote.searchFieldChanged");
}
+
+ //
+ @SuppressWarnings("unused")
+ private void toolbarViewToggle() {
+ Global.saveWindowVisible("toolBar", toolBar.isHidden());
+ }
// Build the window tool bar
private void setupToolBar() {
logger.log(logger.HIGH, "Entering NeverNote.setupToolBar");
- toolBar = addToolBar(tr("toolBar"));
+ toolBar = addToolBar(tr("Tool Bar"));
+
+ toolBar.setVisible(Global.isWindowVisible("toolBar"));
+ toolBar.toggleViewAction().changed.connect(this, "toolbarViewToggle()");
+ menuBar.setupToolBarVisible();
prevButton = toolBar.addAction("Previous");
QIcon prevIcon = new QIcon(iconPath+"back.png");
\r
}\r
\r
+ public void setupToolBarVisible() {\r
+ viewMenu.addAction(parent.toolBar.toggleViewAction());\r
+ setupShortcut(parent.toolBar.toggleViewAction(), "View_Toolbar");\r
+ }\r
\r
private void setupShortcut(QAction action, String text) {\r
if (!Global.shortcutKeys.containsAction(text))\r