OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 29 Nov 2009 19:32:16 +0000 (19:32 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 29 Nov 2009 19:32:16 +0000 (19:32 +0000)
- 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://localhost/HandBrake/trunk@2991 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/frmMain.cs
win/C#/frmPreview.cs

index 58ad360..0de757e 100644 (file)
@@ -809,6 +809,7 @@ namespace Handbrake
                 ActivityWindow.SetScanMode();\r
 \r
             ActivityWindow.Show();\r
+            ActivityWindow.Activate();\r
         }\r
         #endregion\r
 \r
index 078a15e..24a1914 100644 (file)
@@ -43,7 +43,9 @@ namespace Handbrake
             lbl_status.Visible = true;\r
             try\r
             {\r
-                QTControl.URL = "";\r
+                if (!noQT)\r
+                    QTControl.URL = "";\r
+\r
                 if (File.Exists(currently_playing))\r
                     File.Delete(currently_playing);\r
             }\r
@@ -172,6 +174,22 @@ namespace Handbrake
             {\r
                 if (File.Exists(currently_playing))\r
                 {\r
+                    // Attempt to find VLC if it doesn't exist in the default set location.\r
+                    if (!File.Exists(Properties.Settings.Default.VLC_Path))\r
+                    {\r
+                        if (File.Exists("C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe"))\r
+                        {\r
+                            Properties.Settings.Default.VLC_Path = "C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe";\r
+                            Properties.Settings.Default.Save(); // Save this new path if it does\r
+                        }\r
+                        else\r
+                        {\r
+                            MessageBox.Show(this,\r
+                                            "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\") ",\r
+                                            "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+                        }\r
+                    }\r
+\r
                     if (File.Exists(Properties.Settings.Default.VLC_Path))\r
                     {\r
                         String args = "\"" + currently_playing + "\"";\r
@@ -179,8 +197,7 @@ namespace Handbrake
                         Process.Start(vlc);\r
                         lbl_status.Text = "VLC will now launch.";\r
                     }\r
-                    else\r
-                        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);\r
+                    \r
                 }\r
                 else\r
                     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);\r