OSDN Git Service

Added the ability to view debugging logs.
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / gui / MainMenuBar.java
index 39a03d4..450ab24 100644 (file)
@@ -31,7 +31,8 @@ public class MainMenuBar extends QMenuBar {
        public QAction                  printAction;                            // Action when a user selects Print from the file menu\r
        public QAction                  connectAction;                          // Connect/Disconnect to Evernote\r
        public QAction                  fullReindexAction;                      // Action when a user wants to reindex the entire database\r
-       public QAction                  synchronizeAction;                      // Synchronize data with Evernote                                       \r
+       public QAction                  synchronizeAction;                      // Synchronize data with Evernote       \r
+       public QAction                  selectiveSyncAction;            // Specify which notebooks or tags to ignore\r
        public QAction                  settingsAction;                         // Show user config settings\r
        public QAction                  emailAction;                            // Action when a user selects "email"\r
        public QAction                  backupAction;                           // Backup the database\r
@@ -39,6 +40,7 @@ public class MainMenuBar extends QMenuBar {
        public QAction                  emptyTrashAction;                       // Action when a user wants to clear the trash file\r
        public QAction                  exitAction;                                     // Action when user selects "exit"\r
        public QAction                  aboutAction;                            // Action when a user selects "About"\r
+       public QAction                  checkForUpdates;                        // Check for newer versions\r
        public QAction                  loggerAction;                           // Action when a user selects "Log"\r
        public QAction                  releaseAction;                          // Release notes\r
 \r
@@ -101,8 +103,11 @@ public class MainMenuBar extends QMenuBar {
        public QAction                  notebookEditAction;                     // Edit the selected notebook\r
        public QAction                  notebookAddAction;                      // Add a new notebook\r
        public QAction                  notebookDeleteAction;           // Delete a notebook\r
+       public QAction                  notebookPublishAction;          // Publish a notebook\r
+       public QAction                  notebookShareAction;            // Share a notebook with others\r
        public QAction                  notebookCloseAction;            // Close notebooks\r
        public QAction                  notebookIconAction;                     // Change the icon\r
+       public QAction                  notebookStackAction;            // Stack/Unstack the icon.\r
        \r
        public QAction                  savedSearchAddAction;           // Add a saved search\r
        public QAction                  savedSearchEditAction;          // Edit a saved search\r
@@ -185,7 +190,7 @@ public class MainMenuBar extends QMenuBar {
                \r
                exitAction = new QAction(tr("Exit"), this);\r
                exitAction.setToolTip("Close the program");\r
-               exitAction.triggered.connect(parent, "close()");\r
+               exitAction.triggered.connect(parent, "closeNeverNote()");\r
                exitAction.setShortcut("Ctrl+Q");\r
                setupShortcut(exitAction, "File_Exit");\r
                \r
@@ -449,6 +454,19 @@ public class MainMenuBar extends QMenuBar {
                notebookDeleteAction.triggered.connect(parent, "deleteNotebook()");\r
                setupShortcut(notebookDeleteAction, "File_Notebook_Delete");\r
                \r
+               notebookPublishAction = new QAction(tr("Share With The World"), this);\r
+               notebookPublishAction.setEnabled(false);\r
+               notebookPublishAction.setVisible(false);\r
+               notebookPublishAction.triggered.connect(parent, "publishNotebook()");\r
+               setupShortcut(notebookPublishAction, "File_Notebook_Publish");\r
+\r
+               notebookShareAction = new QAction(tr("Share With Individuals"), this);\r
+               notebookShareAction.setEnabled(false);\r
+               notebookShareAction.setVisible(false);\r
+               notebookShareAction.triggered.connect(parent, "shareNotebook()");\r
+               setupShortcut(notebookShareAction, "File_Notebook_Share");\r
+               \r
+               \r
                notebookCloseAction = new QAction(tr("Open/Close Notebooks"), this);\r
                notebookCloseAction.setEnabled(true);\r
                notebookCloseAction.triggered.connect(parent, "closeNotebooks()");\r
@@ -459,6 +477,11 @@ public class MainMenuBar extends QMenuBar {
                notebookIconAction.triggered.connect(parent, "setNotebookIcon()");\r
                setupShortcut(notebookIconAction, "File_Notebook_Icon");\r
                \r
+               notebookStackAction = new QAction(tr("Set Stack"), this);\r
+               notebookStackAction.setEnabled(false);\r
+               notebookStackAction.triggered.connect(parent, "stackNotebook()");\r
+               setupShortcut(notebookStackAction, "File_Notebook_Stack");\r
+               \r
                tagAddAction = new QAction(tr("Add"),this);\r
                tagAddAction.triggered.connect(parent, "addTag()");\r
                //tagAddAction.setShortcut("Ctrl+Shift+T");\r
@@ -515,7 +538,11 @@ public class MainMenuBar extends QMenuBar {
                noteOnlineHistoryAction.setEnabled(false);\r
                setupShortcut(noteOnlineHistoryAction, "Online_Note_History");\r
                \r
-               \r
+               selectiveSyncAction = new QAction(tr("Selective Synchronize"), this);\r
+               selectiveSyncAction.setToolTip("Selectively ignore some notes");\r
+               selectiveSyncAction.triggered.connect(parent, "setupSelectiveSync()");\r
+               selectiveSyncAction.setEnabled(false);\r
+               setupShortcut(synchronizeAction, "Online_Selective_Sync");\r
                \r
                \r
                \r
@@ -562,7 +589,7 @@ public class MainMenuBar extends QMenuBar {
                        encryptDatabaseAction.setToolTip("Decrypt the database upon shutdown");\r
                }\r
                \r
-               loggerAction = new QAction(tr("Log"), this);\r
+               loggerAction = new QAction(tr("Logs"), this);\r
                loggerAction.setToolTip("Show the detailed application log");\r
                loggerAction.triggered.connect(parent, "logger()");\r
                setupShortcut(loggerAction, "About_Log");\r
@@ -572,6 +599,11 @@ public class MainMenuBar extends QMenuBar {
                releaseAction.triggered.connect(parent, "releaseNotes()");      \r
                setupShortcut(releaseAction, "About_Release_Notes");\r
                \r
+               checkForUpdates = new QAction(tr("Check For Updates"), this);\r
+               checkForUpdates.setToolTip("Check for newer versions");\r
+               checkForUpdates.triggered.connect(parent, "checkForUpdates()"); \r
+               setupShortcut(checkForUpdates, "Help_Check_For_Updates");\r
+               \r
                aboutAction = new QAction(tr("About"), this);\r
                aboutAction.setToolTip("About NeverNote");\r
                aboutAction.triggered.connect(parent, "about()"); \r
@@ -668,6 +700,10 @@ public class MainMenuBar extends QMenuBar {
                notebookMenu.addAction(notebookEditAction);\r
                notebookMenu.addAction(notebookDeleteAction);\r
                notebookMenu.addSeparator();\r
+               notebookMenu.addAction(notebookPublishAction);\r
+               notebookMenu.addAction(notebookShareAction);\r
+               notebookMenu.addSeparator();\r
+               notebookMenu.addAction(notebookStackAction);\r
                notebookMenu.addAction(notebookCloseAction);\r
                notebookMenu.addSeparator();\r
                notebookMenu.addAction(notebookIconAction);\r
@@ -689,6 +725,7 @@ public class MainMenuBar extends QMenuBar {
                onlineMenu.addAction(connectAction);\r
                onlineMenu.addSeparator();\r
                onlineMenu.addAction(noteOnlineHistoryAction);\r
+               onlineMenu.addAction(selectiveSyncAction);\r
                \r
                toolsMenu = addMenu(tr("&Tools"));\r
                toolsMenu.addAction(spellCheckAction);\r
@@ -704,6 +741,7 @@ public class MainMenuBar extends QMenuBar {
 \r
                helpMenu = addMenu(tr("&Help"));\r
                helpMenu.addAction(releaseAction);\r
+               helpMenu.addAction(checkForUpdates);\r
                helpMenu.addAction(loggerAction);\r
                helpMenu.addSeparator();\r
                helpMenu.addAction(aboutAction);\r