aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-02-08 18:39:17 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-03-20 14:56:32 -0700
commit1bed7754e0bf3c009a38818963fe8d0832b36852 (patch)
treed640176eb3f5bc15ee286759ab42899f72b94898 /launcher/ui
parent59788823785c186af78d8100fce3bdedbed85c80 (diff)
downloadPrismLauncher-1bed7754e0bf3c009a38818963fe8d0832b36852.tar.gz
PrismLauncher-1bed7754e0bf3c009a38818963fe8d0832b36852.tar.bz2
PrismLauncher-1bed7754e0bf3c009a38818963fe8d0832b36852.zip
feat(symlinks): make recursive links explicit
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/ui')
-rw-r--r--launcher/ui/dialogs/CopyInstanceDialog.cpp14
-rw-r--r--launcher/ui/dialogs/CopyInstanceDialog.h1
-rw-r--r--launcher/ui/dialogs/CopyInstanceDialog.ui25
3 files changed, 38 insertions, 2 deletions
diff --git a/launcher/ui/dialogs/CopyInstanceDialog.cpp b/launcher/ui/dialogs/CopyInstanceDialog.cpp
index e477b4b3..55962c5a 100644
--- a/launcher/ui/dialogs/CopyInstanceDialog.cpp
+++ b/launcher/ui/dialogs/CopyInstanceDialog.cpp
@@ -87,6 +87,7 @@ CopyInstanceDialog::CopyInstanceDialog(InstancePtr original, QWidget *parent)
ui->copyScreenshotsCheckbox->setChecked(m_selectedOptions.isCopyScreenshotsEnabled());
ui->linkFilesGroup->setChecked(m_selectedOptions.isLinkFilesEnabled());
+ ui->recursiveLinkCheckbox->setChecked(m_selectedOptions.isLinkRecursivelyEnabled());
ui->hardLinksCheckbox->setChecked(m_selectedOptions.isUseHardLinksEnabled());
ui->dontLinkSavesCheckbox->setChecked(m_selectedOptions.isDontLinkSavesEnabled());
}
@@ -231,9 +232,22 @@ void CopyInstanceDialog::on_linkFilesGroup_toggled(bool checked)
m_selectedOptions.enableLinkFiles(checked);
}
+void CopyInstanceDialog::on_recursiveLinkCheckbox_stateChanged(int state)
+{
+ m_selectedOptions.enableLinkRecursively(state == Qt::Checked);
+ if (state != Qt::Checked) {
+ ui->hardLinksCheckbox->setChecked(false);
+ ui->dontLinkSavesCheckbox->setChecked(false);
+ }
+
+}
+
void CopyInstanceDialog::on_hardLinksCheckbox_stateChanged(int state)
{
m_selectedOptions.enableUseHardLinks(state == Qt::Checked);
+ if (state == Qt::Checked && !ui->recursiveLinkCheckbox->isChecked()) {
+ ui->recursiveLinkCheckbox->setChecked(true);
+ }
}
void CopyInstanceDialog::on_dontLinkSavesCheckbox_stateChanged(int state)
diff --git a/launcher/ui/dialogs/CopyInstanceDialog.h b/launcher/ui/dialogs/CopyInstanceDialog.h
index 57775925..2fc6f38a 100644
--- a/launcher/ui/dialogs/CopyInstanceDialog.h
+++ b/launcher/ui/dialogs/CopyInstanceDialog.h
@@ -56,6 +56,7 @@ slots:
void on_copyModsCheckbox_stateChanged(int state);
void on_copyScreenshotsCheckbox_stateChanged(int state);
void on_linkFilesGroup_toggled(bool checked);
+ void on_recursiveLinkCheckbox_stateChanged(int state);
void on_hardLinksCheckbox_stateChanged(int state);
void on_dontLinkSavesCheckbox_stateChanged(int state);
diff --git a/launcher/ui/dialogs/CopyInstanceDialog.ui b/launcher/ui/dialogs/CopyInstanceDialog.ui
index d8eb96eb..8df0d3db 100644
--- a/launcher/ui/dialogs/CopyInstanceDialog.ui
+++ b/launcher/ui/dialogs/CopyInstanceDialog.ui
@@ -210,6 +210,16 @@
</widget>
</item>
<item>
+ <widget class="QLabel" name="advancedOptionsLabel">
+ <property name="text">
+ <string>Advanced Copy Options</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
<layout class="QVBoxLayout" name="copyModeLayout">
<item>
<widget class="QGroupBox" name="linkFilesGroup">
@@ -230,7 +240,17 @@
</property>
<layout class="QVBoxLayout" name="linkOptionsLayout">
<item>
+ <widget class="QCheckBox" name="recursiveLinkCheckbox">
+ <property name="text">
+ <string>Link files recursively</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QCheckBox" name="hardLinksCheckbox">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="toolTip">
<string>Use hard links instead of symbolic links</string>
</property>
@@ -242,7 +262,7 @@
<item>
<widget class="QCheckBox" name="dontLinkSavesCheckbox">
<property name="toolTip">
- <string>If "copy saves" is selected world save data will be copied instead of linked and thus not shared between instances.</string>
+ <string>If &quot;copy saves&quot; is selected world save data will be copied instead of linked and thus not shared between instances.</string>
</property>
<property name="text">
<string>Don't link saves</string>
@@ -283,8 +303,9 @@
<tabstop>copyResPacksCheckbox</tabstop>
<tabstop>copyModsCheckbox</tabstop>
<tabstop>linkFilesGroup</tabstop>
+ <tabstop>recursiveLinkCheckbox</tabstop>
<tabstop>hardLinksCheckbox</tabstop>
- <tabstop>linkWorldsCheckbox</tabstop>
+ <tabstop>dontLinkSavesCheckbox</tabstop>
</tabstops>
<resources/>
<connections>