diff options
author | sr55 <[email protected]> | 2013-01-24 21:48:45 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-01-24 21:48:45 +0000 |
commit | e8eaebade8cd06cec7f8338c122fcb169471308e (patch) | |
tree | 381506a3b36cd503d66848343efcd5fe709660fd /win | |
parent | 8a1e2bb2cb238e1a9c981684d81f9ad86045e11a (diff) |
WinGui: Remember the last used preview duration.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5201 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/UserSettingConstants.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/defaultsettings.xml | 8 |
3 files changed, 15 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index 01fcea409..f0414ef6b 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -216,6 +216,11 @@ namespace HandBrakeWPF /// </summary>
public const string ShowAdvancedTab = "ShowAdvancedTab";
+ /// <summary>
+ /// The last preview duration
+ /// </summary>
+ public const string LastPreviewDuration = "LastPreviewDuration";
+
#endregion
}
}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs index 0f964846f..7ebb88619 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs @@ -95,6 +95,7 @@ namespace HandBrakeWPF.ViewModels this.Duration = 30;
UseSystemDefaultPlayer = userSettingService.GetUserSetting<bool>(UserSettingConstants.DefaultPlayer);
+ this.Duration = userSettingService.GetUserSetting<int>(UserSettingConstants.LastPreviewDuration);
}
#endregion
@@ -381,6 +382,7 @@ namespace HandBrakeWPF.ViewModels this.encodeService.EncodeStatusChanged += this.encodeService_EncodeStatusChanged;
this.encodeService.Start((QueueTask)state, false);
+ this.userSettingService.SetUserSetting(UserSettingConstants.LastPreviewDuration, this.Duration);
}
#endregion
diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index 73d5742fc..c1a645647 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -481,4 +481,12 @@ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
</value>
</item>
+ <item>
+ <key>
+ <string>LastPreviewDuration</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">30</anyType>
+ </value>
+ </item>
</dictionary>
\ No newline at end of file |