Merge pull request #1162 from leo78913/i-hate-naming-branches

This commit is contained in:
Tayou 2023-06-12 21:41:17 +02:00 committed by GitHub
commit b174f82261
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 7 deletions

View File

@ -187,7 +187,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
} }
// set the menu for the folders help, and accounts tool buttons // set the menu for the folders help, accounts, and export tool buttons
{ {
auto foldersMenuButton = dynamic_cast<QToolButton*>(ui->mainToolBar->widgetForAction(ui->actionFoldersButton)); auto foldersMenuButton = dynamic_cast<QToolButton*>(ui->mainToolBar->widgetForAction(ui->actionFoldersButton));
ui->actionFoldersButton->setMenu(ui->foldersMenu); ui->actionFoldersButton->setMenu(ui->foldersMenu);
@ -201,6 +201,11 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
auto accountMenuButton = dynamic_cast<QToolButton*>(ui->mainToolBar->widgetForAction(ui->actionAccountsButton)); auto accountMenuButton = dynamic_cast<QToolButton*>(ui->mainToolBar->widgetForAction(ui->actionAccountsButton));
accountMenuButton->setPopupMode(QToolButton::InstantPopup); accountMenuButton->setPopupMode(QToolButton::InstantPopup);
auto exportInstanceMenu = new QMenu(this);
exportInstanceMenu->addAction(ui->actionExportInstanceZip);
exportInstanceMenu->addAction(ui->actionExportInstanceMrPack);
ui->actionExportInstance->setMenu(exportInstanceMenu);
} }
// hide, disable and show stuff // hide, disable and show stuff
@ -397,8 +402,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
// removing this looks stupid // removing this looks stupid
view->setFocus(); view->setFocus();
ui->actionExportInstance->setMenu(ui->exportInstanceMenu);
retranslateUi(); retranslateUi();
} }

View File

@ -150,10 +150,6 @@
<addaction name="actionChangeInstGroup"/> <addaction name="actionChangeInstGroup"/>
<addaction name="actionViewSelectedInstFolder"/> <addaction name="actionViewSelectedInstFolder"/>
<addaction name="actionExportInstance"/> <addaction name="actionExportInstance"/>
<widget class="QMenu" name="exportInstanceMenu">
<addaction name="actionExportInstanceZip"/>
<addaction name="actionExportInstanceMrPack"/>
</widget>
<addaction name="actionCopyInstance"/> <addaction name="actionCopyInstance"/>
<addaction name="actionDeleteInstance"/> <addaction name="actionDeleteInstance"/>
<addaction name="actionCreateInstanceShortcut"/> <addaction name="actionCreateInstanceShortcut"/>
@ -467,11 +463,17 @@
</property> </property>
</action> </action>
<action name="actionExportInstanceZip"> <action name="actionExportInstanceZip">
<property name="icon">
<iconset theme="launcher"/>
</property>
<property name="text"> <property name="text">
<string>Prism Launcher (zip)</string> <string>Prism Launcher (zip)</string>
</property> </property>
</action> </action>
<action name="actionExportInstanceMrPack"> <action name="actionExportInstanceMrPack">
<property name="icon">
<iconset theme="modrinth"/>
</property>
<property name="text"> <property name="text">
<string>Modrinth (mrpack)</string> <string>Modrinth (mrpack)</string>
</property> </property>