refector: move download action to ExternalResourcesPage

This commit is contained in:
Sefa Eyeoglu 2022-05-30 16:36:30 +02:00 committed by flow
parent d394235ee0
commit e25cdd9d12
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469
2 changed files with 19 additions and 6 deletions

View File

@ -136,6 +136,17 @@
<string>View &amp;Folder</string>
</property>
</action>
<action name="actionDownloadItem">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>&amp;Download</string>
</property>
<property name="toolTip">
<string>Download a new resource</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>

View File

@ -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);
}
}