Skip to content

Commit

Permalink
Share stock checkbox for GUI cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Jul 25, 2024
1 parent 9329189 commit f41e41d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 11 deletions.
39 changes: 31 additions & 8 deletions GUI/Dialogs/CloneGameInstanceDialog.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions GUI/Dialogs/CloneGameInstanceDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace CKAN.GUI
{
/// <summary>
/// The GUI implementation of clone and fake.
/// The GUI implementation of clone.
/// It's a separate window, handling the whole process.
/// </summary>
#if NET5_0_OR_GREATER
Expand All @@ -34,6 +34,9 @@ public CloneGameInstanceDialog(GameInstanceManager manager, IUser user, string s

InitializeComponent();

ToolTip.SetToolTip(checkBoxShareStock, Properties.Resources.CloneGameInstanceToolTipShareStock);
checkBoxShareStock.Visible = SymbolicLink.CanCreate;

// Populate the instances combobox with names of known instances
comboBoxKnownInstance.DataSource = new string[] { "" }
.Concat(manager.Instances.Values
Expand Down Expand Up @@ -138,7 +141,7 @@ await Task.Run(() =>
{
if (instanceToClone.Valid)
{
manager.CloneInstance(instanceToClone, newName, newPath);
manager.CloneInstance(instanceToClone, newName, newPath, checkBoxShareStock.Checked);
}
else
{
Expand Down
3 changes: 2 additions & 1 deletion GUI/Dialogs/CloneGameInstanceDialog.resx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@
<data name="buttonPathBrowser.Text" xml:space="preserve"><value>Select...</value></data>
<data name="checkBoxSetAsDefault.Text" xml:space="preserve"><value>Set new instance as default</value></data>
<data name="checkBoxSwitchInstance.Text" xml:space="preserve"><value>Switch to new instance</value></data>
<data name="buttonOK.Text" xml:space="preserve"><value>Create</value></data>
<data name="checkBoxShareStock.Text" xml:space="preserve"><value>Share stock files</value></data>
<data name="buttonOK.Text" xml:space="preserve"><value>Clone</value></data>
<data name="buttonCancel.Text" xml:space="preserve"><value>Cancel</value></data>
<data name="$this.Text" xml:space="preserve"><value>Clone Game Instance</value></data>
</root>
2 changes: 2 additions & 0 deletions GUI/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@
<data name="CloneFakeKspDialogCreatingInstance" xml:space="preserve"><value>Creating new instance...</value></data>
<data name="CloneFakeKspDialogNameAlreadyUsed" xml:space="preserve"><value>This name is already used.</value></data>
<data name="CloneFakeKspDialogSuccessfulCreate" xml:space="preserve"><value>Successfully created instance.</value></data>
<data name="CloneGameInstanceToolTipShareStock" xml:space="preserve"><value>Create symbolic links to stock directories instead of copying them.
If you choose this option, DO NOT move or delete the old instance!!</value></data>
<data name="CompatibleGameVersionsDialogNone" xml:space="preserve"><value>&lt;NONE&gt;</value></data>
<data name="CompatibleGameVersionsDialogGameUpdated" xml:space="preserve"><value>The game has been updated since you last reviewed your compatible game versions. Please make sure that settings are correct.</value></data>
<data name="CompatibleGameVersionsDialogVersionDetails" xml:space="preserve"><value>{0} (previous game version: {1})</value></data>
Expand Down

0 comments on commit f41e41d

Please sign in to comment.