mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 17:56:51 +13:00
Backward compatibility for few settings to not reset
This commit is contained in:
parent
1507660816
commit
a441a1de1e
5 changed files with 28 additions and 4 deletions
|
@ -188,7 +188,7 @@ internal static string AfterCaptureTasks_ShowAfterCaptureWindow {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show "Destinations" window.
|
||||
/// Looks up a localized string similar to Show "Before upload" window.
|
||||
/// </summary>
|
||||
internal static string AfterCaptureTasks_ShowBeforeUploadWindow {
|
||||
get {
|
||||
|
|
|
@ -855,7 +855,7 @@ Would you like to download it?</value>
|
|||
<value>Show "After capture" window</value>
|
||||
</data>
|
||||
<data name="AfterCaptureTasks_ShowBeforeUploadWindow" xml:space="preserve">
|
||||
<value>Show "Destinations" window</value>
|
||||
<value>Show "Before upload" window</value>
|
||||
</data>
|
||||
<data name="AfterUploadTasks_ShowAfterUploadWindow" xml:space="preserve">
|
||||
<value>Show "After upload" window</value>
|
||||
|
|
|
@ -51,7 +51,7 @@ public bool IsFirstTimeRun
|
|||
}
|
||||
|
||||
[Browsable(false)]
|
||||
public bool IsPreviousVersion
|
||||
public bool IsUpgrade
|
||||
{
|
||||
get
|
||||
{
|
||||
|
|
|
@ -280,7 +280,7 @@
|
|||
<value>CenterScreen</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>ShareX - Destinations</value>
|
||||
<value>ShareX - Before upload</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>BeforeUploadForm</value>
|
||||
|
|
|
@ -382,6 +382,30 @@ public static void LoadProgramSettings()
|
|||
{
|
||||
Settings = ApplicationConfig.Load(ApplicationConfigFilePath);
|
||||
DefaultTaskSettings = Settings.DefaultTaskSettings;
|
||||
|
||||
TaskSettingsBackwardCompatibility();
|
||||
}
|
||||
|
||||
private static void TaskSettingsBackwardCompatibility()
|
||||
{
|
||||
// TODO: Remove these next version
|
||||
if (Settings.IsUpgrade)
|
||||
{
|
||||
if (DefaultTaskSettings.GeneralSettings.ShowAfterCaptureTasksForm)
|
||||
{
|
||||
DefaultTaskSettings.AfterCaptureJob.Add(AfterCaptureTasks.ShowAfterCaptureWindow);
|
||||
}
|
||||
|
||||
if (DefaultTaskSettings.GeneralSettings.ShowBeforeUploadForm)
|
||||
{
|
||||
DefaultTaskSettings.AfterCaptureJob.Add(AfterCaptureTasks.ShowBeforeUploadWindow);
|
||||
}
|
||||
|
||||
if (DefaultTaskSettings.GeneralSettings.ShowAfterUploadForm)
|
||||
{
|
||||
DefaultTaskSettings.AfterUploadJob.Add(AfterUploadTasks.ShowAfterUploadWindow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadUploadersConfig()
|
||||
|
|
Loading…
Reference in a new issue