aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/MainWindow.cpp
diff options
context:
space:
mode:
authorKenneth Chew <kenneth.c0@protonmail.com>2022-04-16 13:17:34 -0400
committerKenneth Chew <kenneth.c0@protonmail.com>2022-04-16 13:17:34 -0400
commita549828655f39a5bf824203086c3f45b91a259c5 (patch)
tree86a1b606539d2473ee10d0b5a21346f38a08a2c7 /launcher/ui/MainWindow.cpp
parent6a97ac603abf5554e920caf74fff4b643cde85fe (diff)
downloadPrismLauncher-a549828655f39a5bf824203086c3f45b91a259c5.tar.gz
PrismLauncher-a549828655f39a5bf824203086c3f45b91a259c5.tar.bz2
PrismLauncher-a549828655f39a5bf824203086c3f45b91a259c5.zip
Remove the Edit menu bar menu
It wouldn't bring much utility. - The keyboard shortcuts for copy/paste/etc. already work and are well-known. The menu bar likely doesn't need to advertise them. - There's not very many places you would be able to use these options in the main window (because there's not many places to type stuff in the main window). It would only be applicable on systems with a native menu bar that shows in all other windows as well (but again, the keyboard shortcuts still work). Also, rename `actionWiki` -> `actionOpenWiki` to match the corresponding `on_actionOpenWiki_triggered`
Diffstat (limited to 'launcher/ui/MainWindow.cpp')
-rw-r--r--launcher/ui/MainWindow.cpp61
1 files changed, 6 insertions, 55 deletions
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 27763387..3edd185a 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -246,20 +246,12 @@ public:
QMenuBar *menuBar = nullptr;
QMenu *fileMenu;
- QMenu *editMenu;
QMenu *viewMenu;
QMenu *profileMenu;
QAction *actionCloseWindow;
- QAction *actionUndo;
- QAction *actionRedo;
- QAction *actionCut;
- QAction *actionCopy;
- QAction *actionPaste;
- QAction *actionSelectAll;
-
- QAction *actionWiki;
+ QAction *actionOpenWiki;
QAction *actionNewsMenuBar;
TranslatedToolbar mainToolBar;
@@ -508,18 +500,7 @@ public:
fileMenu->addAction(actionDeleteInstance);
fileMenu->addAction(actionCopyInstance);
fileMenu->addSeparator();
-
- // TODO: functionality for edit actions. They're intended to be used where you can type text, e.g. notes.
- editMenu = menuBar->addMenu(tr("&Edit"));
- editMenu->addAction(actionUndo);
- editMenu->addAction(actionRedo);
- editMenu->addSeparator();
- editMenu->addAction(actionCut);
- editMenu->addAction(actionCopy);
- editMenu->addAction(actionPaste);
- editMenu->addAction(actionSelectAll);
- editMenu->addSeparator();
- editMenu->addAction(actionSettings);
+ fileMenu->addAction(actionSettings);
viewMenu = menuBar->addMenu(tr("&View"));
viewMenu->addAction(actionCAT);
@@ -532,7 +513,7 @@ public:
helpMenu = menuBar->addMenu(tr("&Help"));
helpMenu->addAction(actionAbout);
- helpMenu->addAction(actionWiki);
+ helpMenu->addAction(actionOpenWiki);
helpMenu->addAction(actionNewsMenuBar);
helpMenu->addSeparator();
if (!BuildConfig.BUG_TRACKER_URL.isEmpty())
@@ -557,39 +538,9 @@ public:
actionCloseWindow->setStatusTip(tr("Close the current window"));
connect(actionCloseWindow, &QAction::triggered, APPLICATION, &Application::closeCurrentWindow);
- actionUndo = new QAction(tr("&Undo"), MainWindow);
- actionUndo->setShortcuts(QKeySequence::Undo);
- actionUndo->setStatusTip(tr("Undo"));
- actionUndo->setEnabled(false);
-
- actionRedo = new QAction(tr("&Redo"), MainWindow);
- actionRedo->setShortcuts(QKeySequence::Redo);
- actionRedo->setStatusTip(tr("Redo"));
- actionRedo->setEnabled(false);
-
- actionCut = new QAction(tr("Cu&t"), MainWindow);
- actionCut->setShortcuts(QKeySequence::Cut);
- actionCut->setStatusTip(tr("Cut"));
- actionCut->setEnabled(false);
-
- actionCopy = new QAction(tr("&Copy"), MainWindow);
- actionCopy->setShortcuts(QKeySequence::Copy);
- actionCopy->setStatusTip(tr("Copy"));
- actionCopy->setEnabled(false);
-
- actionPaste = new QAction(tr("&Paste"), MainWindow);
- actionPaste->setShortcuts(QKeySequence::Paste);
- actionPaste->setStatusTip(tr("Paste"));
- actionPaste->setEnabled(false);
-
- actionSelectAll = new QAction(tr("Select &All"), MainWindow);
- actionSelectAll->setShortcuts(QKeySequence::SelectAll);
- actionSelectAll->setStatusTip(tr("Select all"));
- actionSelectAll->setEnabled(false);
-
- actionWiki = new QAction(tr("%1 He&lp").arg(BuildConfig.LAUNCHER_NAME), MainWindow);
- actionWiki->setStatusTip(tr("Open the %1 wiki").arg(BuildConfig.LAUNCHER_NAME));
- connect(actionWiki, &QAction::triggered, MainWindow, &MainWindow::on_actionOpenWiki_triggered);
+ actionOpenWiki = new QAction(tr("%1 He&lp").arg(BuildConfig.LAUNCHER_NAME), MainWindow);
+ actionOpenWiki->setStatusTip(tr("Open the %1 wiki").arg(BuildConfig.LAUNCHER_NAME));
+ connect(actionOpenWiki, &QAction::triggered, MainWindow, &MainWindow::on_actionOpenWiki_triggered);
actionNewsMenuBar = new QAction(tr("&%1 &News").arg(BuildConfig.LAUNCHER_NAME), MainWindow);
actionNewsMenuBar->setStatusTip(tr("Open the development blog to read more news about %1.").arg(BuildConfig.LAUNCHER_NAME));