diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-05-30 16:36:30 +0200 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-06-14 07:04:31 -0300 |
commit | e25cdd9d122b5f7adbbdf7c8b9989ae49337db9e (patch) | |
tree | 58eb2af247efafbeec2cd3f33b541b0620b9162b | |
parent | d394235ee0040b061504ae50daaea10d3c80500c (diff) | |
download | PrismLauncher-e25cdd9d122b5f7adbbdf7c8b9989ae49337db9e.tar.gz PrismLauncher-e25cdd9d122b5f7adbbdf7c8b9989ae49337db9e.tar.bz2 PrismLauncher-e25cdd9d122b5f7adbbdf7c8b9989ae49337db9e.zip |
refector: move download action to ExternalResourcesPage
-rw-r--r-- | launcher/ui/pages/instance/ExternalResourcesPage.ui | 11 | ||||
-rw-r--r-- | launcher/ui/pages/instance/ModFolderPage.cpp | 14 |
2 files changed, 19 insertions, 6 deletions
diff --git a/launcher/ui/pages/instance/ExternalResourcesPage.ui b/launcher/ui/pages/instance/ExternalResourcesPage.ui index 3982b6ee..17bf455a 100644 --- a/launcher/ui/pages/instance/ExternalResourcesPage.ui +++ b/launcher/ui/pages/instance/ExternalResourcesPage.ui @@ -136,6 +136,17 @@ <string>View &Folder</string> </property> </action> + <action name="actionDownloadItem"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>&Download</string> + </property> + <property name="toolTip"> + <string>Download a new resource</string> + </property> + </action> </widget> <customwidgets> <customwidget> diff --git a/launcher/ui/pages/instance/ModFolderPage.cpp b/launcher/ui/pages/instance/ModFolderPage.cpp index be32ad0a..8fd0f86e 100644 --- a/launcher/ui/pages/instance/ModFolderPage.cpp +++ b/launcher/ui/pages/instance/ModFolderPage.cpp @@ -69,13 +69,15 @@ ModFolderPage::ModFolderPage(BaseInstance* inst, std::shared_ptr<ModFolderModel> // This is structured like that so that these changes // do not affect the Resource pack and Shader pack tabs { - auto act = new QAction(tr("Download mods"), this); - act->setToolTip(tr("Download mods from online mod platforms")); - ui->actionsToolbar->insertActionBefore(ui->actionAddItem, act); - connect(act, &QAction::triggered, this, &ModFolderPage::installMods); + ui->actionDownloadItem->setText(tr("Download mods")); + ui->actionDownloadItem->setToolTip(tr("Download mods from online mod platforms")); + ui->actionDownloadItem->setEnabled(true); + ui->actionAddItem->setText(tr("Add file")); + ui->actionAddItem->setToolTip(tr("Add a locally downloaded file")); - ui->actionAddItem->setText(tr("Add .jar")); - ui->actionAddItem->setToolTip(tr("Add mods via local file")); + ui->actionsToolbar->insertActionBefore(ui->actionAddItem, ui->actionDownloadItem); + + connect(ui->actionDownloadItem, &QAction::triggered, this, &ModFolderPage::installMods); } } |