diff options
author | sr55 <[email protected]> | 2013-01-13 17:51:42 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-01-13 17:51:42 +0000 |
commit | f3fcc49085f080ad5f075da4a87bbaff47f92572 (patch) | |
tree | 2b483848c6111e73958d4f69af03e790a8abadc3 /win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | |
parent | b62992bfb1623ae6c0930c41e00c2b150ea780d9 (diff) |
WinGui: Options screen refactoring.
Help -> Check for updates now takes the user to the options screen update tab.
Help -> About now takes the user to the options screen about tab. Saves popping up annoying window.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5169 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index 6dc2a44dc..36fa35985 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -309,7 +309,7 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// The options tab that is selected.
/// </summary>
- private string selectedTab;
+ private OptionsTab selectedTab;
/// <summary>
/// Update Message
@@ -380,7 +380,7 @@ namespace HandBrakeWPF.ViewModels this.updateService = updateService;
this.OnLoad();
- this.SelectedTab = "General";
+ this.SelectedTab = OptionsTab.General;
this.UpdateMessage = "Click 'Check for Updates' to check for new versions";
}
@@ -389,20 +389,9 @@ namespace HandBrakeWPF.ViewModels #region Window Properties
/// <summary>
- /// Gets OptionTabs.
- /// </summary>
- public IEnumerable<string> OptionTabs
- {
- get
- {
- return new List<string> { "General", "Output Files", "Audio and Subtitles", "Advanced", "Updates" };
- }
- }
-
- /// <summary>
/// Gets or sets SelectedTab.
/// </summary>
- public string SelectedTab
+ public OptionsTab SelectedTab
{
get
{
@@ -415,6 +404,12 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.SelectedTab);
}
}
+
+ /// <summary>
+ /// Gets or sets the about view model.
+ /// </summary>
+ public IAboutViewModel AboutViewModel { get; set; }
+
#endregion
#region Properties
@@ -1344,7 +1339,7 @@ namespace HandBrakeWPF.ViewModels }
/// <summary>
- /// Enable Debugging features in the UI.
+ /// Gets or sets a value indicating whether debug features are enabled.
/// </summary>
public bool EnableDebugFeatures
{
@@ -1962,5 +1957,16 @@ namespace HandBrakeWPF.ViewModels Process.Start(Path.Combine(Path.GetTempPath(), "handbrake-setup.exe"));
Application.Current.Shutdown();
}
+
+ /// <summary>
+ /// The goto tab.
+ /// </summary>
+ /// <param name="tab">
+ /// The tab.
+ /// </param>
+ public void GotoTab(OptionsTab tab)
+ {
+ this.SelectedTab = tab;
+ }
}
}
\ No newline at end of file |