OSDN Git Service

Add automatic upgrade checking.
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / gui / MainMenuBar.java
index 72e7311..3857ffe 100644 (file)
@@ -40,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
@@ -598,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
@@ -735,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