summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/App.xaml.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2014-03-01 16:44:34 +0000
committersr55 <[email protected]>2014-03-01 16:44:34 +0000
commit319379665d1c25ae634055076658710a44c6eb9f (patch)
tree21ee3a63abaccfc5f1a1644a2b8f9fba8c77b712 /win/CS/HandBrakeWPF/App.xaml.cs
parent41ccf17f3ce06e9811e4714d300b9d5f8daab71e (diff)
WinGui: Add a new command line argument to the HandBrake GUI executable (--reset). This deletes all preset, user preset and settings file which should result in a full reset to defaults.
Also fixed a small bug on the Add to queue button. Don't actually add an item without a destination. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6091 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/App.xaml.cs')
-rw-r--r--win/CS/HandBrakeWPF/App.xaml.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/App.xaml.cs b/win/CS/HandBrakeWPF/App.xaml.cs
index 8d76a8dd2..b8ddfaff1 100644
--- a/win/CS/HandBrakeWPF/App.xaml.cs
+++ b/win/CS/HandBrakeWPF/App.xaml.cs
@@ -18,6 +18,7 @@ namespace HandBrakeWPF
using HandBrake.ApplicationServices.Exceptions;
+ using HandBrakeWPF.Utilities;
using HandBrakeWPF.ViewModels;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -45,7 +46,7 @@ namespace HandBrakeWPF
protected override void OnStartup(StartupEventArgs e)
{
OperatingSystem OS = Environment.OSVersion;
- if ((OS.Platform == PlatformID.Win32NT) && (OS.Version.Major == 5 && OS.Version.Minor == 1 ))
+ if ((OS.Platform == PlatformID.Win32NT) && (OS.Version.Major == 5 && OS.Version.Minor == 1))
{
MessageBox.Show("Windows XP support is currently broken. It is not known if or when it will be fixed.", "Notice", MessageBoxButton.OK, MessageBoxImage.Warning);
Application.Current.Shutdown();
@@ -58,6 +59,13 @@ namespace HandBrakeWPF
MessageBox.Show("Instant HandBrake is just a prototype for toying with ideas. It may or may not work, or even be included in future builds.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning);
}
+ if (e.Args.Any(f => f.Equals("--reset")))
+ {
+ HandBrakeApp.ResetToDefaults();
+ Application.Current.Shutdown();
+ return;
+ }
+
base.OnStartup(e);
// If we have a file dropped on the icon, try scanning it.