OSDN Git Service

Allow customizing of notebook icons.
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / gui / MainMenuBar.java
index 00cb2bf..08605e4 100644 (file)
@@ -102,6 +102,7 @@ public class MainMenuBar extends QMenuBar {
        public QAction                  notebookAddAction;                      // Add a new notebook\r
        public QAction                  notebookDeleteAction;           // Delete a notebook\r
        public QAction                  notebookCloseAction;            // Close notebooks\r
        public QAction                  notebookAddAction;                      // Add a new notebook\r
        public QAction                  notebookDeleteAction;           // Delete a notebook\r
        public QAction                  notebookCloseAction;            // Close notebooks\r
+       public QAction                  notebookIconAction;                     // Change the icon\r
        \r
        public QAction                  savedSearchAddAction;           // Add a saved search\r
        public QAction                  savedSearchEditAction;          // Edit a saved search\r
        \r
        public QAction                  savedSearchAddAction;           // Add a saved search\r
        public QAction                  savedSearchEditAction;          // Edit a saved search\r
@@ -447,13 +448,14 @@ public class MainMenuBar extends QMenuBar {
                setupShortcut(notebookDeleteAction, "File_Notebook_Delete");\r
                \r
                notebookCloseAction = new QAction(tr("Open/Close Notebooks"), this);\r
                setupShortcut(notebookDeleteAction, "File_Notebook_Delete");\r
                \r
                notebookCloseAction = new QAction(tr("Open/Close Notebooks"), this);\r
-//             if (!Global.mimicEvernoteInterface) {\r
-                       notebookCloseAction.setEnabled(true);\r
-                       notebookCloseAction.triggered.connect(parent, "closeNotebooks()");\r
-                       setupShortcut(notebookCloseAction, "File_Notebook_Close");\r
-//             } else {\r
-//                     notebookCloseAction.setEnabled(false); \r
-//             }\r
+               notebookCloseAction.setEnabled(true);\r
+               notebookCloseAction.triggered.connect(parent, "closeNotebooks()");\r
+               setupShortcut(notebookCloseAction, "File_Notebook_Close");\r
+\r
+               notebookIconAction = new QAction(tr("Change Icon"), this);\r
+               notebookIconAction.setEnabled(false);\r
+               notebookIconAction.triggered.connect(parent, "setNotebookIcon()");\r
+               setupShortcut(notebookIconAction, "File_Notebook_Icon");\r
                \r
                tagAddAction = new QAction(tr("Add"),this);\r
                tagAddAction.triggered.connect(parent, "addTag()");\r
                \r
                tagAddAction = new QAction(tr("Add"),this);\r
                tagAddAction.triggered.connect(parent, "addTag()");\r
@@ -654,10 +656,10 @@ public class MainMenuBar extends QMenuBar {
                notebookMenu.addAction(notebookAddAction);\r
                notebookMenu.addAction(notebookEditAction);\r
                notebookMenu.addAction(notebookDeleteAction);\r
                notebookMenu.addAction(notebookAddAction);\r
                notebookMenu.addAction(notebookEditAction);\r
                notebookMenu.addAction(notebookDeleteAction);\r
-//             if (!Global.mimicEvernoteInterface) {\r
-                       notebookMenu.addSeparator();\r
-                       notebookMenu.addAction(notebookCloseAction);\r
-//             }\r
+               notebookMenu.addSeparator();\r
+               notebookMenu.addAction(notebookCloseAction);\r
+               notebookMenu.addSeparator();\r
+               notebookMenu.addAction(notebookIconAction);\r
                \r
                tagMenu.addAction(tagAddAction);\r
                tagMenu.addAction(tagEditAction);\r
                \r
                tagMenu.addAction(tagAddAction);\r
                tagMenu.addAction(tagEditAction);\r