feat: add setting to watch recursively
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
ef50e5595e
commit
a0045ece07
@ -517,6 +517,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
|
|||||||
m_settings->registerSetting({"CentralModsDir", "ModsDir"}, "mods");
|
m_settings->registerSetting({"CentralModsDir", "ModsDir"}, "mods");
|
||||||
m_settings->registerSetting("IconsDir", "icons");
|
m_settings->registerSetting("IconsDir", "icons");
|
||||||
m_settings->registerSetting("DownloadsDir", QStandardPaths::writableLocation(QStandardPaths::DownloadLocation));
|
m_settings->registerSetting("DownloadsDir", QStandardPaths::writableLocation(QStandardPaths::DownloadLocation));
|
||||||
|
m_settings->registerSetting("DownloadsDirWatchRecursive", false);
|
||||||
|
|
||||||
// Editors
|
// Editors
|
||||||
m_settings->registerSetting("JsonEditor", QString());
|
m_settings->registerSetting("JsonEditor", QString());
|
||||||
|
@ -185,7 +185,8 @@ void BlockedModsDialog::setupWatch()
|
|||||||
{
|
{
|
||||||
const QString downloadsFolder = APPLICATION->settings()->get("DownloadsDir").toString();
|
const QString downloadsFolder = APPLICATION->settings()->get("DownloadsDir").toString();
|
||||||
const QString modsFolder = APPLICATION->settings()->get("CentralModsDir").toString();
|
const QString modsFolder = APPLICATION->settings()->get("CentralModsDir").toString();
|
||||||
watchPath(downloadsFolder, true);
|
const bool downloadsFolderWatchRecursive = APPLICATION->settings()->get("DownloadsDirWatchRecursive").toBool();
|
||||||
|
watchPath(downloadsFolder, downloadsFolderWatchRecursive);
|
||||||
watchPath(modsFolder, true);
|
watchPath(modsFolder, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,6 +184,11 @@ void LauncherPage::on_downloadsDirBrowseBtn_clicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LauncherPage::on_downloadsDirWatchRecursiveCheckBox_clicked()
|
||||||
|
{
|
||||||
|
// incase anything needs to be done here
|
||||||
|
}
|
||||||
|
|
||||||
void LauncherPage::on_metadataDisableBtn_clicked()
|
void LauncherPage::on_metadataDisableBtn_clicked()
|
||||||
{
|
{
|
||||||
ui->metadataWarningLabel->setHidden(!ui->metadataDisableBtn->isChecked());
|
ui->metadataWarningLabel->setHidden(!ui->metadataDisableBtn->isChecked());
|
||||||
@ -217,6 +222,7 @@ void LauncherPage::applySettings()
|
|||||||
s->set("CentralModsDir", ui->modsDirTextBox->text());
|
s->set("CentralModsDir", ui->modsDirTextBox->text());
|
||||||
s->set("IconsDir", ui->iconsDirTextBox->text());
|
s->set("IconsDir", ui->iconsDirTextBox->text());
|
||||||
s->set("DownloadsDir", ui->downloadsDirTextBox->text());
|
s->set("DownloadsDir", ui->downloadsDirTextBox->text());
|
||||||
|
s->set("DownloadsDirWatchRecursive", ui->downloadsDirWatchRecursiveCheckBox->isChecked());
|
||||||
|
|
||||||
auto sortMode = (InstSortMode)ui->sortingModeGroup->checkedId();
|
auto sortMode = (InstSortMode)ui->sortingModeGroup->checkedId();
|
||||||
switch (sortMode)
|
switch (sortMode)
|
||||||
|
@ -90,6 +90,7 @@ slots:
|
|||||||
void on_iconsDirBrowseBtn_clicked();
|
void on_iconsDirBrowseBtn_clicked();
|
||||||
void on_downloadsDirBrowseBtn_clicked();
|
void on_downloadsDirBrowseBtn_clicked();
|
||||||
void on_metadataDisableBtn_clicked();
|
void on_metadataDisableBtn_clicked();
|
||||||
|
void on_downloadsDirWatchRecursiveCheckBox_clicked();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Updates the font preview
|
* Updates the font preview
|
||||||
|
@ -67,19 +67,16 @@
|
|||||||
<string>Folders</string>
|
<string>Folders</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="foldersBoxLayout">
|
<layout class="QGridLayout" name="foldersBoxLayout">
|
||||||
<item row="0" column="2">
|
<item row="3" column="0">
|
||||||
<widget class="QToolButton" name="instDirBrowseBtn">
|
<widget class="QLabel" name="labelDownloadsDir">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string>&Downloads:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>downloadsDirTextBox</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="modsDirTextBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="instDirTextBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="labelInstDir">
|
<widget class="QLabel" name="labelInstDir">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -90,16 +87,25 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="instDirTextBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLineEdit" name="downloadsDirTextBox"/>
|
||||||
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QLineEdit" name="iconsDirTextBox"/>
|
<widget class="QLineEdit" name="iconsDirTextBox"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2">
|
<item row="3" column="2">
|
||||||
<widget class="QToolButton" name="iconsDirBrowseBtn">
|
<widget class="QToolButton" name="downloadsDirBrowseBtn">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="modsDirTextBox"/>
|
||||||
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="2">
|
||||||
<widget class="QToolButton" name="modsDirBrowseBtn">
|
<widget class="QToolButton" name="modsDirBrowseBtn">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -117,6 +123,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QToolButton" name="instDirBrowseBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QToolButton" name="iconsDirBrowseBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="labelIconsDir">
|
<widget class="QLabel" name="labelIconsDir">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -127,23 +147,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="labelDownloadsDir">
|
<widget class="QCheckBox" name="downloadsDirWatchRecursiveCheckBox">
|
||||||
<property name="text">
|
<property name="toolTip">
|
||||||
<string>&Downloads:</string>
|
<string>when looking for mods in places like the blocked mods dialog Prismlauncher will check in sub folders of your downloads folder too.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy">
|
|
||||||
<cstring>downloadsDirTextBox</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLineEdit" name="downloadsDirTextBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="2">
|
|
||||||
<widget class="QToolButton" name="downloadsDirBrowseBtn">
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>Check downloads folder recursively</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user