From e3f4cf8d9b8f885ea1ca0270a2e8367f565a9590 Mon Sep 17 00:00:00 2001 From: manongjohn Date: Tue, 7 Jan 2020 14:34:29 -0500 Subject: [PATCH] Change and create message box for Report a Bug... --- .../rooms/Default/menubar_template.xml | 2 +- .../layouts/shortcuts/defopentoonz.ini | 2 +- stuff/profiles/layouts/shortcuts/otadobe.ini | 2 +- .../profiles/layouts/shortcuts/otharmony.ini | 2 +- stuff/profiles/layouts/shortcuts/otretas.ini | 2 +- toonz/sources/toonz/mainwindow.cpp | 19 ++++++++++++++----- toonz/sources/toonz/mainwindow.h | 2 +- toonz/sources/toonz/menubar.cpp | 2 +- toonz/sources/toonz/menubarcommandids.h | 2 +- 9 files changed, 22 insertions(+), 13 deletions(-) diff --git a/stuff/profiles/layouts/rooms/Default/menubar_template.xml b/stuff/profiles/layouts/rooms/Default/menubar_template.xml index b8f53ac2..b1f6dce7 100644 --- a/stuff/profiles/layouts/rooms/Default/menubar_template.xml +++ b/stuff/profiles/layouts/rooms/Default/menubar_template.xml @@ -323,7 +323,7 @@ MI_OpenWhatsNew MI_OpenCommunityForum - MI_OpenReportAnIssue + MI_OpenReportABug MI_About diff --git a/stuff/profiles/layouts/shortcuts/defopentoonz.ini b/stuff/profiles/layouts/shortcuts/defopentoonz.ini index 9f6522c5..0ee3c113 100644 --- a/stuff/profiles/layouts/shortcuts/defopentoonz.ini +++ b/stuff/profiles/layouts/shortcuts/defopentoonz.ini @@ -229,7 +229,7 @@ MI_OpenPalette= MI_OpenPltGizmo= MI_OpenRecentLevel= MI_OpenRecentScene= -MI_OpenReportAnIssue= +MI_OpenReportABug= MI_OpenSchematic= MI_OpenScriptConsole= MI_OpenStudioPalette= diff --git a/stuff/profiles/layouts/shortcuts/otadobe.ini b/stuff/profiles/layouts/shortcuts/otadobe.ini index 3020eb12..5d59876d 100644 --- a/stuff/profiles/layouts/shortcuts/otadobe.ini +++ b/stuff/profiles/layouts/shortcuts/otadobe.ini @@ -229,7 +229,7 @@ MI_OpenPalette= MI_OpenPltGizmo= MI_OpenRecentLevel= MI_OpenRecentScene= -MI_OpenReportAnIssue= +MI_OpenReportABug= MI_OpenSchematic= MI_OpenScriptConsole= MI_OpenStudioPalette= diff --git a/stuff/profiles/layouts/shortcuts/otharmony.ini b/stuff/profiles/layouts/shortcuts/otharmony.ini index c2ef5058..5d0f2ba8 100644 --- a/stuff/profiles/layouts/shortcuts/otharmony.ini +++ b/stuff/profiles/layouts/shortcuts/otharmony.ini @@ -229,7 +229,7 @@ MI_OpenPalette= MI_OpenPltGizmo= MI_OpenRecentLevel= MI_OpenRecentScene= -MI_OpenReportAnIssue= +MI_OpenReportABug= MI_OpenSchematic= MI_OpenScriptConsole= MI_OpenStudioPalette= diff --git a/stuff/profiles/layouts/shortcuts/otretas.ini b/stuff/profiles/layouts/shortcuts/otretas.ini index 151a9a91..6d03720c 100644 --- a/stuff/profiles/layouts/shortcuts/otretas.ini +++ b/stuff/profiles/layouts/shortcuts/otretas.ini @@ -229,7 +229,7 @@ MI_OpenPalette= MI_OpenPltGizmo= MI_OpenRecentLevel= MI_OpenRecentScene= -MI_OpenReportAnIssue= +MI_OpenReportABug= MI_OpenSchematic= MI_OpenScriptConsole= MI_OpenStudioPalette= diff --git a/toonz/sources/toonz/mainwindow.cpp b/toonz/sources/toonz/mainwindow.cpp index 93141113..dae716e3 100644 --- a/toonz/sources/toonz/mainwindow.cpp +++ b/toonz/sources/toonz/mainwindow.cpp @@ -455,7 +455,7 @@ centralWidget->setLayout(centralWidgetLayout);*/ setCommandHandler(MI_OpenWhatsNew, this, &MainWindow::onOpenWhatsNew); setCommandHandler(MI_OpenCommunityForum, this, &MainWindow::onOpenCommunityForum); - setCommandHandler(MI_OpenReportAnIssue, this, &MainWindow::onOpenReportAnIssue); + setCommandHandler(MI_OpenReportABug, this, &MainWindow::onOpenReportABug); setCommandHandler(MI_MaximizePanel, this, &MainWindow::maximizePanel); setCommandHandler(MI_FullScreenWindow, this, &MainWindow::fullScreenWindow); @@ -1017,9 +1017,18 @@ void MainWindow::onOpenCommunityForum() { //----------------------------------------------------------------------------- -void MainWindow::onOpenReportAnIssue() { - QDesktopServices::openUrl( - QUrl("https://github.com/opentoonz/opentoonz/issues")); +void MainWindow::onOpenReportABug() { + QString str = QString( + tr("To report a bug, click on the button below to open a web browser " + "window for OpenToonz's Issues page on https://github.com. Click on " + "the 'New issue' button and fill out the form.")); + + std::vector buttons = {QObject::tr("Report a Bug"), + QObject::tr("Close")}; + int ret = DVGui::MsgBox(DVGui::INFORMATION, str, buttons, 1); + if (ret == 1) + QDesktopServices::openUrl( + QUrl("https://github.com/opentoonz/opentoonz/issues")); } //----------------------------------------------------------------------------- @@ -2030,7 +2039,7 @@ void MainWindow::defineActions() { 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..."), ""); + createMenuHelpAction(MI_OpenReportABug, tr("&Report a Bug..."), ""); createRightClickMenuAction(MI_BlendColors, tr("&Blend colors"), ""); diff --git a/toonz/sources/toonz/mainwindow.h b/toonz/sources/toonz/mainwindow.h index a288bc38..26fdd3e7 100644 --- a/toonz/sources/toonz/mainwindow.h +++ b/toonz/sources/toonz/mainwindow.h @@ -98,7 +98,7 @@ public: void onOpenOnlineManual(); void onOpenWhatsNew(); void onOpenCommunityForum(); - void onOpenReportAnIssue(); + void onOpenReportABug(); 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 7be2a2fe..d4c141b2 100644 --- a/toonz/sources/toonz/menubar.cpp +++ b/toonz/sources/toonz/menubar.cpp @@ -1443,7 +1443,7 @@ QMenuBar *StackedMenuBar::createFullMenuBar() { addMenuItem(helpMenu, MI_OpenWhatsNew); addMenuItem(helpMenu, MI_OpenCommunityForum); helpMenu->addSeparator(); - addMenuItem(helpMenu, MI_OpenReportAnIssue); + addMenuItem(helpMenu, MI_OpenReportABug); helpMenu->addSeparator(); addMenuItem(helpMenu, MI_About); diff --git a/toonz/sources/toonz/menubarcommandids.h b/toonz/sources/toonz/menubarcommandids.h index f8dd74eb..2b219d6f 100644 --- a/toonz/sources/toonz/menubarcommandids.h +++ b/toonz/sources/toonz/menubarcommandids.h @@ -365,7 +365,7 @@ #define MI_OpenOnlineManual "MI_OpenOnlineManual" #define MI_OpenWhatsNew "MI_OpenWhatsNew" #define MI_OpenCommunityForum "MI_OpenCommunityForum" -#define MI_OpenReportAnIssue "MI_OpenReportAnIssue" +#define MI_OpenReportABug "MI_OpenReportABug" #define MI_ClearCacheFolder "MI_ClearCacheFolder"