Merge remote-tracking branch 'upstream/develop' into unify-mc-settings

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2025-01-27 17:02:50 +00:00
58 changed files with 738 additions and 640 deletions

View File

@@ -207,7 +207,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Note: you only need to set this to access private data. Read the &lt;a href=&quot;https://docs.modrinth.com/#section/Authentication&quot;&gt;documentation&lt;/a&gt; for more information.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Note: you only need to set this to access private data. Read the &lt;a href=&quot;https://docs.modrinth.com/api/#authentication&quot;&gt;documentation&lt;/a&gt; for more information.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>

View File

@@ -232,6 +232,7 @@ void LauncherPage::applySettings()
s->set("SkinsDir", ui->skinsDirTextBox->text());
s->set("JavaDir", ui->javaDirTextBox->text());
s->set("DownloadsDirWatchRecursive", ui->downloadsDirWatchRecursiveCheckBox->isChecked());
s->set("MoveModsFromDownloadsDir", ui->downloadsDirMoveCheckBox->isChecked());
auto sortMode = (InstSortMode)ui->sortingModeGroup->checkedId();
switch (sortMode) {
@@ -296,6 +297,7 @@ void LauncherPage::loadSettings()
ui->skinsDirTextBox->setText(s->get("SkinsDir").toString());
ui->javaDirTextBox->setText(s->get("JavaDir").toString());
ui->downloadsDirWatchRecursiveCheckBox->setChecked(s->get("DownloadsDirWatchRecursive").toBool());
ui->downloadsDirMoveCheckBox->setChecked(s->get("MoveModsFromDownloadsDir").toBool());
QString sortMode = s->get("InstSortMode").toString();

View File

@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>511</width>
<width>562</width>
<height>726</height>
</rect>
</property>
@@ -38,7 +38,7 @@
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
<number>0</number>
<number>2</number>
</property>
<widget class="QWidget" name="featuresTab">
<attribute name="title">
@@ -48,7 +48,7 @@
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
@@ -58,8 +58,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>473</width>
<height>690</height>
<width>570</width>
<height>692</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
@@ -156,14 +156,28 @@
</widget>
</item>
<item row="9" column="1" colspan="2">
<widget class="QCheckBox" name="downloadsDirWatchRecursiveCheckBox">
<property name="toolTip">
<string>When enabled, in addition to the downloads folder, its sub folders will also be searched when looking for resources (e.g. when looking for blocked mods on CurseForge).</string>
</property>
<property name="text">
<string>Check downloads folder recursively</string>
</property>
</widget>
<layout class="QHBoxLayout" name="downloadModsCheckLayout">
<item>
<widget class="QCheckBox" name="downloadsDirWatchRecursiveCheckBox">
<property name="toolTip">
<string>When enabled, in addition to the downloads folder, its sub folders will also be searched when looking for resources (e.g. when looking for blocked mods on CurseForge).</string>
</property>
<property name="text">
<string>Check downloads folder recursively</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="downloadsDirMoveCheckBox">
<property name="toolTip">
<string>When enabled, it will move blocked resources instead of copying them.</string>
</property>
<property name="text">
<string>Move blocked resources</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="downloadsDirTextBox"/>
@@ -585,7 +599,7 @@
</sizepolicy>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="undoRedoEnabled">
<bool>false</bool>
@@ -637,15 +651,33 @@
</customwidgets>
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>scrollArea</tabstop>
<tabstop>autoUpdateCheckBox</tabstop>
<tabstop>updateIntervalSpinBox</tabstop>
<tabstop>instDirTextBox</tabstop>
<tabstop>instDirBrowseBtn</tabstop>
<tabstop>modsDirTextBox</tabstop>
<tabstop>modsDirBrowseBtn</tabstop>
<tabstop>iconsDirTextBox</tabstop>
<tabstop>iconsDirBrowseBtn</tabstop>
<tabstop>javaDirTextBox</tabstop>
<tabstop>javaDirBrowseBtn</tabstop>
<tabstop>skinsDirTextBox</tabstop>
<tabstop>skinsDirBrowseBtn</tabstop>
<tabstop>downloadsDirTextBox</tabstop>
<tabstop>downloadsDirBrowseBtn</tabstop>
<tabstop>downloadsDirWatchRecursiveCheckBox</tabstop>
<tabstop>metadataDisableBtn</tabstop>
<tabstop>dependenciesDisableBtn</tabstop>
<tabstop>skipModpackUpdatePromptBtn</tabstop>
<tabstop>numberOfConcurrentTasksSpinBox</tabstop>
<tabstop>numberOfConcurrentDownloadsSpinBox</tabstop>
<tabstop>numberOfManualRetriesSpinBox</tabstop>
<tabstop>timeoutSecondsSpinBox</tabstop>
<tabstop>sortLastLaunchedBtn</tabstop>
<tabstop>sortByNameBtn</tabstop>
<tabstop>catOpacitySpinBox</tabstop>
<tabstop>preferMenuBarCheckBox</tabstop>
<tabstop>lineLimitSpinBox</tabstop>
<tabstop>checkStopLogging</tabstop>
<tabstop>consoleFont</tabstop>

View File

@@ -60,7 +60,7 @@
<bool>true</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::NoDragDrop</enum>
<enum>QAbstractItemView::DropOnly</enum>
</property>
<property name="uniformRowHeights">
<bool>true</bool>

View File

@@ -252,8 +252,11 @@ void VersionPage::updateButtons(int row)
bool VersionPage::reloadPackProfile()
{
try {
m_profile->reload(Net::Mode::Online);
return true;
auto result = m_profile->reload(Net::Mode::Online);
if (!result) {
QMessageBox::critical(this, tr("Error"), result.error);
}
return result;
} catch (const Exception& e) {
QMessageBox::critical(this, tr("Error"), e.cause());
return false;

View File

@@ -13,6 +13,11 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>Note: If your FTB instances are not in the default location, select it using the button next to search.</string>
</property>