X-Git-Url: http://git.sourceforge.jp/view?p=neighbornote%2FNeighborNote.git;a=blobdiff_plain;f=src%2Fcx%2Ffbn%2Fnevernote%2Fgui%2FMainMenuBar.java;h=93ded16fb55bdda976f604e756c6e4d05680fe91;hp=00cb2bf56643b59d55b9aa6cde2d783403eef96d;hb=ad713a090166940dce9635b8b15099ca447d8313;hpb=d3d6c4dce3deb05798ae8c49b2a2dcc8c2b8c5f9 diff --git a/src/cx/fbn/nevernote/gui/MainMenuBar.java b/src/cx/fbn/nevernote/gui/MainMenuBar.java index 00cb2bf..93ded16 100644 --- a/src/cx/fbn/nevernote/gui/MainMenuBar.java +++ b/src/cx/fbn/nevernote/gui/MainMenuBar.java @@ -31,7 +31,8 @@ public class MainMenuBar extends QMenuBar { public QAction printAction; // Action when a user selects Print from the file menu public QAction connectAction; // Connect/Disconnect to Evernote public QAction fullReindexAction; // Action when a user wants to reindex the entire database - public QAction synchronizeAction; // Synchronize data with Evernote + public QAction synchronizeAction; // Synchronize data with Evernote + public QAction selectiveSyncAction; // Specify which notebooks or tags to ignore public QAction settingsAction; // Show user config settings public QAction emailAction; // Action when a user selects "email" public QAction backupAction; // Backup the database @@ -39,6 +40,7 @@ public class MainMenuBar extends QMenuBar { public QAction emptyTrashAction; // Action when a user wants to clear the trash file public QAction exitAction; // Action when user selects "exit" public QAction aboutAction; // Action when a user selects "About" + public QAction checkForUpdates; // Check for newer versions public QAction loggerAction; // Action when a user selects "Log" public QAction releaseAction; // Release notes @@ -65,6 +67,9 @@ public class MainMenuBar extends QMenuBar { public QAction narrowListView; // View with list on the side public QAction thumbnailView; // view thumbnails public QAction hideSavedSearches; // show/hide saved searches + public QAction hideZoom; // show/hide the zoom spinner + public QAction hideSearch; // Show/hide the search window + public QAction hideQuota; // show/hide the quota window public QAction hideNotebooks; // show/hide notebooks public QAction hideTags; // show/hide tags public QAction hideAttributes; // show/hide note information @@ -101,15 +106,22 @@ public class MainMenuBar extends QMenuBar { public QAction notebookEditAction; // Edit the selected notebook public QAction notebookAddAction; // Add a new notebook public QAction notebookDeleteAction; // Delete a notebook + public QAction notebookPublishAction; // Publish a notebook + public QAction notebookShareAction; // Share a notebook with others public QAction notebookCloseAction; // Close notebooks + public QAction notebookIconAction; // Change the icon + public QAction notebookStackAction; // Stack/Unstack the icon. public QAction savedSearchAddAction; // Add a saved search public QAction savedSearchEditAction; // Edit a saved search public QAction savedSearchDeleteAction; // Delete a saved search + public QAction savedSearchIconAction; // Change a saved search icon public QAction tagEditAction; // Edit a tag public QAction tagAddAction; // Add a tag public QAction tagDeleteAction; // Delete a tag + public QAction tagIconAction; // Change the icon + public QAction tagMergeAction; // Merge tags //************************************************************************** //* Menu Bar Titles @@ -182,7 +194,7 @@ public class MainMenuBar extends QMenuBar { exitAction = new QAction(tr("Exit"), this); exitAction.setToolTip("Close the program"); - exitAction.triggered.connect(parent, "close()"); + exitAction.triggered.connect(parent, "closeNeverNote()"); exitAction.setShortcut("Ctrl+Q"); setupShortcut(exitAction, "File_Exit"); @@ -293,6 +305,27 @@ public class MainMenuBar extends QMenuBar { hideNotebooks.setCheckable(true); hideNotebooks.setChecked(true); setupShortcut(hideNotebooks, "View_Show_Notebooks"); + + hideZoom = new QAction(tr("Show Zoom"), this); + hideZoom.setToolTip("Show/Hide Zoom"); + hideZoom.triggered.connect(parent, "toggleZoomWindow()"); + hideZoom.setCheckable(true); + hideZoom.setChecked(true); + setupShortcut(hideZoom, "View_Show_Zoom"); + + hideQuota = new QAction(tr("Show Quota Bar"), this); + hideQuota.setToolTip("Show/Hide Quota"); + hideQuota.triggered.connect(parent, "toggleQuotaWindow()"); + hideQuota.setCheckable(true); + hideQuota.setChecked(true); + setupShortcut(hideQuota, "View_Show_Quota"); + + hideSearch = new QAction(tr("Show Search Box"), this); + hideSearch.setToolTip("Show/Hide Search Box"); + hideSearch.triggered.connect(parent, "toggleSearchWindow()"); + hideSearch.setCheckable(true); + hideSearch.setChecked(true); + setupShortcut(hideSearch, "View_Show_Search"); wideListView = new QAction(tr("Wide List View"), this); wideListView.setToolTip("Wide List Viwe"); @@ -446,14 +479,33 @@ public class MainMenuBar extends QMenuBar { notebookDeleteAction.triggered.connect(parent, "deleteNotebook()"); setupShortcut(notebookDeleteAction, "File_Notebook_Delete"); + notebookPublishAction = new QAction(tr("Share With The World"), this); + notebookPublishAction.setEnabled(false); + notebookPublishAction.setVisible(false); + notebookPublishAction.triggered.connect(parent, "publishNotebook()"); + setupShortcut(notebookPublishAction, "File_Notebook_Publish"); + + notebookShareAction = new QAction(tr("Share With Individuals"), this); + notebookShareAction.setEnabled(false); + notebookShareAction.setVisible(false); + notebookShareAction.triggered.connect(parent, "shareNotebook()"); + setupShortcut(notebookShareAction, "File_Notebook_Share"); + + notebookCloseAction = new QAction(tr("Open/Close Notebooks"), this); -// if (!Global.mimicEvernoteInterface) { - notebookCloseAction.setEnabled(true); - notebookCloseAction.triggered.connect(parent, "closeNotebooks()"); - setupShortcut(notebookCloseAction, "File_Notebook_Close"); -// } else { -// notebookCloseAction.setEnabled(false); -// } + notebookCloseAction.setEnabled(true); + notebookCloseAction.triggered.connect(parent, "closeNotebooks()"); + setupShortcut(notebookCloseAction, "File_Notebook_Close"); + + notebookIconAction = new QAction(tr("Change Icon"), this); + notebookIconAction.setEnabled(false); + notebookIconAction.triggered.connect(parent, "setNotebookIcon()"); + setupShortcut(notebookIconAction, "File_Notebook_Icon"); + + notebookStackAction = new QAction(tr("Set Stack"), this); + notebookStackAction.setEnabled(false); + notebookStackAction.triggered.connect(parent, "stackNotebook()"); + setupShortcut(notebookStackAction, "File_Notebook_Stack"); tagAddAction = new QAction(tr("Add"),this); tagAddAction.triggered.connect(parent, "addTag()"); @@ -470,6 +522,16 @@ public class MainMenuBar extends QMenuBar { tagDeleteAction.setEnabled(false); setupShortcut(tagDeleteAction, "File_Tag_Delete"); + tagIconAction = new QAction(tr("Change Icon"), this); + tagIconAction.triggered.connect(parent, "setTagIcon()"); + tagIconAction.setEnabled(false); + setupShortcut(tagIconAction, "File_Tag_Icon"); + + tagMergeAction = new QAction(tr("Merge Tags"), this); + tagMergeAction.triggered.connect(parent, "mergeTags()"); + tagMergeAction.setEnabled(false); + setupShortcut(tagMergeAction, "File_Tag_Merge"); + savedSearchAddAction = new QAction(tr("Add"),this); savedSearchAddAction.triggered.connect(parent, "addSavedSearch()"); setupShortcut(savedSearchAddAction, "File_SavedSearch_Add"); @@ -483,8 +545,12 @@ public class MainMenuBar extends QMenuBar { savedSearchDeleteAction.triggered.connect(parent, "deleteSavedSearch()"); savedSearchDeleteAction.setEnabled(false); setupShortcut(savedSearchDeleteAction, "File_SavedSearch_Delete"); + + savedSearchIconAction = new QAction(tr("Change Icon"), this); + savedSearchIconAction.triggered.connect(parent, "setSavedSearchIcon()"); + savedSearchIconAction.setEnabled(false); + setupShortcut(savedSearchIconAction, "File_SavedSearch_Icon"); - connectAction = new QAction(tr("Connect"), this); connectAction.setToolTip("Connect to Evernote"); connectAction.triggered.connect(parent, "remoteConnect()"); @@ -502,7 +568,11 @@ public class MainMenuBar extends QMenuBar { noteOnlineHistoryAction.setEnabled(false); setupShortcut(noteOnlineHistoryAction, "Online_Note_History"); - + selectiveSyncAction = new QAction(tr("Selective Synchronize"), this); + selectiveSyncAction.setToolTip("Selectively ignore some notes"); + selectiveSyncAction.triggered.connect(parent, "setupSelectiveSync()"); + selectiveSyncAction.setEnabled(false); + setupShortcut(synchronizeAction, "Online_Selective_Sync"); @@ -549,7 +619,7 @@ public class MainMenuBar extends QMenuBar { encryptDatabaseAction.setToolTip("Decrypt the database upon shutdown"); } - loggerAction = new QAction(tr("Log"), this); + loggerAction = new QAction(tr("Logs"), this); loggerAction.setToolTip("Show the detailed application log"); loggerAction.triggered.connect(parent, "logger()"); setupShortcut(loggerAction, "About_Log"); @@ -559,6 +629,11 @@ public class MainMenuBar extends QMenuBar { releaseAction.triggered.connect(parent, "releaseNotes()"); setupShortcut(releaseAction, "About_Release_Notes"); + checkForUpdates = new QAction(tr("Check For Updates"), this); + checkForUpdates.setToolTip("Check for newer versions"); + checkForUpdates.triggered.connect(parent, "checkForUpdates()"); + setupShortcut(checkForUpdates, "Help_Check_For_Updates"); + aboutAction = new QAction(tr("About"), this); aboutAction.setToolTip("About NeverNote"); aboutAction.triggered.connect(parent, "about()"); @@ -607,6 +682,9 @@ public class MainMenuBar extends QMenuBar { viewMenu.addAction(thumbnailView); viewMenu.addSeparator(); viewMenu.addAction(hideNoteList); + viewMenu.addAction(hideSearch); + viewMenu.addAction(hideQuota); + viewMenu.addAction(hideZoom); viewMenu.addAction(hideNotebooks); viewMenu.addAction(hideTags); viewMenu.addAction(hideAttributes); @@ -654,24 +732,34 @@ public class MainMenuBar extends QMenuBar { notebookMenu.addAction(notebookAddAction); notebookMenu.addAction(notebookEditAction); notebookMenu.addAction(notebookDeleteAction); -// if (!Global.mimicEvernoteInterface) { - notebookMenu.addSeparator(); - notebookMenu.addAction(notebookCloseAction); -// } + notebookMenu.addSeparator(); + notebookMenu.addAction(notebookPublishAction); + notebookMenu.addAction(notebookShareAction); + notebookMenu.addSeparator(); + notebookMenu.addAction(notebookStackAction); + notebookMenu.addAction(notebookCloseAction); + notebookMenu.addSeparator(); + notebookMenu.addAction(notebookIconAction); tagMenu.addAction(tagAddAction); tagMenu.addAction(tagEditAction); tagMenu.addAction(tagDeleteAction); + tagMenu.addAction(tagMergeAction); + tagMenu.addSeparator(); + tagMenu.addAction(tagIconAction); savedSearchMenu.addAction(savedSearchAddAction); savedSearchMenu.addAction(savedSearchEditAction); savedSearchMenu.addAction(savedSearchDeleteAction); + savedSearchMenu.addSeparator(); + savedSearchMenu.addAction(savedSearchIconAction); onlineMenu = addMenu(tr("&Online")); onlineMenu.addAction(synchronizeAction); onlineMenu.addAction(connectAction); onlineMenu.addSeparator(); onlineMenu.addAction(noteOnlineHistoryAction); + onlineMenu.addAction(selectiveSyncAction); toolsMenu = addMenu(tr("&Tools")); toolsMenu.addAction(spellCheckAction); @@ -687,6 +775,7 @@ public class MainMenuBar extends QMenuBar { helpMenu = addMenu(tr("&Help")); helpMenu.addAction(releaseAction); + helpMenu.addAction(checkForUpdates); helpMenu.addAction(loggerAction); helpMenu.addSeparator(); helpMenu.addAction(aboutAction);