summaryrefslogtreecommitdiffstats
path: root/application/pages
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-08-04 23:16:03 +0200
committerPetr Mrázek <peterix@gmail.com>2016-08-04 23:16:03 +0200
commitb76d4573cdaa41a3493596571dbba452ab7a5b2e (patch)
treebb2412b3b2d7307ac2f1084771f923020e511fc6 /application/pages
parent6ec2652b4562119ccf45d3bc455ef865fdfbd3ce (diff)
downloadMultiMC-b76d4573cdaa41a3493596571dbba452ab7a5b2e.tar
MultiMC-b76d4573cdaa41a3493596571dbba452ab7a5b2e.tar.gz
MultiMC-b76d4573cdaa41a3493596571dbba452ab7a5b2e.tar.lz
MultiMC-b76d4573cdaa41a3493596571dbba452ab7a5b2e.tar.xz
MultiMC-b76d4573cdaa41a3493596571dbba452ab7a5b2e.zip
GH-589 GH-842 GH-901 GH-1117 allow mass-enabling/disabling of mods
Diffstat (limited to 'application/pages')
-rw-r--r--application/pages/ModFolderPage.cpp12
-rw-r--r--application/pages/ModFolderPage.h2
-rw-r--r--application/pages/ModFolderPage.ui18
3 files changed, 31 insertions, 1 deletions
diff --git a/application/pages/ModFolderPage.cpp b/application/pages/ModFolderPage.cpp
index a1d02ccf..6b657ef6 100644
--- a/application/pages/ModFolderPage.cpp
+++ b/application/pages/ModFolderPage.cpp
@@ -165,6 +165,18 @@ void ModFolderPage::on_addModBtn_clicked()
}
}
+void ModFolderPage::on_enableModBtn_clicked()
+{
+ auto selection = m_filterModel->mapSelectionToSource(ui->modTreeView->selectionModel()->selection());
+ m_mods->enableMods(selection.indexes(), true);
+}
+
+void ModFolderPage::on_disableModBtn_clicked()
+{
+ auto selection = m_filterModel->mapSelectionToSource(ui->modTreeView->selectionModel()->selection());
+ m_mods->enableMods(selection.indexes(), false);
+}
+
void ModFolderPage::on_rmModBtn_clicked()
{
auto selection = m_filterModel->mapSelectionToSource(ui->modTreeView->selectionModel()->selection());
diff --git a/application/pages/ModFolderPage.h b/application/pages/ModFolderPage.h
index 4102a1bb..1c2710f6 100644
--- a/application/pages/ModFolderPage.h
+++ b/application/pages/ModFolderPage.h
@@ -90,6 +90,8 @@ slots:
void on_addModBtn_clicked();
void on_rmModBtn_clicked();
void on_viewModBtn_clicked();
+ void on_enableModBtn_clicked();
+ void on_disableModBtn_clicked();
};
class CoreModFolderPage : public ModFolderPage
diff --git a/application/pages/ModFolderPage.ui b/application/pages/ModFolderPage.ui
index 707987c7..4c79e1fa 100644
--- a/application/pages/ModFolderPage.ui
+++ b/application/pages/ModFolderPage.ui
@@ -56,6 +56,20 @@
</widget>
</item>
<item>
+ <widget class="QPushButton" name="enableModBtn">
+ <property name="text">
+ <string>Enable</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="disableModBtn">
+ <property name="text">
+ <string>Disable</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -143,10 +157,12 @@
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>modTreeView</tabstop>
+ <tabstop>filterEdit</tabstop>
<tabstop>addModBtn</tabstop>
<tabstop>rmModBtn</tabstop>
+ <tabstop>enableModBtn</tabstop>
+ <tabstop>disableModBtn</tabstop>
<tabstop>viewModBtn</tabstop>
- <tabstop>filterEdit</tabstop>
</tabstops>
<resources/>
<connections/>