OSDN Git Service

アップデート確認機能を復元。アップデート確認の参照先URLをpumaに変更。
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / gui / MainMenuBar.java
index 97cbaaf..44fc5f8 100644 (file)
-/*\r
- * This file is part of NeverNote \r
- * Copyright 2009 Randy Baumgarte\r
- * \r
- * This file may be licensed under the terms of of the\r
- * GNU General Public License Version 2 (the ``GPL'').\r
- *\r
- * Software distributed under the License is distributed\r
- * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either\r
- * express or implied. See the GPL for the specific language\r
- * governing rights and limitations.\r
- *\r
- * You should have received a copy of the GPL along with this\r
- * program. If not, go to http://www.gnu.org/licenses/gpl.html\r
- * or write to the Free Software Foundation, Inc.,\r
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
- *\r
-*/\r
-package cx.fbn.nevernote.gui;\r
-\r
-import com.trolltech.qt.gui.QAction;\r
-import com.trolltech.qt.gui.QMenu;\r
-import com.trolltech.qt.gui.QMenuBar;\r
-\r
-import cx.fbn.nevernote.Global;\r
-import cx.fbn.nevernote.NeverNote;\r
-\r
-public class MainMenuBar extends QMenuBar {\r
-\r
-       private final NeverNote                 parent;\r
-       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                  settingsAction;                         // Show user config settings\r
-       public QAction                  emailAction;                            // Action when a user selects "email"\r
-       public QAction                  backupAction;                           // Backup the database\r
-       public QAction                  restoreAction;                          // Restore from a backup\r
-       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                  loggerAction;                           // Action when a user selects "Log"\r
-       public QAction                  releaseAction;                          // Release notes\r
-\r
-       public QAction                  noteAdd;                                        // Add a note\r
-       public QAction                  noteAttributes;                         // Action when a user selects note attributes\r
-       public QAction                  noteTags;                                       // Assign a note tags\r
-       public QAction                  noteDelete;                                     // Delete the current note\r
-       public QAction                  noteRestoreAction;                      // Restore a note\r
-       public QAction                  noteReindex;                            // Action when a user wants to reindex a note\r
-       public QAction                  noteDuplicateAction;            // Duplicate an existing note\r
-       public QAction                  noteMergeAction;                        // Merge notes\r
-       public QAction                  noteExportAction;                       // Export notes\r
-       public QAction                  noteImportAction;                       // Import notes\r
-       \r
-       public QAction                  editFind;                                       // find text in the current note\r
-       public QAction                  editUndo;                                       // Undo last change\r
-       public QAction                  editRedo;                                       // Redo last change\r
-       public QAction                  editCut;                                        // Cut selected text\r
-       public QAction                  editPaste;                                      // Paste selected text\r
-       public QAction                  editPasteWithoutFormat;         // Paste selected text\r
-       public QAction                  editCopy;                                       // Copy selected text;\r
-       \r
-       public QAction                  thumbnailView;                          // view thumbnails\r
-       public QAction                  hideSavedSearches;                      // show/hide saved searches\r
-       public QAction                  hideNotebooks;                          // show/hide notebooks\r
-       public QAction                  hideTags;                                       // show/hide tags\r
-       public QAction                  hideAttributes;                         // show/hide note information\r
-       public QAction                  hideTrash;                                      // show/hide trash tree\r
-       public QAction                  hideNoteList;                           // show/hide the list of notes\r
-       public QAction                  showEditorBar;                          // show/hide the editor button bar\r
-       public QAction                  hideLeftSide;                           // Hide the entire left side\r
-       \r
-       public QAction                  formatBold;                                     // Bold selected text\r
-       public QAction                  formatItalic;                           // Italics selected text\r
-       public QAction                  formatUnderline;                        // Underline selected text\r
-       public QAction                  formatStrikethrough;            // Strikethrough selected text\r
-       public QAction                  formatSuperscript;                      // Superscript selected text\r
-       public QAction                  formatSubscript;                        // Subscript selected text\r
-       public QAction                  formatNumberList;                       // insert a numbered list\r
-       public QAction                  formatBulletList;                       // insert a bulleted list;\r
-       public QAction                  alignLeftAction;                        // Left justify text\r
-       public QAction                  alignRightAction;                       // Right justify text\r
-       public QAction                  alignCenterAction;                      // Center text\r
-       public QAction                  horizontalLineAction;           // Insert a horizontal line\r
-       public QAction                  indentAction;                           // Indent\r
-       public QAction                  outdentAction;                          // outdent menu action\r
-       \r
-       public QAction                  noteOnlineHistoryAction;        // Pull note history from Evernote\r
-       \r
-       public QAction                  accountAction;                          // Account dialog box action\r
-       public QAction                  disableIndexing;                        // put indexing on hold.\r
-//     public QAction                  compactAction;                          // free unused space in the database\r
-       public QAction                  databaseStatusAction;           // Current database status\r
-       public QAction                  folderImportAction;                     // Automatically import files \r
-       public QAction                  spellCheckAction;                       // Spell checker\r
-       public QAction                  encryptDatabaseAction;          // Encrypt the local database\r
-       \r
-       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                  notebookCloseAction;            // Close notebooks\r
-       \r
-       public QAction                  savedSearchAddAction;           // Add a saved search\r
-       public QAction                  savedSearchEditAction;          // Edit a saved search\r
-       public QAction                  savedSearchDeleteAction;        // Delete a saved search\r
-       \r
-       public QAction                  tagEditAction;                          // Edit a tag\r
-       public QAction                  tagAddAction;                           // Add a tag\r
-       public QAction                  tagDeleteAction;                        // Delete a tag\r
-       \r
-       //**************************************************************************\r
-       //* Menu Bar Titles\r
-       //**************************************************************************\r
-       \r
-       private QMenu                   fileMenu;                                       // File menu\r
-       private QMenu                   noteMenu;                                       // Note menu \r
-       private QMenu                   notebookMenu;                           // Notebook menu\r
-       private QMenu                   tagMenu;                                        // Tag menu\r
-       private QMenu                   savedSearchMenu;                        // Saved Searches               \r
-\r
-       private QMenu                   editMenu;                                       // Edit menu\r
-\r
-       private QMenu                   formatMenu;                                     // Text format menu\r
-       private QMenu                   viewMenu;                                       // show/hide stuff\r
-       private QMenu                   listMenu;                                       // bullet or numbered list\r
-       private QMenu                   indentMenu;                                     // indent or outdent menu\r
-       private QMenu                   alignMenu;                                      // Left/Right/Center justify\r
-       \r
-       private QMenu                   onlineMenu;                                     // View online stuff (if connected)\r
-       \r
-       private QMenu                   toolsMenu;                                      // Tools menu\r
-       \r
-       private QMenu                   helpMenu;       \r
-       \r
-       public MainMenuBar(NeverNote p) {\r
-               parent = p;\r
-               \r
-               \r
-               fullReindexAction = new QAction(tr("Reindex Database"), this);\r
-               fullReindexAction.setToolTip("Reindex all notes");\r
-               fullReindexAction.triggered.connect(parent, "fullReindex()");\r
-               setupShortcut(fullReindexAction, "Tools_Reindex_Database");\r
-                               \r
-               printAction = new QAction(tr("Print"), this);\r
-               printAction.setToolTip("Print the current note");\r
-               printAction.triggered.connect(parent, "printNote()");\r
-               setupShortcut(printAction, "File_Print");\r
-               \r
-               emailAction = new QAction(tr("Email"), this);\r
-               emailAction.setToolTip("Email the current note");\r
-               emailAction.triggered.connect(parent, "emailNote()");\r
-               setupShortcut(emailAction, "File_Email");\r
-               \r
-               backupAction = new QAction(tr("Backup Database"), this);\r
-               backupAction.setToolTip("Backup the current database");\r
-               backupAction.triggered.connect(parent, "databaseBackup()");\r
-               setupShortcut(backupAction, "File_Backup");\r
-\r
-               restoreAction = new QAction(tr("Restore Database"), this);\r
-               restoreAction.setToolTip("Restore the database from a backup");\r
-               restoreAction.triggered.connect(parent, "databaseRestore()");\r
-               setupShortcut(restoreAction, "File_Restore");\r
-                       \r
-               emptyTrashAction = new QAction(tr("Empty Trash"), this);\r
-               emptyTrashAction.setToolTip("Empty the trash folder");\r
-               emptyTrashAction.triggered.connect(parent, "emptyTrash()");\r
-               setupShortcut(emptyTrashAction, "File_Empty_Trash");\r
-               \r
-               noteRestoreAction = new QAction(tr("Restore"), this);\r
-               noteRestoreAction.setToolTip("Restore a deleted file from the trash");\r
-               noteRestoreAction.triggered.connect(parent, "restoreNote()");\r
-               noteRestoreAction.setVisible(false);\r
-               setupShortcut(noteRestoreAction, "File_Note_Restore");\r
-                               \r
-               settingsAction = new QAction(tr("Preferences"), this);\r
-               settingsAction.setToolTip("Program settings");\r
-               settingsAction.triggered.connect(parent, "settings()");\r
-               setupShortcut(settingsAction, "Edit_Preferences");\r
-               \r
-               exitAction = new QAction(tr("Exit"), this);\r
-               exitAction.setToolTip("Close the program");\r
-               exitAction.triggered.connect(parent, "close()");\r
-               exitAction.setShortcut("Ctrl+Q");\r
-               setupShortcut(exitAction, "File_Exit");\r
-               \r
-               noteAttributes = new QAction(tr("Extended Information"), this);\r
-               noteAttributes.setToolTip("Show/Hide extended note attributes");\r
-               noteAttributes.triggered.connect(parent, "toggleNoteInformation()");\r
-               noteAttributes.setShortcut("F8");\r
-               setupShortcut(noteAttributes, "View_Extended_Information");\r
-               \r
-               noteReindex = new QAction(tr("Reindex"), this);\r
-               noteReindex.setToolTip(tr("Reindex this note"));\r
-               noteReindex.triggered.connect(parent, "reindexNote()");\r
-               setupShortcut(noteReindex, "File_Note_Reindex");\r
-               \r
-               noteDuplicateAction = new QAction(tr("Duplicate"), this);\r
-               noteDuplicateAction.setToolTip(tr("Duplicate this note"));\r
-               noteDuplicateAction.triggered.connect(parent, "duplicateNote()");\r
-               setupShortcut(noteReindex, "File_Note_Duplicate");\r
-               \r
-               noteMergeAction = new QAction(tr("Merge Notes"), this);\r
-               noteMergeAction.setToolTip(tr("Merge Multiple notes"));\r
-               noteMergeAction.triggered.connect(parent, "mergeNotes()");\r
-               setupShortcut(noteMergeAction, "File_Note_Merge");\r
-               \r
-               noteExportAction = new QAction(tr("Export Selected Notes"), this);\r
-               noteExportAction.setToolTip(tr("Export selected notes"));\r
-               noteExportAction.triggered.connect(parent, "exportNotes()");\r
-               setupShortcut(noteExportAction, "File_Note_Export");\r
-               \r
-               noteImportAction = new QAction(tr("Import Notes"), this);\r
-               noteImportAction.setToolTip(tr("Import notes"));\r
-               noteImportAction.triggered.connect(parent, "importNotes()");\r
-               setupShortcut(noteImportAction, "File_Note_Import");\r
-               \r
-               noteAdd = new QAction(tr("Add"), this);\r
-               noteAdd.setToolTip(tr("Add a new note"));\r
-               noteAdd.triggered.connect(parent, "addNote()");\r
-               setupShortcut(noteAdd, "File_Note_Add");\r
-               //noteAdd.setShortcut("Ctrl+N");\r
-               \r
-               noteTags = new QAction(tr("Modify Tags"), this);\r
-               noteTags.setToolTip(tr("Change the tags assigned to this note"));\r
-               noteTags.triggered.connect(parent.browserWindow, "modifyTags()");\r
-               setupShortcut(noteTags, "File_Note_Modify_Tags");\r
-               \r
-               noteDelete = new QAction(tr("Delete"), this);\r
-               noteDelete.setToolTip(tr("Delete this note"));\r
-               noteDelete.triggered.connect(parent, "deleteNote()");\r
-               setupShortcut(noteDelete, "File_Note_Delete");\r
-       \r
-               editFind = new QAction(tr("Find In Note"), this);\r
-               editFind.setToolTip(tr("Find a string in the current note"));\r
-               editFind.triggered.connect(parent, "findText()");\r
-               setupShortcut(editFind, "Edit_Find_In_Note");\r
-               //editFind.setShortcut("Ctrl+F");\r
-               \r
-               editUndo = new QAction(tr("Undo"), this);\r
-               editUndo.setToolTip(tr("Undo"));\r
-               editUndo.triggered.connect(parent.browserWindow, "undoClicked()");      \r
-               setupShortcut(editUndo, "Edit_Undo");\r
-               //editUndo.setShortcut("Ctrl+Z");\r
-               \r
-               editRedo = new QAction(tr("Redo"), this);\r
-               editRedo.setToolTip(tr("Redo"));\r
-               editRedo.triggered.connect(parent.browserWindow, "redoClicked()");\r
-               setupShortcut(editRedo, "Edit_Redo");\r
-               //editRedo.setShortcut("Ctrl+Y");\r
-       \r
-               editCut = new QAction(tr("Cut"), this);\r
-               editCut.setToolTip(tr("Cut"));\r
-               editCut.triggered.connect(parent.browserWindow, "cutClicked()");\r
-               setupShortcut(editCut, "Edit_Cut");\r
-               //editCut.setShortcut("Ctrl+X");\r
-               \r
-               editCopy = new QAction(tr("Copy"), this);\r
-               editCopy.setToolTip(tr("Copy"));\r
-               editCopy.triggered.connect(parent.browserWindow, "copyClicked()");\r
-               setupShortcut(editCopy, "Edit_Copy");\r
-               //editCopy.setShortcut("Ctrl+C");\r
-               \r
-               editPaste = new QAction(tr("Paste"), this);\r
-               editPaste.setToolTip(tr("Paste"));\r
-               editPaste.triggered.connect(parent.browserWindow, "pasteClicked()");\r
-               setupShortcut(editPaste, "Edit_Paste");\r
-\r
-               editPasteWithoutFormat = new QAction(tr("Paste Without Formatting"), this);\r
-               editPasteWithoutFormat.setToolTip(tr("Paste Without Formatting"));\r
-               editPasteWithoutFormat.triggered.connect(parent.browserWindow, "pasteWithoutFormattingClicked()");\r
-               setupShortcut(editPasteWithoutFormat, "Edit_Paste_Without_Formatting");\r
-               \r
-               hideNoteList = new QAction(tr("Show Note List"), this);\r
-               hideNoteList.setToolTip("Show/Hide Note List");\r
-               hideNoteList.triggered.connect(parent, "toggleNoteListWindow()");\r
-               hideNoteList.setCheckable(true);\r
-               hideNoteList.setChecked(true);\r
-               setupShortcut(hideNoteList, "View_Show_Note_List");\r
-               \r
-               hideTags = new QAction(tr("Show Tags"), this);\r
-               hideTags.setToolTip("Show/Hide Tags");\r
-               hideTags.triggered.connect(parent, "toggleTagWindow()");\r
-               hideTags.setCheckable(true);\r
-               hideTags.setChecked(true);\r
-               setupShortcut(hideTags, "View_Show_Tags");\r
-                       \r
-               hideNotebooks = new QAction(tr("Show Notebooks"), this);\r
-               hideNotebooks.setToolTip("Show/Hide Notebooks");\r
-               hideNotebooks.triggered.connect(parent, "toggleNotebookWindow()");\r
-               hideNotebooks.setCheckable(true);\r
-               hideNotebooks.setChecked(true);\r
-               setupShortcut(hideNotebooks, "View_Show_Notebooks");\r
-\r
-               thumbnailView = new QAction(tr("Preview"), this);\r
-               thumbnailView.setToolTip("Preview Notes");\r
-               thumbnailView.triggered.connect(parent, "thumbnailView()");\r
-               setupShortcut(thumbnailView, "View_Thumbnail");\r
-               \r
-               hideSavedSearches = new QAction(tr("Show Saved Searches"), this);\r
-               hideSavedSearches.setToolTip("Show/Hide Saved Searches");\r
-               hideSavedSearches.triggered.connect(parent, "toggleSavedSearchWindow()");\r
-               hideSavedSearches.setCheckable(true);\r
-               hideSavedSearches.setChecked(true);\r
-               setupShortcut(hideSavedSearches, "View_Show_SavedSearches");\r
-               \r
-               hideAttributes = new QAction(tr("Show Attribute Searches"), this);\r
-               hideAttributes.setToolTip("Show/Hide Attribute Searches");\r
-               hideAttributes.triggered.connect(parent, "toggleAttributesWindow()");\r
-               hideAttributes.setCheckable(true);\r
-               hideAttributes.setChecked(true);\r
-               setupShortcut(hideAttributes, "View_Show_Attribute_Searches");\r
-\r
-               hideTrash = new QAction(tr("Show Trash"), this);\r
-               hideTrash.setToolTip("Show/Hide Trash Tree");\r
-               hideTrash.triggered.connect(parent, "toggleTrashWindow()");\r
-               hideTrash.setCheckable(true);\r
-               hideTrash.setChecked(true);\r
-               setupShortcut(hideTrash, "View_Show_Trash");\r
-               \r
-\r
-               showEditorBar = new QAction(tr("Show Editor Button Bar"), this);\r
-               showEditorBar.setToolTip("Show/Hide Editor Button Bar");\r
-               showEditorBar.triggered.connect(parent, "toggleEditorButtonBar()");\r
-               showEditorBar.setCheckable(true);\r
-               showEditorBar.setChecked(true);\r
-               setupShortcut(showEditorBar, "View_Show_Editor_Button_Bar");\r
-               \r
-\r
-               hideLeftSide = new QAction(tr("Hide Left Side Panels"), this);\r
-               hideLeftSide.setToolTip("Hide The Entire Left Side");\r
-               hideLeftSide.triggered.connect(parent, "toggleLeftSide()");\r
-               hideLeftSide.setCheckable(true);\r
-               hideLeftSide.setChecked(false);\r
-               setupShortcut(hideLeftSide, "View_Show_Left_Side");\r
-               //hideLeftSide.setShortcut("F11");\r
-\r
-               alignLeftAction = new QAction(tr("Left"), this);\r
-               alignLeftAction.setToolTip(tr("Left Align"));\r
-               alignLeftAction.triggered.connect(parent.browserWindow, "justifyLeftClicked()");\r
-               setupShortcut(alignLeftAction, "Format_Alignment_Left");\r
-               //alignLeftAction.setShortcut("Ctrl+L");\r
-               \r
-               alignRightAction = new QAction(tr("Right"), this);\r
-               alignRightAction.setToolTip(tr("Right Align"));\r
-               alignRightAction.triggered.connect(parent.browserWindow, "justifyRightClicked()");\r
-               setupShortcut(alignRightAction, "Format_Alignment_Right");\r
-               //alignRightAction.setShortcut("Ctrl+R");\r
-               \r
-               alignCenterAction = new QAction(tr("Center"), this);\r
-               alignCenterAction.setToolTip(tr("Center Align"));\r
-               alignCenterAction.triggered.connect(parent.browserWindow, "justifyCenterClicked()");\r
-               setupShortcut(alignCenterAction, "Format_Alignment_Center");\r
-               //alignCenterAction.setShortcut("Ctrl+C");\r
-               \r
-               formatBold = new QAction(tr("Bold"), this);\r
-               formatBold.setToolTip(tr("Bold"));\r
-               formatBold.triggered.connect(parent.browserWindow, "boldClicked()");\r
-               setupShortcut(formatBold, "Format_Bold");\r
-               //formatBold.setShortcut("Ctrl+B");\r
-               \r
-               formatItalic = new QAction(tr("Italic"), this);\r
-               formatItalic.setToolTip(tr("Italic"));\r
-               formatItalic.triggered.connect(parent.browserWindow, "italicClicked()");\r
-               setupShortcut(formatItalic, "Format_Italic");\r
-               //formatItalic.setShortcut("Ctrl+I");\r
-               \r
-               formatUnderline = new QAction(tr("Underline"), this);\r
-               formatUnderline.setToolTip(tr("Underline"));\r
-               formatUnderline.triggered.connect(parent.browserWindow, "underlineClicked()");\r
-               setupShortcut(formatUnderline, "Format_Underline");\r
-//             formatUnderline.setShortcut("Ctrl+U");\r
-\r
-               \r
-               formatSuperscript = new QAction(tr("Superscript"), this);\r
-               formatSuperscript.setToolTip(tr("Superscript"));\r
-               formatSuperscript.triggered.connect(parent.browserWindow, "superscriptClicked()");\r
-               setupShortcut(formatSuperscript, "Format_Superscript");\r
-\r
-\r
-               formatSubscript = new QAction(tr("Subscript"), this);\r
-               formatSubscript.setToolTip(tr("Subscript"));\r
-               formatSubscript.triggered.connect(parent.browserWindow, "subscriptClicked()");\r
-               setupShortcut(formatSubscript, "Format_Subscript");\r
-\r
-               \r
-               formatStrikethrough = new QAction(tr("Strikethrough"), this);\r
-               formatStrikethrough.setToolTip(tr("Strikethrough"));\r
-               formatStrikethrough.triggered.connect(parent.browserWindow, "strikethroughClicked()");\r
-               setupShortcut(formatStrikethrough, "Format_Strikethrough");\r
-\r
-               horizontalLineAction = new QAction(tr("Horizontal Line"), this);\r
-               horizontalLineAction.setToolTip(tr("Horizontal Line"));\r
-               horizontalLineAction.triggered.connect(parent.browserWindow, "hlineClicked()");\r
-               setupShortcut(horizontalLineAction, "Format_Horizontal_Line");\r
-               \r
-               formatBulletList = new QAction(tr("Bulleted List"), this);\r
-//             formatBulletList.setText(tr("Numbered List"));\r
-               formatBulletList.triggered.connect(parent.browserWindow, "bulletListClicked()");\r
-               setupShortcut(formatBulletList, "Format_List_Bullet");\r
-//             formatBulletList.setShortcut("Ctrl+Shift+B");\r
-               \r
-               formatNumberList = new QAction(tr("Numbered List"), this);\r
-               formatNumberList.setText(tr("Numbered list"));\r
-               formatNumberList.triggered.connect(parent.browserWindow, "numberListClicked()");\r
-               setupShortcut(formatNumberList, "Format_List_Numbered");\r
-//             formatNumberList.setShortcut("Ctrl+Shift+O");\r
-\r
-               indentAction = new QAction(tr(">> Increase"), this);\r
-               indentAction.setText(tr(">> Increase"));\r
-               indentAction.triggered.connect(parent.browserWindow, "indentClicked()");\r
-               setupShortcut(indentAction, "Format_Indent_Increase");\r
-               //indentAction.setShortcut("Ctrl+M");\r
-\r
-               outdentAction = new QAction(tr("<< Decrease"), this);\r
-               outdentAction.setText(tr("<< Decrease"));\r
-               outdentAction.triggered.connect(parent.browserWindow, "outdentClicked()");\r
-               setupShortcut(outdentAction, "Format_Indent_Decrease");\r
-               //outdentAction.setShortcut("Ctrl+Shift+M");\r
-               \r
-               notebookAddAction = new QAction(tr("Add"), this);\r
-               notebookAddAction.triggered.connect(parent, "addNotebook()");\r
-               setupShortcut(notebookAddAction, "File_Notebook_Add");\r
-               \r
-               notebookEditAction = new QAction(tr("Edit"), this);\r
-               notebookEditAction.setEnabled(false);\r
-               notebookEditAction.triggered.connect(parent, "editNotebook()");\r
-               setupShortcut(notebookEditAction, "File_Notebook_Edit");\r
-               \r
-               notebookDeleteAction = new QAction(tr("Delete"), this);\r
-               notebookDeleteAction.setEnabled(false);\r
-               notebookDeleteAction.triggered.connect(parent, "deleteNotebook()");\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
-               \r
-               tagAddAction = new QAction(tr("Add"),this);\r
-               tagAddAction.triggered.connect(parent, "addTag()");\r
-               //tagAddAction.setShortcut("Ctrl+Shift+T");\r
-               setupShortcut(tagAddAction, "File_Tag_Add");\r
-               \r
-               tagEditAction = new QAction(tr("Edit"), this);\r
-               tagEditAction.triggered.connect(parent, "editTag()");\r
-               tagEditAction.setEnabled(false);\r
-               setupShortcut(tagEditAction, "File_Tag_Edit");\r
-               \r
-               tagDeleteAction = new QAction(tr("Delete"), this);\r
-               tagDeleteAction.triggered.connect(parent, "deleteTag()");\r
-               tagDeleteAction.setEnabled(false);              \r
-               setupShortcut(tagDeleteAction, "File_Tag_Delete");\r
-                               \r
-               savedSearchAddAction = new QAction(tr("Add"),this);\r
-               savedSearchAddAction.triggered.connect(parent, "addSavedSearch()");\r
-               setupShortcut(savedSearchAddAction, "File_SavedSearch_Add");\r
-               \r
-               savedSearchEditAction = new QAction(tr("Edit"), this);\r
-               savedSearchEditAction.triggered.connect(parent, "editSavedSearch()");\r
-               savedSearchEditAction.setEnabled(false);\r
-               setupShortcut(savedSearchEditAction, "File_SavedSearch_Edit");\r
-               \r
-               savedSearchDeleteAction = new QAction(tr("Delete"), this);\r
-               savedSearchDeleteAction.triggered.connect(parent, "deleteSavedSearch()");\r
-               savedSearchDeleteAction.setEnabled(false);              \r
-               setupShortcut(savedSearchDeleteAction, "File_SavedSearch_Delete");\r
-                               \r
-                       \r
-               connectAction = new QAction(tr("Connect"), this);\r
-               connectAction.setToolTip("Connect to Evernote");\r
-               connectAction.triggered.connect(parent, "remoteConnect()");\r
-               setupShortcut(connectAction, "Online_Connect");\r
-               \r
-               synchronizeAction = new QAction(tr("Synchronize with Evernote"), this);\r
-               synchronizeAction.setToolTip("Delete all local data & get a fresh copy");\r
-               synchronizeAction.triggered.connect(parent, "evernoteSync()");\r
-               synchronizeAction.setEnabled(false);\r
-               setupShortcut(synchronizeAction, "Online_Synchronize");\r
-               //synchronizeAction.setShortcut("F9");\r
-               \r
-               noteOnlineHistoryAction = new QAction(tr("Note History"), this);\r
-               noteOnlineHistoryAction.triggered.connect(parent, "viewNoteHistory()");\r
-               noteOnlineHistoryAction.setEnabled(false);\r
-               setupShortcut(noteOnlineHistoryAction, "Online_Note_History");\r
-               \r
-               \r
-               \r
-               \r
-               \r
-               accountAction = new QAction(tr("Account Information"), this);\r
-               accountAction.setToolTip(tr("Account Information"));\r
-               accountAction.triggered.connect(parent, "accountInformation()");\r
-               setupShortcut(accountAction, "Tools_Account_Information");\r
-               \r
-//             compactAction = new QAction(tr("Compact Database"), this);\r
-//             compactAction.setToolTip(tr("Free unused database space"));\r
-//             compactAction.triggered.connect(parent, "compactDatabase()");\r
-//             setupShortcut(compactAction, "Tools_Compact_Database");\r
-\r
-               databaseStatusAction = new QAction(tr("Database Status"), this);\r
-               databaseStatusAction.setToolTip(tr("Show current database information"));\r
-               databaseStatusAction.triggered.connect(parent, "databaseStatus()");\r
-               setupShortcut(databaseStatusAction, "Tools_Database_Status");\r
-               \r
-               \r
-               disableIndexing = new QAction(tr("Disable Note Indexing"), this);\r
-               disableIndexing.setToolTip("Manually Stop Note Indexing");\r
-               disableIndexing.triggered.connect(parent, "toggleNoteIndexing()");\r
-               disableIndexing.setCheckable(true);\r
-               disableIndexing.setChecked(false);\r
-               setupShortcut(disableIndexing, "Tools_Disable_Note_Indexing");\r
-               \r
-               \r
-               folderImportAction = new QAction(tr("Automatic Folder Importing"), this);\r
-               folderImportAction.setToolTip("Import Files Automatically");\r
-               folderImportAction.triggered.connect(parent, "folderImport()");\r
-               setupShortcut(folderImportAction, "Tools_Folder_Import");\r
-               \r
-               spellCheckAction = new QAction(tr("Spell Check"), this);\r
-               spellCheckAction.setToolTip("Check for spelling errors");\r
-               spellCheckAction.triggered.connect(parent.browserWindow, "doSpellCheck()");\r
-               setupShortcut(spellCheckAction, "Tools_Spell_Check");\r
-\r
-               encryptDatabaseAction = new QAction(tr("Encrypt Database"), this);\r
-               encryptDatabaseAction.setToolTip("Encrypt the database upon shutdown");\r
-               encryptDatabaseAction.triggered.connect(parent, "doDatabaseEncrypt()");\r
-               setupShortcut(encryptDatabaseAction, "Tools_Database_Encrypt");\r
-               if (Global.cipherPassword != null && Global.cipherPassword != "") {\r
-                       encryptDatabaseAction.setText("Decrypt Database");\r
-                       encryptDatabaseAction.setToolTip("Decrypt the database upon shutdown");\r
-               }\r
-               \r
-               loggerAction = new QAction(tr("Log"), this);\r
-               loggerAction.setToolTip("Show the detailed application log");\r
-               loggerAction.triggered.connect(parent, "logger()");\r
-               setupShortcut(loggerAction, "About_Log");\r
-                               \r
-               releaseAction = new QAction(tr("Release Notes"), this);\r
-               releaseAction.setToolTip("Release notes");\r
-               releaseAction.triggered.connect(parent, "releaseNotes()");      \r
-               setupShortcut(releaseAction, "About_Release_Notes");\r
-               \r
-               aboutAction = new QAction(tr("About"), this);\r
-               aboutAction.setToolTip("About NeverNote");\r
-               aboutAction.triggered.connect(parent, "about()"); \r
-               setupShortcut(aboutAction, "About_About");\r
-               \r
-               setupMenuBar();\r
-       }\r
-       \r
-       public void setupMenuBar() {\r
-               fileMenu = addMenu(tr("&File"));\r
-               \r
-               noteMenu = fileMenu.addMenu(tr("&Note"));\r
-               notebookMenu = fileMenu.addMenu(tr("Notebook"));\r
-               tagMenu = fileMenu.addMenu(tr("Tag"));\r
-               savedSearchMenu = fileMenu.addMenu(tr("Saved Searches"));\r
-               fileMenu.addSeparator();\r
-               fileMenu.addAction(emailAction);\r
-               fileMenu.addAction(printAction);\r
-               fileMenu.addSeparator();\r
-               fileMenu.addAction(noteImportAction);\r
-               fileMenu.addAction(noteExportAction);\r
-               fileMenu.addAction(backupAction);\r
-               fileMenu.addAction(restoreAction);\r
-               fileMenu.addSeparator();\r
-               fileMenu.addAction(emptyTrashAction);\r
-               fileMenu.addAction(exitAction);\r
-\r
-               editMenu = addMenu(tr("&Edit"));\r
-               editMenu.addAction(editFind);\r
-               editMenu.addSeparator();\r
-               editMenu.addAction(editUndo);\r
-               editMenu.addAction(editRedo);\r
-               editMenu.addSeparator();\r
-               editMenu.addAction(editCut);\r
-               editMenu.addAction(editCopy);\r
-               editMenu.addAction(editPaste);\r
-               editMenu.addAction(editPasteWithoutFormat);\r
-               editMenu.addSeparator();\r
-               editMenu.addAction(settingsAction);\r
-               \r
-               viewMenu = addMenu(tr("&View"));\r
-               viewMenu.addAction(noteAttributes);\r
-               viewMenu.addSeparator();\r
-               viewMenu.addAction(thumbnailView);\r
-               viewMenu.addSeparator();\r
-               viewMenu.addAction(hideNoteList);\r
-               viewMenu.addAction(hideNotebooks);\r
-               viewMenu.addAction(hideTags);\r
-               viewMenu.addAction(hideAttributes);\r
-               viewMenu.addAction(hideSavedSearches);\r
-               viewMenu.addAction(hideTrash);\r
-               viewMenu.addAction(showEditorBar);\r
-               viewMenu.addAction(hideLeftSide);\r
-               \r
-               formatMenu = addMenu(tr("&Format"));\r
-               formatMenu.addAction(formatBold);\r
-               formatMenu.addAction(formatUnderline);\r
-               formatMenu.addAction(formatItalic);\r
-               formatMenu.addSeparator();\r
-               formatMenu.addAction(formatStrikethrough);\r
-               formatMenu.addAction(horizontalLineAction);\r
-               formatMenu.addSeparator();\r
-               formatMenu.addAction(formatSuperscript);\r
-               formatMenu.addAction(formatSubscript);\r
-               formatMenu.addSeparator();\r
-\r
-               alignMenu = formatMenu.addMenu(tr("Alignment"));\r
-               alignMenu.addAction(alignLeftAction);\r
-               alignMenu.addAction(alignCenterAction);\r
-               alignMenu.addAction(alignRightAction);\r
-               \r
-               listMenu = formatMenu.addMenu(tr("Lists"));\r
-               listMenu.addAction(formatBulletList);\r
-               listMenu.addAction(formatNumberList);\r
-               indentMenu = formatMenu.addMenu(tr("Indent"));\r
-               indentMenu.addAction(indentAction);\r
-               indentMenu.addAction(outdentAction);\r
-               \r
-               noteAttributes.setCheckable(true);\r
-               noteMenu.addAction(noteAdd);\r
-               noteMenu.addAction(noteDelete);\r
-               noteMenu.addAction(noteReindex);\r
-               noteMenu.addSeparator();\r
-               noteMenu.addAction(noteTags);\r
-               noteMenu.addAction(noteRestoreAction);\r
-               noteMenu.addSeparator();\r
-               noteMenu.addAction(noteDuplicateAction);\r
-               noteMenu.addAction(noteMergeAction);\r
-\r
-                               \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
-               \r
-               tagMenu.addAction(tagAddAction);\r
-               tagMenu.addAction(tagEditAction);\r
-               tagMenu.addAction(tagDeleteAction);\r
-               \r
-               savedSearchMenu.addAction(savedSearchAddAction);\r
-               savedSearchMenu.addAction(savedSearchEditAction);\r
-               savedSearchMenu.addAction(savedSearchDeleteAction);\r
-               \r
-               onlineMenu = addMenu(tr("&Online"));\r
-               onlineMenu.addAction(synchronizeAction);\r
-               onlineMenu.addAction(connectAction);\r
-               onlineMenu.addSeparator();\r
-               onlineMenu.addAction(noteOnlineHistoryAction);\r
-               \r
-               toolsMenu = addMenu(tr("&Tools"));\r
-               toolsMenu.addAction(spellCheckAction);\r
-               toolsMenu.addAction(accountAction);\r
-               toolsMenu.addAction(fullReindexAction);\r
-               toolsMenu.addAction(disableIndexing);\r
-//             toolsMenu.addAction(compactAction);\r
-               toolsMenu.addSeparator();\r
-               toolsMenu.addAction(encryptDatabaseAction);\r
-               toolsMenu.addAction(databaseStatusAction);\r
-               toolsMenu.addSeparator();\r
-               toolsMenu.addAction(folderImportAction);\r
-\r
-               helpMenu = addMenu(tr("&Help"));\r
-               helpMenu.addAction(releaseAction);\r
-               helpMenu.addAction(loggerAction);\r
-               helpMenu.addSeparator();\r
-               helpMenu.addAction(aboutAction);\r
-               \r
-               addMenu(fileMenu);\r
-               addMenu(editMenu);\r
-               addMenu(viewMenu);\r
-               addMenu(formatMenu);\r
-               addMenu(onlineMenu);\r
-               addMenu(toolsMenu);\r
-               addMenu(helpMenu);\r
-\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
-                       return;\r
-               action.setShortcut(Global.shortcutKeys.getShortcut(text));\r
-       }\r
-\r
-}\r
+/*
+ * This file is part of NixNote/NeighborNote 
+ * Copyright 2009 Randy Baumgarte
+ * Copyright 2013 Yuki Takahashi
+ * 
+ * This file may be licensed under the terms of of the
+ * GNU General Public License Version 2 (the ``GPL'').
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+*/
+package cx.fbn.nevernote.gui;
+
+import com.trolltech.qt.gui.QAction;
+import com.trolltech.qt.gui.QMenu;
+import com.trolltech.qt.gui.QMenuBar;
+
+import cx.fbn.nevernote.Global;
+import cx.fbn.nevernote.NeverNote;
+
+public class MainMenuBar extends QMenuBar {
+
+       private final NeverNote                 parent;
+       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                  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
+       public QAction                  restoreAction;                          // Restore from a backup
+       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
+
+       public QAction                  noteAdd;                                        // Add a note
+       public QAction                  noteAttributes;                         // Action when a user selects note attributes
+       public QAction                  noteTags;                                       // Assign a note tags
+       public QAction                  noteDelete;                                     // Delete the current note
+       public QAction                  noteRestoreAction;                      // Restore a note
+       public QAction                  noteReindex;                            // Action when a user wants to reindex a note
+       public QAction                  noteDuplicateAction;            // Duplicate an existing note
+       public QAction                  noteMergeAction;                        // Merge notes
+       public QAction                  noteExportAction;                       // Export notes
+       public QAction                  noteImportAction;                       // Import notes
+       public QAction                  noteCopyAsUrlAction;            // Copy the note as a URL
+       // ICHANGED
+       public QAction                  noteOpenNewTab;                         // 新しいタブで開く
+       public QAction                  noteAddNewTab;                          // 新しいタブでノート追加
+       
+       public QAction                  editFind;                                       // find text in the current note
+       public QAction                  editUndo;                                       // Undo last change
+       public QAction                  editRedo;                                       // Redo last change
+       public QAction                  editCut;                                        // Cut selected text
+       public QAction                  editPaste;                                      // Paste selected text
+       public QAction                  editPasteWithoutFormat;         // Paste selected text
+       public QAction                  editCopy;                                       // Copy selected text;
+       
+       public QAction                  wideListView;                           // View with list on the top
+       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
+       public QAction                  hideTrash;                                      // show/hide trash tree
+       public QAction                  hideNoteList;                           // show/hide the list of notes
+       public QAction                  showEditorBar;                          // show/hide the editor button bar
+       public QAction                  hideLeftSide;                           // Hide the entire left side
+       public QAction                  viewSource;                                     // View the source HTML of a note
+       
+       public QAction                  formatBold;                                     // Bold selected text
+       public QAction                  formatItalic;                           // Italics selected text
+       public QAction                  formatUnderline;                        // Underline selected text
+       public QAction                  formatStrikethrough;            // Strikethrough selected text
+       public QAction                  formatSuperscript;                      // Superscript selected text
+       public QAction                  formatSubscript;                        // Subscript selected text
+       public QAction                  formatNumberList;                       // insert a numbered list
+       public QAction                  formatBulletList;                       // insert a bulleted list;
+       public QAction                  alignLeftAction;                        // Left justify text
+       public QAction                  alignRightAction;                       // Right justify text
+       public QAction                  alignCenterAction;                      // Center text
+       public QAction                  horizontalLineAction;           // Insert a horizontal line
+       public QAction                  indentAction;                           // Indent
+       public QAction                  outdentAction;                          // outdent menu action
+       
+       public QAction                  noteOnlineHistoryAction;        // Pull note history from Evernote
+       
+       public QAction                  accountAction;                          // Account dialog box action
+       public QAction                  disableIndexing;                        // put indexing on hold.
+//     public QAction                  compactAction;                          // free unused space in the database
+       public QAction                  databaseStatusAction;           // Current database status
+       public QAction                  folderImportAction;                     // Automatically import files 
+       public QAction                  spellCheckAction;                       // Spell checker
+       public QAction                  encryptDatabaseAction;          // Encrypt the local database
+       
+       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
+       //**************************************************************************
+       
+       private QMenu                   fileMenu;                                       // File menu
+       private QMenu                   noteMenu;                                       // Note menu 
+       private QMenu                   notebookMenu;                           // Notebook menu
+       private QMenu                   tagMenu;                                        // Tag menu
+       private QMenu                   savedSearchMenu;                        // Saved Searches               
+
+       private QMenu                   editMenu;                                       // Edit menu
+
+       private QMenu                   formatMenu;                                     // Text format menu
+       private QMenu                   viewMenu;                                       // show/hide stuff
+       private QMenu                   listMenu;                                       // bullet or numbered list
+       private QMenu                   indentMenu;                                     // indent or outdent menu
+       private QMenu                   alignMenu;                                      // Left/Right/Center justify
+       
+//     private QMenu                   onlineMenu;                                     // View online stuff (if connected)
+       
+       private QMenu                   toolsMenu;                                      // Tools menu
+       
+       private QMenu                   helpMenu;
+       
+       // ICHANGED
+       private QMenu tableMenu;
+       private QMenu imageMenu;
+       private BrowserWindow prevBW;
+       
+       public MainMenuBar(NeverNote p) {
+               parent = p;
+               
+               // ICHANGED
+               prevBW = parent.browserWindow;
+               
+               fullReindexAction = new QAction(tr("Reindex Database"), this);
+               fullReindexAction.setToolTip(tr("Reindex all notes"));
+               fullReindexAction.triggered.connect(parent, "fullReindex()");
+               setupShortcut(fullReindexAction, "Tools_Reindex_Database");
+                               
+               printAction = new QAction(tr("Print"), this);
+               printAction.setToolTip(tr("Print the current note"));
+               printAction.triggered.connect(parent, "printNote()");
+               setupShortcut(printAction, "File_Print");
+               
+               emailAction = new QAction(tr("Email"), this);
+               emailAction.setToolTip(tr("Email the current note"));
+               emailAction.triggered.connect(parent, "emailNote()");
+               setupShortcut(emailAction, "File_Email");
+               
+               backupAction = new QAction(tr("Backup Database"), this);
+               backupAction.setToolTip(tr("Backup the current database"));
+               backupAction.triggered.connect(parent, "databaseBackup()");
+               setupShortcut(backupAction, "File_Backup");
+
+               restoreAction = new QAction(tr("Restore Database"), this);
+               restoreAction.setToolTip(tr("Restore the database from a backup"));
+               restoreAction.triggered.connect(parent, "databaseRestore()");
+               setupShortcut(restoreAction, "File_Restore");
+                       
+               emptyTrashAction = new QAction(tr("Empty Trash"), this);
+               emptyTrashAction.setToolTip(tr("Empty the trash folder"));
+               emptyTrashAction.triggered.connect(parent, "emptyTrash()");
+               setupShortcut(emptyTrashAction, "File_Empty_Trash");
+               
+               noteRestoreAction = new QAction(tr("Restore"), this);
+               noteRestoreAction.setToolTip(tr("Restore a deleted file from the trash"));
+               noteRestoreAction.triggered.connect(parent, "restoreNote()");
+               noteRestoreAction.setVisible(false);
+               setupShortcut(noteRestoreAction, "File_Note_Restore");
+                               
+               settingsAction = new QAction(tr("Preferences"), this);
+               settingsAction.setToolTip(tr("Program settings"));
+               settingsAction.triggered.connect(parent, "settings()");
+               setupShortcut(settingsAction, "Edit_Preferences");
+               
+               exitAction = new QAction(tr("Exit"), this);
+               exitAction.setToolTip(tr("Close the program"));
+               exitAction.triggered.connect(parent, "closeNeverNote()");
+               exitAction.setShortcut("Ctrl+Q");
+               setupShortcut(exitAction, "File_Exit");
+               
+               noteAttributes = new QAction(tr("Extended Information"), this);
+               noteAttributes.setToolTip(tr("Show/Hide extended note attributes"));
+               noteAttributes.triggered.connect(parent, "toggleNoteInformation()");
+               noteAttributes.setShortcut("F8");
+               setupShortcut(noteAttributes, "View_Extended_Information");
+               
+               noteReindex = new QAction(tr("Reindex"), this);
+               noteReindex.setToolTip(tr("Reindex this note"));
+               noteReindex.triggered.connect(parent, "reindexNote()");
+               setupShortcut(noteReindex, "File_Note_Reindex");
+               
+               noteDuplicateAction = new QAction(tr("Duplicate"), this);
+               noteDuplicateAction.setToolTip(tr("Duplicate this note"));
+               noteDuplicateAction.triggered.connect(parent, "duplicateNote()");
+               setupShortcut(noteReindex, "File_Note_Duplicate");
+               
+               noteMergeAction = new QAction(tr("Merge Notes"), this);
+               noteMergeAction.setToolTip(tr("Merge Multiple notes"));
+               noteMergeAction.triggered.connect(parent, "mergeNotes()");
+               setupShortcut(noteMergeAction, "File_Note_Merge");
+               
+               noteExportAction = new QAction(tr("Export Selected Notes"), this);
+               noteExportAction.setToolTip(tr("Export selected notes"));
+               noteExportAction.triggered.connect(parent, "exportNotes()");
+               setupShortcut(noteExportAction, "File_Note_Export");
+               
+               noteCopyAsUrlAction = new QAction(tr("Copy as URL"), this);
+               noteCopyAsUrlAction.setToolTip(tr("Copy as URL"));
+               noteCopyAsUrlAction.triggered.connect(parent, "copyAsUrlClicked()");
+               setupShortcut(noteCopyAsUrlAction, "Note_Copy_As_Url");
+               
+               noteImportAction = new QAction(tr("Import Notes"), this);
+               noteImportAction.setToolTip(tr("Import notes"));
+               noteImportAction.triggered.connect(parent, "importNotes()");
+               setupShortcut(noteImportAction, "File_Note_Import");
+               
+               noteAdd = new QAction(tr("Add"), this);
+               noteAdd.setToolTip(tr("Add a new note"));
+               noteAdd.triggered.connect(parent, "addNote()");
+               setupShortcut(noteAdd, "File_Note_Add");
+               
+               noteTags = new QAction(tr("Modify Tags"), this);
+               noteTags.setToolTip(tr("Change the tags assigned to this note"));
+               noteTags.triggered.connect(parent.browserWindow, "modifyTags()");
+               setupShortcut(noteTags, "File_Note_Modify_Tags");
+               
+               noteDelete = new QAction(tr("Delete"), this);
+               noteDelete.setToolTip(tr("Delete this note"));
+               noteDelete.triggered.connect(parent, "deleteNote()");
+               setupShortcut(noteDelete, "File_Note_Delete");
+               
+               // ICHANGED 新しいタブで開くアクション生成
+               noteOpenNewTab = new QAction(tr("Open in New Tab"), this);
+               noteOpenNewTab.setToolTip(tr("Open this note in new tab"));
+               noteOpenNewTab.triggered.connect(parent, "openNewTab()");
+               setupShortcut(noteOpenNewTab, "File_Note_Open_New_Tab");
+               
+               // ICHANGED 新しいタブでノート追加アクション生成
+               noteAddNewTab = new QAction(tr("Add in New Tab"), this);
+               noteAddNewTab.setToolTip(tr("Add a new note in new tab"));
+               noteAddNewTab.triggered.connect(parent, "noteAddNewTab()");
+               setupShortcut(noteAddNewTab, "File_Note_Add_New_Tab");
+       
+               editFind = new QAction(tr("Find In Note"), this);
+               editFind.setToolTip(tr("Find a string in the current note"));
+               editFind.triggered.connect(parent, "findText()");
+               setupShortcut(editFind, "Edit_Find_In_Note");
+               //editFind.setShortcut("Ctrl+F");
+               
+               editUndo = new QAction(tr("Undo"), this);
+               editUndo.setToolTip(tr("Undo"));
+               editUndo.triggered.connect(parent.browserWindow, "undoClicked()");      
+               setupShortcut(editUndo, "Edit_Undo");
+               //editUndo.setShortcut("Ctrl+Z");
+               
+               editRedo = new QAction(tr("Redo"), this);
+               editRedo.setToolTip(tr("Redo"));
+               editRedo.triggered.connect(parent.browserWindow, "redoClicked()");
+               setupShortcut(editRedo, "Edit_Redo");
+               //editRedo.setShortcut("Ctrl+Y");
+       
+               editCut = new QAction(tr("Cut"), this);
+               editCut.setToolTip(tr("Cut"));
+               editCut.triggered.connect(parent.browserWindow, "cutClicked()");
+               setupShortcut(editCut, "Edit_Cut");
+               //editCut.setShortcut("Ctrl+X");
+               
+               editCopy = new QAction(tr("Copy"), this);
+               editCopy.setToolTip(tr("Copy"));
+               editCopy.triggered.connect(parent.browserWindow, "copyClicked()");
+               setupShortcut(editCopy, "Edit_Copy");
+               //editCopy.setShortcut("Ctrl+C");
+
+               
+               editPaste = new QAction(tr("Paste"), this);
+               editPaste.setToolTip(tr("Paste"));
+               editPaste.triggered.connect(parent.browserWindow, "pasteClicked()");
+               setupShortcut(editPaste, "Edit_Paste");
+
+               editPasteWithoutFormat = new QAction(tr("Paste Without Formatting"), this);
+               editPasteWithoutFormat.setToolTip(tr("Paste Without Formatting"));
+               editPasteWithoutFormat.triggered.connect(parent.browserWindow, "pasteWithoutFormattingClicked()");
+               setupShortcut(editPasteWithoutFormat, "Edit_Paste_Without_Formatting");
+               
+               hideNoteList = new QAction(tr("Show Note List"), this);
+               hideNoteList.setToolTip(tr("Show/Hide Note List"));
+               hideNoteList.triggered.connect(parent, "toggleNoteListWindow()");
+               hideNoteList.setCheckable(true);
+               hideNoteList.setChecked(true);
+               setupShortcut(hideNoteList, "View_Show_Note_List");
+               
+               hideTags = new QAction(tr("Show Tags"), this);
+               hideTags.setToolTip(tr("Show/Hide Tags"));
+               hideTags.triggered.connect(parent, "toggleTagWindow()");
+               hideTags.setCheckable(true);
+               hideTags.setChecked(true);
+               setupShortcut(hideTags, "View_Show_Tags");
+                       
+               hideNotebooks = new QAction(tr("Show Notebooks"), this);
+               hideNotebooks.setToolTip(tr("Show/Hide Notebooks"));
+               hideNotebooks.triggered.connect(parent, "toggleNotebookWindow()");
+               hideNotebooks.setCheckable(true);
+               hideNotebooks.setChecked(true);
+               setupShortcut(hideNotebooks, "View_Show_Notebooks");
+               
+               hideZoom = new QAction(tr("Show Zoom"), this);
+               hideZoom.setToolTip(tr("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(tr("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(tr("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(tr("Wide List View"));
+               wideListView.setCheckable(true);
+               wideListView.changed.connect(parent, "wideListView()");
+               setupShortcut(wideListView, "View_Wide_List");
+               
+               narrowListView = new QAction(tr("Narrow List View"), this);
+               narrowListView.setToolTip(tr("Narrow List View"));
+               narrowListView.setCheckable(true);
+               narrowListView.changed.connect(parent, "narrowListView()");
+               setupShortcut(narrowListView, "View_Narrow_List");
+               
+               thumbnailView = new QAction(tr("Preview"), this);
+               thumbnailView.setToolTip(tr("Preview Notes"));
+               thumbnailView.triggered.connect(parent, "thumbnailView()");
+               setupShortcut(thumbnailView, "View_Thumbnail");
+               
+               hideSavedSearches = new QAction(tr("Show Saved Searches"), this);
+               hideSavedSearches.setToolTip(tr("Show/Hide Saved Searches"));
+               hideSavedSearches.triggered.connect(parent, "toggleSavedSearchWindow()");
+               hideSavedSearches.setCheckable(true);
+               hideSavedSearches.setChecked(true);
+               setupShortcut(hideSavedSearches, "View_Show_SavedSearches");
+               
+               hideAttributes = new QAction(tr("Show Attribute Searches"), this);
+               hideAttributes.setToolTip(tr("Show/Hide Attribute Searches"));
+               hideAttributes.triggered.connect(parent, "toggleAttributesWindow()");
+               hideAttributes.setCheckable(true);
+               hideAttributes.setChecked(true);
+               setupShortcut(hideAttributes, "View_Show_Attribute_Searches");
+
+               hideTrash = new QAction(tr("Show Trash"), this);
+               hideTrash.setToolTip(tr("Show/Hide Trash Tree"));
+               hideTrash.triggered.connect(parent, "toggleTrashWindow()");
+               hideTrash.setCheckable(true);
+               hideTrash.setChecked(true);
+               setupShortcut(hideTrash, "View_Show_Trash");
+               
+
+               showEditorBar = new QAction(tr("Show Editor Button Bar"), this);
+               showEditorBar.setToolTip(tr("Show/Hide Editor Button Bar"));
+               showEditorBar.triggered.connect(parent, "toggleEditorButtonBar()");
+               showEditorBar.setCheckable(true);
+               showEditorBar.setChecked(true);
+               setupShortcut(showEditorBar, "View_Show_Editor_Button_Bar");
+               
+
+               hideLeftSide = new QAction(tr("Hide Left Side Panels"), this);
+               hideLeftSide.setToolTip(tr("Hide The Entire Left Side"));
+               hideLeftSide.triggered.connect(parent, "toggleLeftSide()");
+               hideLeftSide.setCheckable(true);
+               hideLeftSide.setChecked(false);
+               setupShortcut(hideLeftSide, "View_Show_Left_Side");
+               //hideLeftSide.setShortcut("F11");
+               
+               viewSource = new QAction(tr("View Source"), this);
+               viewSource.setToolTip(tr("View the source HTML for a note"));
+               viewSource.triggered.connect(parent, "viewSource()");
+               viewSource.setCheckable(true);
+               viewSource.setChecked(false);
+               setupShortcut(viewSource, "View_Source");
+               //hideLeftSide.setShortcut("F11");
+
+               alignLeftAction = new QAction(tr("Left"), this);
+               alignLeftAction.setToolTip(tr("Left Align"));
+               alignLeftAction.triggered.connect(parent.browserWindow, "justifyLeftClicked()");
+               setupShortcut(alignLeftAction, "Format_Alignment_Left");
+               //alignLeftAction.setShortcut("Ctrl+L");
+               
+               alignRightAction = new QAction(tr("Right"), this);
+               alignRightAction.setToolTip(tr("Right Align"));
+               alignRightAction.triggered.connect(parent.browserWindow, "justifyRightClicked()");
+               setupShortcut(alignRightAction, "Format_Alignment_Right");
+               //alignRightAction.setShortcut("Ctrl+R");
+               
+               alignCenterAction = new QAction(tr("Center"), this);
+               alignCenterAction.setToolTip(tr("Center Align"));
+               alignCenterAction.triggered.connect(parent.browserWindow, "justifyCenterClicked()");
+               setupShortcut(alignCenterAction, "Format_Alignment_Center");
+               //alignCenterAction.setShortcut("Ctrl+C");
+               
+               formatBold = new QAction(tr("Bold"), this);
+               formatBold.setToolTip(tr("Bold"));
+               formatBold.triggered.connect(parent.browserWindow, "boldClicked()");
+               setupShortcut(formatBold, "Format_Bold");
+               //formatBold.setShortcut("Ctrl+B");
+               
+               formatItalic = new QAction(tr("Italic"), this);
+               formatItalic.setToolTip(tr("Italic"));
+               formatItalic.triggered.connect(parent.browserWindow, "italicClicked()");
+               setupShortcut(formatItalic, "Format_Italic");
+               //formatItalic.setShortcut("Ctrl+I");
+               
+               formatUnderline = new QAction(tr("Underline"), this);
+               formatUnderline.setToolTip(tr("Underline"));
+               formatUnderline.triggered.connect(parent.browserWindow, "underlineClicked()");
+               setupShortcut(formatUnderline, "Format_Underline");
+//             formatUnderline.setShortcut("Ctrl+U");
+
+               
+               formatSuperscript = new QAction(tr("Superscript"), this);
+               formatSuperscript.setToolTip(tr("Superscript"));
+               formatSuperscript.triggered.connect(parent.browserWindow, "superscriptClicked()");
+               setupShortcut(formatSuperscript, "Format_Superscript");
+
+
+               formatSubscript = new QAction(tr("Subscript"), this);
+               formatSubscript.setToolTip(tr("Subscript"));
+               formatSubscript.triggered.connect(parent.browserWindow, "subscriptClicked()");
+               setupShortcut(formatSubscript, "Format_Subscript");
+
+               
+               formatStrikethrough = new QAction(tr("Strikethrough"), this);
+               formatStrikethrough.setToolTip(tr("Strikethrough"));
+               formatStrikethrough.triggered.connect(parent.browserWindow, "strikethroughClicked()");
+               setupShortcut(formatStrikethrough, "Format_Strikethrough");
+
+               horizontalLineAction = new QAction(tr("Horizontal Line"), this);
+               horizontalLineAction.setToolTip(tr("Horizontal Line"));
+               horizontalLineAction.triggered.connect(parent.browserWindow, "hlineClicked()");
+               setupShortcut(horizontalLineAction, "Format_Horizontal_Line");
+               
+               formatBulletList = new QAction(tr("Bulleted List"), this);
+//             formatBulletList.setText(tr("Numbered List"));
+               formatBulletList.triggered.connect(parent.browserWindow, "bulletListClicked()");
+               setupShortcut(formatBulletList, "Format_List_Bullet");
+//             formatBulletList.setShortcut("Ctrl+Shift+B");
+               
+               formatNumberList = new QAction(tr("Numbered List"), this);
+               formatNumberList.setText(tr("Numbered list"));
+               formatNumberList.triggered.connect(parent.browserWindow, "numberListClicked()");
+               setupShortcut(formatNumberList, "Format_List_Numbered");
+//             formatNumberList.setShortcut("Ctrl+Shift+O");
+
+               indentAction = new QAction(tr(">> Increase"), this);
+               indentAction.setText(tr(">> Increase"));
+               indentAction.triggered.connect(parent.browserWindow, "indentClicked()");
+               setupShortcut(indentAction, "Format_Indent_Increase");
+               //indentAction.setShortcut("Ctrl+M");
+
+               outdentAction = new QAction(tr("<< Decrease"), this);
+               outdentAction.setText(tr("<< Decrease"));
+               outdentAction.triggered.connect(parent.browserWindow, "outdentClicked()");
+               setupShortcut(outdentAction, "Format_Indent_Decrease");
+               //outdentAction.setShortcut("Ctrl+Shift+M");
+               
+               notebookAddAction = new QAction(tr("Add"), this);
+               notebookAddAction.triggered.connect(parent, "addNotebook()");
+               setupShortcut(notebookAddAction, "File_Notebook_Add");
+               
+               notebookEditAction = new QAction(tr("Edit"), this);
+               notebookEditAction.setEnabled(false);
+               notebookEditAction.triggered.connect(parent, "editNotebook()");
+               setupShortcut(notebookEditAction, "File_Notebook_Edit");
+               
+               notebookDeleteAction = new QAction(tr("Delete"), this);
+               notebookDeleteAction.setEnabled(false);
+               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);
+               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()");
+               setupShortcut(tagAddAction, "File_Tag_Add");
+               
+               tagEditAction = new QAction(tr("Edit"), this);
+               tagEditAction.triggered.connect(parent, "editTag()");
+               tagEditAction.setEnabled(false);
+               setupShortcut(tagEditAction, "File_Tag_Edit");
+               
+               tagDeleteAction = new QAction(tr("Delete"), this);
+               tagDeleteAction.triggered.connect(parent, "deleteTag()");
+               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");
+               
+               savedSearchEditAction = new QAction(tr("Edit"), this);
+               savedSearchEditAction.triggered.connect(parent, "editSavedSearch()");
+               savedSearchEditAction.setEnabled(false);
+               setupShortcut(savedSearchEditAction, "File_SavedSearch_Edit");
+               
+               savedSearchDeleteAction = new QAction(tr("Delete"), this);
+               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()");
+               setupShortcut(connectAction, "Tools_Connect");
+               
+               synchronizeAction = new QAction(tr("Synchronize with Evernote"), this);
+               synchronizeAction.setToolTip("Delete all local data & get a fresh copy");
+               synchronizeAction.triggered.connect(parent, "evernoteSync()");
+               synchronizeAction.setEnabled(false);
+               setupShortcut(synchronizeAction, "Tools_Synchronize");
+               //synchronizeAction.setShortcut("F9");
+               
+               noteOnlineHistoryAction = new QAction(tr("Note History"), this);
+               noteOnlineHistoryAction.triggered.connect(parent, "viewNoteHistory()");
+               noteOnlineHistoryAction.setEnabled(false);
+               setupShortcut(noteOnlineHistoryAction, "File_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, "File_Selective_Sync");
+               
+               
+               
+               accountAction = new QAction(tr("Account Information"), this);
+               accountAction.setToolTip(tr("Account Information"));
+               accountAction.triggered.connect(parent, "accountInformation()");
+               setupShortcut(accountAction, "Tools_Account_Information");
+               
+//             compactAction = new QAction(tr("Compact Database"), this);
+//             compactAction.setToolTip(tr("Free unused database space"));
+//             compactAction.triggered.connect(parent, "compactDatabase()");
+//             setupShortcut(compactAction, "Tools_Compact_Database");
+
+               databaseStatusAction = new QAction(tr("Database Status"), this);
+               databaseStatusAction.setToolTip(tr("Show current database information"));
+               databaseStatusAction.triggered.connect(parent, "databaseStatus()");
+               setupShortcut(databaseStatusAction, "Tools_Database_Status");
+               
+               
+               disableIndexing = new QAction(tr("Disable Note Indexing"), this);
+               disableIndexing.setToolTip(tr("Manually Stop Note Indexing"));
+               disableIndexing.triggered.connect(parent, "toggleNoteIndexing()");
+               disableIndexing.setCheckable(true);
+               disableIndexing.setChecked(false);
+               setupShortcut(disableIndexing, "Tools_Disable_Note_Indexing");
+               
+               
+               folderImportAction = new QAction(tr("Automatic Folder Importing"), this);
+               folderImportAction.setToolTip(tr("Import Files Automatically"));
+               folderImportAction.triggered.connect(parent, "folderImport()");
+               setupShortcut(folderImportAction, "Tools_Folder_Import");
+               
+               spellCheckAction = new QAction(tr("Spell Check"), this);
+               spellCheckAction.setToolTip(tr("Check for spelling errors"));
+               spellCheckAction.triggered.connect(parent.browserWindow, "spellCheckClicked()");
+               setupShortcut(spellCheckAction, "Tools_Spell_Check");
+
+               encryptDatabaseAction = new QAction(tr("Encrypt Database"), this);
+               encryptDatabaseAction.setToolTip(tr("Encrypt the database upon shutdown"));
+               encryptDatabaseAction.triggered.connect(parent, "doDatabaseEncrypt()");
+               setupShortcut(encryptDatabaseAction, "Tools_Database_Encrypt");
+               if (Global.cipherPassword != null && Global.cipherPassword != "") {
+                       encryptDatabaseAction.setText("Decrypt Database");
+                       encryptDatabaseAction.setToolTip("Decrypt the database upon shutdown");
+               }
+               
+               loggerAction = new QAction(tr("Logs"), this);
+               loggerAction.setToolTip(tr("Show the detailed application log"));
+               loggerAction.triggered.connect(parent, "logger()");
+               setupShortcut(loggerAction, "About_Log");
+                               
+               releaseAction = new QAction(tr("Release Notes"), this);
+               releaseAction.setToolTip(tr("Release notes"));
+               releaseAction.triggered.connect(parent, "releaseNotes()");      
+               setupShortcut(releaseAction, "About_Release_Notes");
+               
+               checkForUpdates = new QAction(tr("Check For Updates"), this);
+               checkForUpdates.setToolTip(tr("Check for newer versions"));
+               checkForUpdates.triggered.connect(parent, "checkForUpdates()"); 
+               setupShortcut(checkForUpdates, "Help_Check_For_Updates");
+               checkForUpdates.setEnabled(true);
+               
+               aboutAction = new QAction(tr("About"), this);
+               aboutAction.setToolTip(tr("About NeighborNote"));
+               aboutAction.triggered.connect(parent, "about()"); 
+               setupShortcut(aboutAction, "About_About");
+               
+               setupMenuBar();
+       }
+       
+       public void setupMenuBar() {
+               fileMenu = addMenu(tr("&File"));
+               
+               noteMenu = fileMenu.addMenu(tr("&Note"));
+               notebookMenu = fileMenu.addMenu(tr("Notebook"));
+               tagMenu = fileMenu.addMenu(tr("Tag"));
+               savedSearchMenu = fileMenu.addMenu(tr("Saved Searches"));
+               fileMenu.addSeparator();
+               fileMenu.addAction(emailAction);
+               fileMenu.addAction(printAction);
+               fileMenu.addSeparator();
+               fileMenu.addAction(noteImportAction);
+               fileMenu.addAction(noteExportAction);
+               fileMenu.addAction(backupAction);
+               fileMenu.addAction(restoreAction);
+               fileMenu.addSeparator();
+               fileMenu.addAction(selectiveSyncAction);
+               //fileMenu.addAction(parent.browserWindow.browser.downloadAttachment);
+               fileMenu.addSeparator();
+               fileMenu.addAction(emptyTrashAction);
+               fileMenu.addAction(exitAction);
+
+               editMenu = addMenu(tr("&Edit"));
+               editMenu.addAction(editFind);
+               editMenu.addSeparator();
+               editMenu.addAction(editUndo);
+               editMenu.addAction(editRedo);
+               editMenu.addSeparator();
+               editMenu.addAction(editCut);
+               editMenu.addAction(editCopy);
+               editMenu.addAction(editPaste);
+               editMenu.addAction(editPasteWithoutFormat);
+               editMenu.addSeparator();
+               editMenu.addAction(settingsAction);
+               
+               viewMenu = addMenu(tr("&View"));
+               viewMenu.addAction(noteAttributes);
+               viewMenu.addAction(viewSource);
+               viewMenu.addSeparator();
+               viewMenu.addAction(wideListView);
+               viewMenu.addAction(narrowListView);
+               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);
+               viewMenu.addAction(hideSavedSearches);
+               viewMenu.addAction(hideTrash);
+               viewMenu.addAction(showEditorBar);
+               viewMenu.addAction(hideLeftSide);
+               
+               formatMenu = addMenu(tr("F&ormat"));
+               formatMenu.addAction(formatBold);
+               formatMenu.addAction(formatUnderline);
+               formatMenu.addAction(formatItalic);
+               formatMenu.addSeparator();
+               formatMenu.addAction(formatStrikethrough);
+               formatMenu.addAction(horizontalLineAction);
+               formatMenu.addSeparator();
+               formatMenu.addAction(formatSuperscript);
+               formatMenu.addAction(formatSubscript);
+               formatMenu.addSeparator();
+               //formatMenu.addAction(parent.browserWindow.browser.todoAction);
+               //formatMenu.addAction(parent.browserWindow.browser.encryptAction);
+               //formatMenu.addAction(parent.browserWindow.browser.insertLinkAction);
+               //formatMenu.addAction(parent.browserWindow.browser.insertQuickLinkAction);
+               //formatMenu.addAction(parent.browserWindow.browser.insertLatexAction);
+               formatMenu.addMenu(parent.browserWindow.browser.tableMenu);
+               formatMenu.addMenu(parent.browserWindow.browser.imageMenu);
+               formatMenu.addSeparator();
+               
+               // ICHANGED
+               // ライブラリにremoveMenu()が存在しないので、removeAction()で消せるようにTable,Imageメニューをここで再定義
+               tableMenu = new QMenu();
+               tableMenu.setTitle(tr("Table"));
+               tableMenu.addAction(parent.browserWindow.browser.insertTableAction);
+               tableMenu.addAction(parent.browserWindow.browser.insertTableRowAction);
+               tableMenu
+                               .addAction(parent.browserWindow.browser.insertTableColumnAction);
+               tableMenu.addAction(parent.browserWindow.browser.deleteTableRowAction);
+               tableMenu
+                               .addAction(parent.browserWindow.browser.deleteTableColumnAction);
+               imageMenu = new QMenu();
+               imageMenu.setTitle(tr("Image"));
+               imageMenu.addAction(parent.browserWindow.browser.downloadImage);
+               imageMenu.addAction(parent.browserWindow.browser.rotateImageRight);
+               imageMenu.addAction(parent.browserWindow.browser.rotateImageLeft);
+
+               alignMenu = formatMenu.addMenu(tr("Alignment"));
+               alignMenu.addAction(alignLeftAction);
+               alignMenu.addAction(alignCenterAction);
+               alignMenu.addAction(alignRightAction);
+               
+               listMenu = formatMenu.addMenu(tr("Lists"));
+               listMenu.addAction(formatBulletList);
+               listMenu.addAction(formatNumberList);
+               indentMenu = formatMenu.addMenu(tr("Indent"));
+               indentMenu.addAction(indentAction);
+               indentMenu.addAction(outdentAction);
+               
+               noteAttributes.setCheckable(true);
+               // ICHANGED
+               noteMenu.addAction(noteOpenNewTab);
+               
+               noteMenu.addAction(noteAdd);
+               // ICHANGED
+               noteMenu.addAction(noteAddNewTab);
+               
+               noteMenu.addAction(noteDelete);
+               //noteMenu.addAction(noteCopyAsUrlAction);
+               noteMenu.addAction(noteReindex);
+               noteMenu.addSeparator();
+               noteMenu.addAction(noteTags);
+               noteMenu.addAction(noteRestoreAction);
+               noteMenu.addSeparator();
+               noteMenu.addAction(noteOnlineHistoryAction);
+               noteMenu.addAction(noteDuplicateAction);
+               noteMenu.addAction(noteMergeAction);
+
+                               
+               notebookMenu.addAction(notebookAddAction);
+               notebookMenu.addAction(notebookEditAction);
+               notebookMenu.addAction(notebookDeleteAction);
+               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(synchronizeAction);
+               toolsMenu.addAction(connectAction);
+               toolsMenu.addSeparator();
+               toolsMenu.addAction(spellCheckAction);
+               toolsMenu.addAction(accountAction);
+               toolsMenu.addAction(fullReindexAction);
+               toolsMenu.addAction(disableIndexing);
+//             toolsMenu.addAction(compactAction);
+               toolsMenu.addSeparator();
+               toolsMenu.addAction(encryptDatabaseAction);
+               toolsMenu.addAction(databaseStatusAction);
+               toolsMenu.addSeparator();
+               toolsMenu.addAction(folderImportAction);
+
+               helpMenu = addMenu(tr("&Help"));
+               helpMenu.addAction(releaseAction);
+               helpMenu.addAction(checkForUpdates);
+               helpMenu.addAction(loggerAction);
+               helpMenu.addSeparator();
+               helpMenu.addAction(aboutAction);
+               
+               addMenu(fileMenu);
+               addMenu(editMenu);
+               addMenu(viewMenu);
+               addMenu(formatMenu);
+//             addMenu(onlineMenu);
+               addMenu(toolsMenu);
+               addMenu(helpMenu);
+
+       }
+
+       public void setupToolBarVisible() {
+               viewMenu.addAction(parent.toolBar.toggleViewAction());
+               setupShortcut(parent.toolBar.toggleViewAction(), "View_Toolbar");
+       }
+       
+       private void setupShortcut(QAction action, String text) {
+               if (!Global.shortcutKeys.containsAction(text))
+                       return;
+               action.setShortcut(Global.shortcutKeys.getShortcut(text));
+       }
+       
+       // ICHANGED
+       public void refreshTargetWindow() {
+               // 以前のブラウザウィンドウとの接続を切断
+               noteTags.triggered.disconnect(prevBW, "modifyTags()");
+               editUndo.triggered.disconnect(prevBW, "undoClicked()");
+               editRedo.triggered.disconnect(prevBW, "redoClicked()");
+               editCut.triggered.disconnect(prevBW, "cutClicked()");
+               editCopy.triggered.disconnect(prevBW, "copyClicked()");
+               editPaste.triggered.disconnect(prevBW, "pasteClicked()");
+               editPasteWithoutFormat.triggered.disconnect(prevBW,
+                               "pasteWithoutFormattingClicked()");
+
+               alignLeftAction.triggered.disconnect(prevBW, "justifyLeftClicked()");
+               alignRightAction.triggered.disconnect(prevBW, "justifyRightClicked()");
+               alignCenterAction.triggered
+                               .disconnect(prevBW, "justifyCenterClicked()");
+               formatBold.triggered.disconnect(prevBW, "boldClicked()");
+               formatItalic.triggered.disconnect(prevBW, "italicClicked()");
+               formatUnderline.triggered.disconnect(prevBW, "underlineClicked()");
+               formatSuperscript.triggered.disconnect(prevBW, "superscriptClicked()");
+               formatSubscript.triggered.disconnect(prevBW, "subscriptClicked()");
+               formatStrikethrough.triggered.disconnect(prevBW,
+                               "strikethroughClicked()");
+               horizontalLineAction.triggered.disconnect(prevBW, "hlineClicked()");
+               formatBulletList.triggered.disconnect(prevBW, "bulletListClicked()");
+               formatNumberList.triggered.disconnect(prevBW, "numberListClicked()");
+               indentAction.triggered.disconnect(prevBW, "indentClicked()");
+               outdentAction.triggered.disconnect(prevBW, "outdentClicked()");
+
+               spellCheckAction.triggered.disconnect(prevBW, "spellCheckClicked()");
+
+               // 新たなブラウザウィンドウと接続
+               noteTags.triggered.connect(parent.browserWindow, "modifyTags()");
+               editUndo.triggered.connect(parent.browserWindow, "undoClicked()");
+               editRedo.triggered.connect(parent.browserWindow, "redoClicked()");
+               editCut.triggered.connect(parent.browserWindow, "cutClicked()");
+               editCopy.triggered.connect(parent.browserWindow, "copyClicked()");
+               editPaste.triggered.connect(parent.browserWindow, "pasteClicked()");
+               editPasteWithoutFormat.triggered.connect(parent.browserWindow,
+                               "pasteWithoutFormattingClicked()");
+
+               alignLeftAction.triggered.connect(parent.browserWindow,
+                               "justifyLeftClicked()");
+               alignRightAction.triggered.connect(parent.browserWindow,
+                               "justifyRightClicked()");
+               alignCenterAction.triggered.connect(parent.browserWindow,
+                               "justifyCenterClicked()");
+               formatBold.triggered.connect(parent.browserWindow, "boldClicked()");
+               formatItalic.triggered.connect(parent.browserWindow, "italicClicked()");
+               formatUnderline.triggered.connect(parent.browserWindow,
+                               "underlineClicked()");
+               formatSuperscript.triggered.connect(parent.browserWindow,
+                               "superscriptClicked()");
+               formatSubscript.triggered.connect(parent.browserWindow,
+                               "subscriptClicked()");
+               formatStrikethrough.triggered.connect(parent.browserWindow,
+                               "strikethroughClicked()");
+               horizontalLineAction.triggered.connect(parent.browserWindow,
+                               "hlineClicked()");
+               formatBulletList.triggered.connect(parent.browserWindow,
+                               "bulletListClicked()");
+               formatNumberList.triggered.connect(parent.browserWindow,
+                               "numberListClicked()");
+               indentAction.triggered.connect(parent.browserWindow, "indentClicked()");
+               outdentAction.triggered.connect(parent.browserWindow,
+                               "outdentClicked()");
+
+               spellCheckAction.triggered.connect(parent.browserWindow,
+                               "spellCheckClicked()");
+
+               // メニューバーに新しいアクションを挿入
+               fileMenu.insertAction(prevBW.browser.downloadAttachment,
+                               parent.browserWindow.browser.downloadAttachment);
+
+               formatMenu.insertAction(prevBW.browser.todoAction,
+                               parent.browserWindow.browser.todoAction);
+               formatMenu.insertAction(prevBW.browser.encryptAction,
+                               parent.browserWindow.browser.encryptAction);
+               formatMenu.insertAction(prevBW.browser.insertLinkAction,
+                               parent.browserWindow.browser.insertLinkAction);
+               formatMenu.insertAction(prevBW.browser.insertQuickLinkAction,
+                               parent.browserWindow.browser.insertQuickLinkAction);
+               formatMenu.insertAction(prevBW.browser.insertLatexAction,
+                               parent.browserWindow.browser.insertLatexAction);
+
+               tableMenu.insertAction(prevBW.browser.insertTableAction,
+                               parent.browserWindow.browser.insertTableAction);
+               tableMenu.insertAction(prevBW.browser.insertTableRowAction,
+                               parent.browserWindow.browser.insertTableRowAction);
+               tableMenu.insertAction(prevBW.browser.insertTableColumnAction,
+                               parent.browserWindow.browser.insertTableColumnAction);
+               tableMenu.insertAction(prevBW.browser.deleteTableRowAction,
+                               parent.browserWindow.browser.deleteTableRowAction);
+               tableMenu.insertAction(prevBW.browser.deleteTableColumnAction,
+                               parent.browserWindow.browser.deleteTableColumnAction);
+
+               imageMenu.insertAction(prevBW.browser.downloadImage,
+                               parent.browserWindow.browser.downloadImage);
+               imageMenu.insertAction(prevBW.browser.rotateImageRight,
+                               parent.browserWindow.browser.rotateImageRight);
+               imageMenu.insertAction(prevBW.browser.rotateImageLeft,
+                               parent.browserWindow.browser.rotateImageLeft);
+
+               // メニューバーから古いアクションを削除
+               fileMenu.removeAction(prevBW.browser.downloadAttachment);
+
+               formatMenu.removeAction(prevBW.browser.todoAction);
+               formatMenu.removeAction(prevBW.browser.encryptAction);
+               formatMenu.removeAction(prevBW.browser.insertLinkAction);
+               formatMenu.removeAction(prevBW.browser.insertQuickLinkAction);
+               formatMenu.removeAction(prevBW.browser.insertLatexAction);
+
+               tableMenu.removeAction(prevBW.browser.insertTableAction);
+               tableMenu.removeAction(prevBW.browser.insertTableRowAction);
+               tableMenu.removeAction(prevBW.browser.insertTableColumnAction);
+               tableMenu.removeAction(prevBW.browser.deleteTableRowAction);
+               tableMenu.removeAction(prevBW.browser.deleteTableColumnAction);
+
+               imageMenu.removeAction(prevBW.browser.downloadImage);
+               imageMenu.removeAction(prevBW.browser.rotateImageRight);
+               imageMenu.removeAction(prevBW.browser.rotateImageLeft);
+
+               // prevBWを更新
+               prevBW = parent.browserWindow;
+       }
+
+}