From db852cd315dcee8138b44221efa14c4209bcefa5 Mon Sep 17 00:00:00 2001 From: manongjohn Date: Sun, 29 Dec 2019 09:29:45 -0500 Subject: [PATCH] Add new Help Menu options --- .../rooms/Default/menubar_template.xml | 4 +++ .../layouts/shortcuts/defopentoonz.ini | 3 ++ stuff/profiles/layouts/shortcuts/otadobe.ini | 3 ++ .../profiles/layouts/shortcuts/otharmony.ini | 3 ++ stuff/profiles/layouts/shortcuts/otretas.ini | 3 ++ toonz/sources/toonz/mainwindow.cpp | 29 +++++++++++++++++++ toonz/sources/toonz/mainwindow.h | 3 ++ toonz/sources/toonz/menubar.cpp | 4 +++ toonz/sources/toonz/menubarcommandids.h | 4 +++ 9 files changed, 56 insertions(+) diff --git a/stuff/profiles/layouts/rooms/Default/menubar_template.xml b/stuff/profiles/layouts/rooms/Default/menubar_template.xml index 33aea1fe..6ed8731b 100644 --- a/stuff/profiles/layouts/rooms/Default/menubar_template.xml +++ b/stuff/profiles/layouts/rooms/Default/menubar_template.xml @@ -318,6 +318,10 @@ MI_OpenOnlineManual + MI_OpenWhatsNew + MI_OpenCommunityForum + + MI_OpenReportAnIssue MI_About diff --git a/stuff/profiles/layouts/shortcuts/defopentoonz.ini b/stuff/profiles/layouts/shortcuts/defopentoonz.ini index d80e9e3a..9f6522c5 100644 --- a/stuff/profiles/layouts/shortcuts/defopentoonz.ini +++ b/stuff/profiles/layouts/shortcuts/defopentoonz.ini @@ -216,6 +216,7 @@ MI_OpenCleanupSettings= MI_OpenColorModel= MI_OpenComboViewer= MI_OpenCommandToolbar= +MI_OpenCommunityForum= MI_OpenFileBrowser= MI_OpenFileBrowser2= MI_OpenFileViewer= @@ -228,6 +229,7 @@ MI_OpenPalette= MI_OpenPltGizmo= MI_OpenRecentLevel= MI_OpenRecentScene= +MI_OpenReportAnIssue= MI_OpenSchematic= MI_OpenScriptConsole= MI_OpenStudioPalette= @@ -237,6 +239,7 @@ MI_OpenTimelineView= MI_OpenTMessage= MI_OpenToolbar= MI_OpenToolOptionBar= +MI_OpenWhatsNew= MI_OpenXshView= MI_OutputSettings=Ctrl+O MI_OverwritePalette= diff --git a/stuff/profiles/layouts/shortcuts/otadobe.ini b/stuff/profiles/layouts/shortcuts/otadobe.ini index 163413c2..3020eb12 100644 --- a/stuff/profiles/layouts/shortcuts/otadobe.ini +++ b/stuff/profiles/layouts/shortcuts/otadobe.ini @@ -216,6 +216,7 @@ MI_OpenCleanupSettings= MI_OpenColorModel= MI_OpenComboViewer= MI_OpenCommandToolbar= +MI_OpenCommunityForum= MI_OpenFileBrowser= MI_OpenFileBrowser2= MI_OpenFileViewer= @@ -228,6 +229,7 @@ MI_OpenPalette= MI_OpenPltGizmo= MI_OpenRecentLevel= MI_OpenRecentScene= +MI_OpenReportAnIssue= MI_OpenSchematic= MI_OpenScriptConsole= MI_OpenStudioPalette= @@ -237,6 +239,7 @@ MI_OpenTimelineView= MI_OpenTMessage= MI_OpenToolbar= MI_OpenToolOptionBar= +MI_OpenWhatsNew= MI_OpenXshView= MI_OutputSettings= MI_OverwritePalette= diff --git a/stuff/profiles/layouts/shortcuts/otharmony.ini b/stuff/profiles/layouts/shortcuts/otharmony.ini index c4acede7..c2ef5058 100644 --- a/stuff/profiles/layouts/shortcuts/otharmony.ini +++ b/stuff/profiles/layouts/shortcuts/otharmony.ini @@ -216,6 +216,7 @@ MI_OpenCleanupSettings= MI_OpenColorModel= MI_OpenComboViewer= MI_OpenCommandToolbar= +MI_OpenCommunityForum= MI_OpenFileBrowser= MI_OpenFileBrowser2= MI_OpenFileViewer= @@ -228,6 +229,7 @@ MI_OpenPalette= MI_OpenPltGizmo= MI_OpenRecentLevel= MI_OpenRecentScene= +MI_OpenReportAnIssue= MI_OpenSchematic= MI_OpenScriptConsole= MI_OpenStudioPalette= @@ -237,6 +239,7 @@ MI_OpenTimelineView= MI_OpenTMessage= MI_OpenToolbar= MI_OpenToolOptionBar= +MI_OpenWhatsNew= MI_OpenXshView= MI_OutputSettings= MI_OverwritePalette= diff --git a/stuff/profiles/layouts/shortcuts/otretas.ini b/stuff/profiles/layouts/shortcuts/otretas.ini index e1f6cca2..151a9a91 100644 --- a/stuff/profiles/layouts/shortcuts/otretas.ini +++ b/stuff/profiles/layouts/shortcuts/otretas.ini @@ -216,6 +216,7 @@ MI_OpenCleanupSettings= MI_OpenColorModel= MI_OpenComboViewer= MI_OpenCommandToolbar= +MI_OpenCommunityForum= MI_OpenFileBrowser= MI_OpenFileBrowser2= MI_OpenFileViewer= @@ -228,6 +229,7 @@ MI_OpenPalette= MI_OpenPltGizmo= MI_OpenRecentLevel= MI_OpenRecentScene= +MI_OpenReportAnIssue= MI_OpenSchematic= MI_OpenScriptConsole= MI_OpenStudioPalette= @@ -237,6 +239,7 @@ MI_OpenTimelineView= MI_OpenTMessage= MI_OpenToolbar= MI_OpenToolOptionBar= +MI_OpenWhatsNew= MI_OpenXshView= MI_OutputSettings= MI_OverwritePalette= diff --git a/toonz/sources/toonz/mainwindow.cpp b/toonz/sources/toonz/mainwindow.cpp index 733e8bdc..f23da8a8 100644 --- a/toonz/sources/toonz/mainwindow.cpp +++ b/toonz/sources/toonz/mainwindow.cpp @@ -452,6 +452,11 @@ centralWidget->setLayout(centralWidgetLayout);*/ setCommandHandler(MI_About, this, &MainWindow::onAbout); setCommandHandler(MI_OpenOnlineManual, this, &MainWindow::onOpenOnlineManual); + setCommandHandler(MI_OpenWhatsNew, this, &MainWindow::onOpenWhatsNew); + setCommandHandler(MI_OpenCommunityForum, this, + &MainWindow::onOpenCommunityForum); + setCommandHandler(MI_OpenReportAnIssue, this, &MainWindow::onOpenReportAnIssue); + setCommandHandler(MI_MaximizePanel, this, &MainWindow::maximizePanel); setCommandHandler(MI_FullScreenWindow, this, &MainWindow::fullScreenWindow); setCommandHandler("MI_NewVectorLevel", this, @@ -998,6 +1003,26 @@ void MainWindow::onOpenOnlineManual() { //----------------------------------------------------------------------------- +void MainWindow::onOpenWhatsNew() { + QDesktopServices::openUrl( + QUrl("https://github.com/opentoonz/opentoonz/releases/latest")); +} + +//----------------------------------------------------------------------------- + +void MainWindow::onOpenCommunityForum() { + QDesktopServices::openUrl( + QUrl("https://groups.google.com/forum/#!forum/opentoonz_en")); +} + +//----------------------------------------------------------------------------- + +void MainWindow::onOpenReportAnIssue() { + QDesktopServices::openUrl( + QUrl("https://github.com/opentoonz/opentoonz/issues")); +} +//----------------------------------------------------------------------------- + void MainWindow::autofillToggle() { TPaletteHandle *h = TApp::instance()->getCurrentPalette(); h->toggleAutopaint(); @@ -1998,7 +2023,11 @@ void MainWindow::defineActions() { "Ctrl+`"); createMenuHelpAction(MI_About, tr("&About OpenToonz..."), ""); createMenuWindowsAction(MI_StartupPopup, tr("&Startup Popup..."), "Alt+S"); + createMenuHelpAction(MI_OpenOnlineManual, tr("&Online Manual..."), "F1"); + createMenuHelpAction(MI_OpenWhatsNew, tr("&What's New..."), ""); + createMenuHelpAction(MI_OpenCommunityForum, tr("&Community Forum..."), ""); + createMenuHelpAction(MI_OpenReportAnIssue, tr("&Report an Issue..."), ""); createRightClickMenuAction(MI_BlendColors, tr("&Blend colors"), ""); diff --git a/toonz/sources/toonz/mainwindow.h b/toonz/sources/toonz/mainwindow.h index 26402a99..a288bc38 100644 --- a/toonz/sources/toonz/mainwindow.h +++ b/toonz/sources/toonz/mainwindow.h @@ -96,6 +96,9 @@ public: void onUpgradeTabPro(); void onAbout(); void onOpenOnlineManual(); + void onOpenWhatsNew(); + void onOpenCommunityForum(); + void onOpenReportAnIssue(); void checkForUpdates(); int getRoomCount() const; Room *getRoom(int index) const; diff --git a/toonz/sources/toonz/menubar.cpp b/toonz/sources/toonz/menubar.cpp index 65a38f43..7be2a2fe 100644 --- a/toonz/sources/toonz/menubar.cpp +++ b/toonz/sources/toonz/menubar.cpp @@ -1440,6 +1440,10 @@ QMenuBar *StackedMenuBar::createFullMenuBar() { // Menu' HELP QMenu *helpMenu = addMenu(tr("Help"), fullMenuBar); addMenuItem(helpMenu, MI_OpenOnlineManual); + addMenuItem(helpMenu, MI_OpenWhatsNew); + addMenuItem(helpMenu, MI_OpenCommunityForum); + helpMenu->addSeparator(); + addMenuItem(helpMenu, MI_OpenReportAnIssue); helpMenu->addSeparator(); addMenuItem(helpMenu, MI_About); diff --git a/toonz/sources/toonz/menubarcommandids.h b/toonz/sources/toonz/menubarcommandids.h index d6cb1211..f5cb4b24 100644 --- a/toonz/sources/toonz/menubarcommandids.h +++ b/toonz/sources/toonz/menubarcommandids.h @@ -362,6 +362,10 @@ #define MI_StopMotionJumpToCamera "MI_StopMotionJumpToCamera" #define MI_OpenOnlineManual "MI_OpenOnlineManual" +#define MI_OpenWhatsNew "MI_OpenWhatsNew" +#define MI_OpenCommunityForum "MI_OpenCommunityForum" +#define MI_OpenReportAnIssue "MI_OpenReportAnIssue" + #define MI_ClearCacheFolder "MI_ClearCacheFolder" #define MI_SelectNextGuideStroke "MI_SelectNextGuideStroke"