summaryrefslogtreecommitdiffstats
path: root/win/C#
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-11-29 19:32:16 +0000
committersr55 <[email protected]>2009-11-29 19:32:16 +0000
commit6a1b02f3fb38da9c39a3dbb0adb8b6fe11bbbea6 (patch)
tree5e5b3d4c2a8bd61790e660758b395f3f291f431f /win/C#
parent8f4c571f85b17d0de124836426f892c72b1dc3cd (diff)
WinGui:
- Preview window: Check the x86 program files directory for VLC if VLC doesn't exist in the main program files directory. - Activate the Activity Window when the button is clicked on. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2991 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#')
-rw-r--r--win/C#/frmMain.cs1
-rw-r--r--win/C#/frmPreview.cs23
2 files changed, 21 insertions, 3 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 58ad36061..0de757e46 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -809,6 +809,7 @@ namespace Handbrake
ActivityWindow.SetScanMode();
ActivityWindow.Show();
+ ActivityWindow.Activate();
}
#endregion
diff --git a/win/C#/frmPreview.cs b/win/C#/frmPreview.cs
index 078a15e4d..24a191463 100644
--- a/win/C#/frmPreview.cs
+++ b/win/C#/frmPreview.cs
@@ -43,7 +43,9 @@ namespace Handbrake
lbl_status.Visible = true;
try
{
- QTControl.URL = "";
+ if (!noQT)
+ QTControl.URL = "";
+
if (File.Exists(currently_playing))
File.Delete(currently_playing);
}
@@ -172,6 +174,22 @@ namespace Handbrake
{
if (File.Exists(currently_playing))
{
+ // Attempt to find VLC if it doesn't exist in the default set location.
+ if (!File.Exists(Properties.Settings.Default.VLC_Path))
+ {
+ if (File.Exists("C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe"))
+ {
+ Properties.Settings.Default.VLC_Path = "C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe";
+ Properties.Settings.Default.Save(); // Save this new path if it does
+ }
+ else
+ {
+ MessageBox.Show(this,
+ "Unable to detect VLC Player. \nPlease make sure VLC is installed and the directory specified in HandBrake's options is correct. (See: \"Tools Menu > Options > Picture Tab\") ",
+ "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ }
+
if (File.Exists(Properties.Settings.Default.VLC_Path))
{
String args = "\"" + currently_playing + "\"";
@@ -179,8 +197,7 @@ namespace Handbrake
Process.Start(vlc);
lbl_status.Text = "VLC will now launch.";
}
- else
- MessageBox.Show(this, "Unable to detect VLC Player. \nPlease make sure VLC is installed and the directory specified in HandBrake's options is correct. (See: \"Tools Menu > Options > Picture Tab\") ", "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
}
else
MessageBox.Show(this, "Unable to find the preview file. Either the file was deleted or the encode failed. Check the activity log for details.", "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);