]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Sat, 17 May 2008 20:20:25 +0000 (20:20 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 17 May 2008 20:20:25 +0000 (20:20 +0000)
- Changes -a auto  to -a 1 (The CLI was throwing an error message with auto)
- Misc other changes and code cleanup.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1463 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Functions/Common.cs
win/C#/Functions/x264Panel.cs
win/C#/app.config
win/C#/frmActivityWindow.cs
win/C#/frmMain.Designer.cs
win/C#/frmMain.cs

index 4cd18b5d03aff336396d4f345f1ded373ef3c562..61bd8e5a14156deffd603543c6c9a21a12978e46 100644 (file)
@@ -769,7 +769,7 @@ namespace Handbrake.Functions
             // Audio Track Selections\r
             //\r
             if (track1 == "Automatic")\r
-                tracks = " -a auto";\r
+                tracks = " -a 1";\r
             else if (track1 == "")\r
                 tracks = "";\r
             else if (track1 == "None")\r
index e585a393989ee1d098885c7ee587261c9b692500..0aeac2920fb557078adc2a1240c44531d30bb819 100644 (file)
@@ -557,6 +557,7 @@ namespace Handbrake.Functions
             /* Change the option string to reflect the new mod settings */\r
             mainWindow.rtf_x264Query.Text = changedOptString;\r
         }\r
+\r
         /*\r
          * Used by on_x264_WidgetChange()\r
          * Called when the current x264 option string contains no options.\r
@@ -920,6 +921,7 @@ namespace Handbrake.Functions
                 }\r
             }\r
         }\r
+\r
         /*\r
          * Take a single option and standardize it. Returns as a String\r
          * Input: String. - Single X264 Option. Name only\r
index 1b9181203bbb0c99edb091e7ae03cd3450bc6fc6..83490f5acf14ce142e124ddd78e423634303eadd 100644 (file)
@@ -20,7 +20,7 @@
                 <value>Checked</value>\r
             </setting>\r
             <setting name="hb_version" serializeAs="String">\r
-                <value>0.9.3</value>\r
+                <value>SVN1457</value>\r
             </setting>\r
             <setting name="tooltipEnable" serializeAs="String">\r
                 <value>Checked</value>\r
@@ -32,7 +32,7 @@
                 <value>Checked</value>\r
             </setting>\r
             <setting name="hb_build" serializeAs="String">\r
-                <value>2008043001</value>\r
+                <value>2008051201</value>\r
             </setting>\r
             <setting name="skipversion" serializeAs="String">\r
                 <value>0</value>\r
index 7c4d302c0437ac068993cd08745ac146eeab1522..73abbbe7774906f4c99f1a3462f2ce4707a0d799 100644 (file)
@@ -38,15 +38,19 @@ namespace Handbrake
             string logFile = Path.Combine(Path.GetTempPath(), read_file);\r
             if (File.Exists(logFile))\r
             {\r
-                monitorFile = new Thread(autoUpdate);\r
-                monitorFile.Start();\r
+                if (read_file == "dvdinfo.dat") // No need to refresh the window if we are viwing dvdinfo.dat\r
+                    updateTextFromThread();\r
+                else // however, we should refresh when reading the encode log file.\r
+                {\r
+                    monitorFile = new Thread(autoUpdate);\r
+                    monitorFile.Start();\r
+                }\r
             }\r
             else\r
-            {\r
                 MessageBox.Show("The log file could not be found. Maybe you cleared your system's tempory folder or maybe you just havn't run an encode yet.", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
-            }\r
         }\r
 \r
+        // Update the Activity window every 5 seconds with the latest log data.\r
         private void autoUpdate(object state)\r
         {\r
             while (true)\r
@@ -59,17 +63,21 @@ namespace Handbrake
         private delegate void UpdateUIHandler();\r
         private void updateTextFromThread()\r
         {\r
-            if (this.InvokeRequired)\r
+            try\r
             {\r
-                this.BeginInvoke(new UpdateUIHandler(updateTextFromThread));\r
-                return;\r
+                if (this.InvokeRequired)\r
+                {\r
+                    this.BeginInvoke(new UpdateUIHandler(updateTextFromThread));\r
+                    return;\r
+                }\r
+                rtf_actLog.Text = readFile();\r
+                this.rtf_actLog.SelectionStart = this.rtf_actLog.Text.Length - 1;\r
+                this.rtf_actLog.ScrollToCaret();\r
+            }\r
+            catch (Exception exc)\r
+            {\r
+                MessageBox.Show(exc.ToString());\r
             }\r
-            rtf_actLog.Text = readFile();\r
-            this.rtf_actLog.SelectionStart = this.rtf_actLog.Text.Length - 1;\r
-            this.rtf_actLog.ScrollToCaret();\r
-\r
-            //if (rtf_actLog.Text.Contains("HandBrake has exited."))\r
-            //monitorFile.Abort();\r
         }\r
 \r
         private string readFile()\r
index 2ce420367d68484201d8268d7c4e2fc0441761ac..f11b56f87e63c72f0484f09e5c29c4c274bcd08d 100644 (file)
@@ -966,9 +966,10 @@ namespace Handbrake
             // ISO_Open\r
             // \r
             this.ISO_Open.DefaultExt = "ISO";\r
-            this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.vob;*.ts;*.mpeg;*.mpeg;";\r
+            this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.vob;*.ts;*.mpeg;*.mpeg;*.avi;*.mp4;*.mkv;";\r
             this.ISO_Open.RestoreDirectory = true;\r
             this.ISO_Open.SupportMultiDottedExtensions = true;\r
+  \r
             // \r
             // FileToolStripMenuItem\r
             // \r
index 76bb5f26c927c34da3ed9d67691623b6c1d75439..12b51041b73c33a8842b94a9b313112baf049330 100644 (file)
@@ -150,6 +150,7 @@ namespace Handbrake
             Form splash = new frmSplashScreen();\r
             splash.Show();\r
         }\r
+\r
         private void setupH264Panel()\r
         {\r
             /*Set opt widget values here*/\r
@@ -275,6 +276,7 @@ namespace Handbrake
             /* Standardize the option string */\r
             rtf_x264Query.Text = "";\r
         }\r
+\r
         private void loadUserDefaults()\r
         {\r
             string userDefaults = Properties.Settings.Default.defaultUserSettings;\r
@@ -1971,10 +1973,8 @@ namespace Handbrake
         }\r
 \r
         #endregion\r
-\r
  \r
-\r
-\r
+        \r
         // This is the END of the road ------------------------------------------------------------------------------\r
     }\r
 }
\ No newline at end of file