]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Tue, 25 Aug 2009 16:16:00 +0000 (16:16 +0000)
committersr55 <sr55.hb@outlook.com>
Tue, 25 Aug 2009 16:16:00 +0000 (16:16 +0000)
- Fix several issues with Picture Settings panel related to aspect ration and resolution calculation.
- Fix issue where file extension could be mp4 when chapters is enabled. Problem in the autoname function.
- Fix a regex error in the appcast reader and make it more robust to errors.
- Clear up changelog

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

win/C#/Changelog.html
win/C#/Controls/PictureSettings.cs
win/C#/Functions/AppcastReader.cs
win/C#/Functions/Main.cs
win/C#/HandBrakeCS.csproj
win/C#/Parsing/Title.cs
win/C#/frmMain.cs

index 4151f97198f0887080b39491fc9d86d1f1d9629d..ae6d6c3ef1b1d3ff945d6a1f9984a9e31e25392a 100644 (file)
@@ -8,28 +8,41 @@
 <body>\r
 Windows Platform Specific Changlog.<br />\r
 \r
-    <h2>Changes since Snapshot 1 - SVN2592</h2>\r
+    <h2>Changes Since Snapshot 2 - SVN2773</h2> <!-- Snapshot 3 (upcoming) -->\r
     \r
-    <h4>Major Changes</h4>\r
+    <h4>New Features</h4>\r
+    \r
+    <h4>Minor Improvements / Changes</h4>\r
+\r
+    <h4>Fixed</h4>\r
+    - Fix several issues with Picture Settings panel related to aspect ration and resolution calculation. <br />\r
+    - Fix issue where file extension could be mp4 when chapters is enabled. Problem in the autoname function.<br />\r
+    - Fix a regex error in the appcast reader and make it more robust to errors.<br /><br />\r
\r
+  \r
+    <h2>Changes since Snapshot 1 - SVN2592</h2> <!-- Snapshot 2 -->\r
+    \r
+    <h4>New Features</h4>\r
     - Added support for Growl for Windows.<br />\r
     - Import MacGUI presets.<br />\r
     - External SRT supported added.<br />\r
+    - Added new options: preferred language, "Dub Foreign language audio" and "Use Foreign language audio and Subtitles"<br />\r
+    - Import Chapter Markers from csv file <br />\r
     \r
     <h4>Minor Improvements / Changes</h4>\r
     - Some UI layout changes / improvements<br />\r
-    - Added new options: preferred language, "Dub Foreign language audio" and "Use Foreign language audio and Subtitles"<br />\r
     - Remove M4v from format dropdown and add new option "Use iPod/iTunes friendly (.m4v) file extension for MP4<br />\r
-    - Chapter Markers tab now resets far less often. It should retain chapter names after being disabled / re-enabled <br />\r
-    - Chapter Markers tab now as import functionality. It can now import a csv file <br />\r
     \r
     <h4>Fixed</h4>\r
-    - Re-written the Picture Settings Panel code so it should now work a lot better.<br />\r
-    - Issue where the GUI would error if the encode was stopped  too quickly.<br />\r
-    - Numerous other fixes including: Quality slider resetting to 0 and other settings lost when a title change occurs.<br />\r
-    - Fixes some scaling / quality issues with QuickTime preview. Also added a possible fix for QT not working on 64bit systems.<br />\r
-    - Chaning the x264 Quality granularity now longer requires an application restart to work correctly <br />\r
+    - Picture Settings now works correctly (including Custom Anamorphic).<br />\r
+    - Error message when cancelling an encode within 2 seconds of it starting.<br />\r
+    - Quality slider resetting to 0 and other settings lost when a title change occurs.<br />\r
+    - Fixes some scaling / quality issues with QuickTime preview. \r
+    - Possible fix for QT not working on 64bit systems.<br />\r
+    - Chaning the x264 Quality granularity no longer requires a restart to work correctly <br />\r
+    - Chapter Markers tab now resets far less often. It should retain chapter names after being disabled / re-enabled <br />\r
     \r
-    <h2>Changes since 0.9.3</h2>\r
+    <h2>Changes since 0.9.3</h2> <!-- Snapshot 1 -->\r
     \r
     <h4>Major Changes</h4>\r
 \r
index e31b6824d4e4f2b328a6920191d3717b1043f661..f9d322ba9f327d9f88993268afcf578faad6a9f5 100644 (file)
@@ -12,10 +12,10 @@ namespace Handbrake.Controls
         private readonly CultureInfo Culture = new CultureInfo("en-US", false);\r
         public event EventHandler PictureSettingsChanged;\r
 \r
-        private Boolean preventChangingWidth, preventChangingHeight, preventChangingCustom, preventChangingDisplayWidth;\r
-        private int _PresetMaximumWidth, _PresetMaximumHeight;\r
-        private double cachedDar;\r
-        private Title _SourceTitle;\r
+        private Boolean _preventChangingWidth, _preventChangingHeight, _preventChangingCustom, _preventChangingDisplayWidth;\r
+        private int _presetMaximumWidth, _presetMaximumHeight;\r
+        private double _cachedDar;\r
+        private Title _sourceTitle;\r
 \r
         public PictureSettings()\r
         {\r
@@ -32,45 +32,45 @@ namespace Handbrake.Controls
         [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\r
         public Title Source\r
         {\r
-            get { return _SourceTitle; }\r
+            private get { return _sourceTitle; }\r
             set\r
             {\r
-                _SourceTitle = value;\r
-                Enabled = _SourceTitle != null;\r
+                _sourceTitle = value;\r
+                Enabled = _sourceTitle != null;\r
 \r
                 // Set the Aspect Ratio\r
-                lbl_Aspect.Text = _SourceTitle.AspectRatio.ToString(Culture);\r
-                lbl_src_res.Text = _SourceTitle.Resolution.Width + " x " + _SourceTitle.Resolution.Height;\r
+                lbl_Aspect.Text = _sourceTitle.AspectRatio.ToString(Culture);\r
+                lbl_src_res.Text = _sourceTitle.Resolution.Width + " x " + _sourceTitle.Resolution.Height;\r
 \r
                 // Set the Recommended Cropping values\r
-                crop_top.Value = GetCropMod2Clean(_SourceTitle.AutoCropDimensions[0]);\r
-                crop_bottom.Value = GetCropMod2Clean(_SourceTitle.AutoCropDimensions[1]);\r
-                crop_left.Value = GetCropMod2Clean(_SourceTitle.AutoCropDimensions[2]);\r
-                crop_right.Value = GetCropMod2Clean(_SourceTitle.AutoCropDimensions[3]);\r
+                crop_top.Value = GetCropMod2Clean(_sourceTitle.AutoCropDimensions[0]);\r
+                crop_bottom.Value = GetCropMod2Clean(_sourceTitle.AutoCropDimensions[1]);\r
+                crop_left.Value = GetCropMod2Clean(_sourceTitle.AutoCropDimensions[2]);\r
+                crop_right.Value = GetCropMod2Clean(_sourceTitle.AutoCropDimensions[3]);\r
 \r
                 // Set the Resolution Boxes\r
                 if (drp_anamorphic.SelectedIndex == 0)\r
                 {\r
                     if (text_width.Value == 0) // Only update the values if the fields don't already have values.\r
-                        text_width.Value = _SourceTitle.Resolution.Width;\r
+                        text_width.Value = _sourceTitle.Resolution.Width;\r
 \r
                     check_KeepAR.Checked = true; // Forces Resolution to be correct.\r
                 }\r
                 else\r
                 {\r
-                    if (text_width.Value == 0 && text_height.Value ==0)// Only update the values if the fields don't already have values.\r
-                    { \r
-                        text_width.Value = _SourceTitle.Resolution.Width;\r
-                        text_height.Value = _SourceTitle.Resolution.Height - (int) crop_top.Value - (int) crop_bottom.Value;\r
+                    if (text_width.Value == 0 && text_height.Value == 0)// Only update the values if the fields don't already have values.\r
+                    {\r
+                        text_width.Value = _sourceTitle.Resolution.Width;\r
+                        text_height.Value = _sourceTitle.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;\r
                     }\r
 \r
-                    labelDisplaySize.Text = calculateAnamorphicSizes().Width + "x" + calculateAnamorphicSizes().Height;\r
+                    labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height;\r
                 }\r
 \r
-                updownDisplayWidth.Value = calculateAnamorphicSizes().Width;\r
-                updownParWidth.Value = _SourceTitle.ParVal.Width;\r
-                updownParHeight.Value = _SourceTitle.ParVal.Height;\r
-                cachedDar = (double)updownDisplayWidth.Value / (double)text_height.Value;\r
+                updownDisplayWidth.Value = CalculateAnamorphicSizes().Width;\r
+                updownParWidth.Value = _sourceTitle.ParVal.Width;\r
+                updownParHeight.Value = _sourceTitle.ParVal.Height;\r
+                _cachedDar = (double)updownDisplayWidth.Value / (double)text_height.Value;\r
             }\r
         }\r
 \r
@@ -82,11 +82,11 @@ namespace Handbrake.Controls
         [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\r
         public Size PresetMaximumResolution\r
         {\r
-            get { return new Size(_PresetMaximumWidth, _PresetMaximumHeight); }\r
+            get { return new Size(_presetMaximumWidth, _presetMaximumHeight); }\r
             set\r
             {\r
-                _PresetMaximumWidth = value.Width;\r
-                _PresetMaximumHeight = value.Height;\r
+                _presetMaximumWidth = value.Width;\r
+                _presetMaximumHeight = value.Height;\r
 \r
                 if (value.Width != 0 && value.Height != 0)\r
                     lbl_max.Text = "Max Width / Height";\r
@@ -102,7 +102,7 @@ namespace Handbrake.Controls
         // Picture Controls\r
         private void text_width_ValueChanged(object sender, EventArgs e)\r
         {\r
-            if (preventChangingWidth)\r
+            if (_preventChangingWidth)\r
                 return;\r
 \r
             // Make sure the new value doesn't exceed the maximum\r
@@ -115,28 +115,32 @@ namespace Handbrake.Controls
                 case 0:\r
                     if (check_KeepAR.Checked && Source != null)\r
                     {\r
-                        preventChangingHeight = true;\r
+                        _preventChangingHeight = true;\r
 \r
                         int width = (int)text_width.Value;\r
 \r
-                        double crop_width = Source.Resolution.Width - (double)crop_left.Value - (double)crop_right.Value;\r
-                        double crop_height = Source.Resolution.Height - (double)crop_top.Value - (double)crop_bottom.Value;\r
-                        double newHeight = (width * Source.Resolution.Width * sourceAspect.Height * crop_height) /\r
-                                           (Source.Resolution.Height * sourceAspect.Width * crop_width);\r
+                        double crop_width = Source.Resolution.Width - (int)crop_left.Value - (int)crop_right.Value;\r
+                        double crop_height = Source.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;\r
+\r
+                        if (SourceAspect.Width == 0 && SourceAspect.Height == 0)\r
+                            break;\r
+\r
+                        double newHeight = ((double)width * Source.Resolution.Width * SourceAspect.Height * crop_height) /\r
+                                           (Source.Resolution.Height * SourceAspect.Width * crop_width);\r
                         text_height.Value = (decimal)GetModulusValue(newHeight);\r
 \r
-                        preventChangingHeight = false;\r
+                        _preventChangingHeight = false;\r
                     }\r
                     break;\r
                 case 3:\r
                     if (check_KeepAR.CheckState == CheckState.Unchecked && Source != null)\r
                     {\r
-                        if (preventChangingCustom)\r
+                        if (_preventChangingCustom)\r
                             break;\r
 \r
-                        preventChangingDisplayWidth = true;\r
+                        _preventChangingDisplayWidth = true;\r
                         updownDisplayWidth.Value = text_width.Value * updownParWidth.Value / updownParHeight.Value;\r
-                        preventChangingDisplayWidth = false;\r
+                        _preventChangingDisplayWidth = false;\r
 \r
                         labelDisplaySize.Text = Math.Truncate(updownDisplayWidth.Value) + "x" + text_height.Value;\r
                     }\r
@@ -148,15 +152,15 @@ namespace Handbrake.Controls
                     }\r
                     break;\r
                 default:\r
-                    labelDisplaySize.Text = calculateAnamorphicSizes().Width + "x" + calculateAnamorphicSizes().Height;\r
+                    labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height;\r
                     break;\r
             }\r
 \r
-            preventChangingWidth = false;\r
+            _preventChangingWidth = false;\r
         }\r
         private void text_height_ValueChanged(object sender, EventArgs e)\r
         {\r
-            if (preventChangingHeight)\r
+            if (_preventChangingHeight)\r
                 return;\r
 \r
             if (Source != null)\r
@@ -168,17 +172,17 @@ namespace Handbrake.Controls
                 case 0:\r
                     if (check_KeepAR.Checked && Source != null)\r
                     {\r
-                        preventChangingWidth = true;\r
+                        _preventChangingWidth = true;\r
 \r
-                        double crop_width = Source.Resolution.Width - (double)crop_left.Value - (double)crop_right.Value;\r
-                        double crop_height = Source.Resolution.Height - (double)crop_top.Value - (double)crop_bottom.Value;\r
+                        double crop_width = Source.Resolution.Width - (int)crop_left.Value - (int)crop_right.Value;\r
+                        double crop_height = Source.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;\r
 \r
-                        double new_width = ((double)text_height.Value * Source.Resolution.Height * sourceAspect.Width * crop_width) /\r
-                                            (Source.Resolution.Width * sourceAspect.Height * crop_height);\r
+                        double new_width = ((double)text_height.Value * Source.Resolution.Height * SourceAspect.Width * crop_width) /\r
+                                            (Source.Resolution.Width * SourceAspect.Height * crop_height);\r
 \r
                         text_width.Value = (decimal)GetModulusValue(new_width);\r
 \r
-                        preventChangingWidth = false;\r
+                        _preventChangingWidth = false;\r
                     }\r
                     break;\r
                 case 3:\r
@@ -191,26 +195,26 @@ namespace Handbrake.Controls
                         // - Changes PIXEL HEIGHT to STORAGE WIDTH\r
                         // DAR = DISPLAY WIDTH / DISPLAY HEIGHT (cache after every modification)\r
 \r
-                        double rawCalculatedDisplayWidth = (double)text_height.Value * cachedDar;\r
+                        double rawCalculatedDisplayWidth = (double)text_height.Value * _cachedDar;\r
 \r
-                        preventChangingDisplayWidth = true; // Start Guards\r
-                        preventChangingWidth = true;\r
+                        _preventChangingDisplayWidth = true; // Start Guards\r
+                        _preventChangingWidth = true;\r
 \r
                         updownDisplayWidth.Value = (decimal)rawCalculatedDisplayWidth;\r
                         updownParWidth.Value = updownDisplayWidth.Value;\r
                         updownParHeight.Value = text_width.Value;\r
 \r
-                        preventChangingWidth = false; // Reset Guards\r
-                        preventChangingDisplayWidth = false;\r
+                        _preventChangingWidth = false; // Reset Guards\r
+                        _preventChangingDisplayWidth = false;\r
                     }\r
 \r
                     break;\r
                 default:\r
-                    labelDisplaySize.Text = calculateAnamorphicSizes().Width + "x" + calculateAnamorphicSizes().Height;\r
+                    labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height;\r
                     break;\r
             }\r
 \r
-            preventChangingHeight = false;\r
+            _preventChangingHeight = false;\r
         }\r
         private void check_KeepAR_CheckedChanged(object sender, EventArgs e)\r
         {\r
@@ -231,15 +235,15 @@ namespace Handbrake.Controls
         }\r
         private void updownDisplayWidth_ValueChanged(object sender, EventArgs e)\r
         {\r
-            if (preventChangingDisplayWidth == false && check_KeepAR.CheckState == CheckState.Unchecked)\r
+            if (_preventChangingDisplayWidth == false && check_KeepAR.CheckState == CheckState.Unchecked)\r
             {\r
-                preventChangingCustom = true;\r
+                _preventChangingCustom = true;\r
                 updownParWidth.Value = updownDisplayWidth.Value;\r
                 updownParHeight.Value = text_width.Value;\r
-                preventChangingCustom = false;\r
+                _preventChangingCustom = false;\r
             }\r
 \r
-            if (preventChangingDisplayWidth == false && check_KeepAR.CheckState == CheckState.Checked)\r
+            if (_preventChangingDisplayWidth == false && check_KeepAR.CheckState == CheckState.Checked)\r
             {\r
                 // - Changes HEIGHT to keep DAR\r
                 // - Changes PIXEL WIDTH to new DISPLAY WIDTH\r
@@ -250,15 +254,15 @@ namespace Handbrake.Controls
                 int modulus = 16;\r
                 int.TryParse(drp_modulus.SelectedItem.ToString(), out modulus);\r
 \r
-                int rawCalculatedHeight = (int)((int)updownDisplayWidth.Value / cachedDar);\r
+                int rawCalculatedHeight = (int)((int)updownDisplayWidth.Value / _cachedDar);\r
                 int modulusHeight = rawCalculatedHeight - (rawCalculatedHeight % modulus);\r
 \r
                 // Update value\r
-                preventChangingHeight = true;\r
+                _preventChangingHeight = true;\r
                 text_height.Value = (decimal)modulusHeight;\r
                 updownParWidth.Value = updownDisplayWidth.Value;\r
                 updownParHeight.Value = text_width.Value;\r
-                preventChangingHeight = false;\r
+                _preventChangingHeight = false;\r
             }\r
 \r
         }\r
@@ -273,7 +277,7 @@ namespace Handbrake.Controls
                     text_height.Enabled = true;\r
                     check_KeepAR.Enabled = true;\r
 \r
-                    setCustomAnamorphicOptionsVisible(false);\r
+                    SetCustomAnamorphicOptionsVisible(false);\r
                     labelStaticDisplaySize.Visible = false;\r
                     labelDisplaySize.Visible = false;\r
 \r
@@ -289,7 +293,7 @@ namespace Handbrake.Controls
                     text_height.Enabled = false;\r
                     check_KeepAR.Enabled = false;\r
 \r
-                    setCustomAnamorphicOptionsVisible(false);\r
+                    SetCustomAnamorphicOptionsVisible(false);\r
                     labelStaticDisplaySize.Visible = true;\r
                     labelDisplaySize.Visible = true;\r
                     drp_modulus.SelectedIndex = 0;\r
@@ -301,7 +305,7 @@ namespace Handbrake.Controls
                     text_height.Enabled = false;\r
                     check_KeepAR.Enabled = false;\r
 \r
-                    setCustomAnamorphicOptionsVisible(false);\r
+                    SetCustomAnamorphicOptionsVisible(false);\r
                     labelStaticDisplaySize.Visible = true;\r
                     labelDisplaySize.Visible = true;\r
                     drp_modulus.SelectedIndex = 0;\r
@@ -313,7 +317,7 @@ namespace Handbrake.Controls
                     text_height.Enabled = true;\r
                     check_KeepAR.Enabled = true;\r
 \r
-                    setCustomAnamorphicOptionsVisible(true);\r
+                    SetCustomAnamorphicOptionsVisible(true);\r
                     labelStaticDisplaySize.Visible = true;\r
                     labelDisplaySize.Visible = true;\r
 \r
@@ -321,7 +325,7 @@ namespace Handbrake.Controls
                     break;\r
             }\r
 \r
-            labelDisplaySize.Text = calculateAnamorphicSizes().Width + "x" + calculateAnamorphicSizes().Height;\r
+            labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height;\r
 \r
             if (check_KeepAR.Checked)\r
                 text_width_ValueChanged(this, new EventArgs());\r
@@ -331,14 +335,14 @@ namespace Handbrake.Controls
         }\r
         private void drp_modulus_SelectedIndexChanged(object sender, EventArgs e)\r
         {\r
-            preventChangingWidth = true;\r
-            preventChangingHeight = true;\r
+            _preventChangingWidth = true;\r
+            _preventChangingHeight = true;\r
 \r
             text_width.Value = (decimal)GetModulusValue((double)text_width.Value);\r
             text_height.Value = (decimal)GetModulusValue((double)text_height.Value);\r
 \r
-            preventChangingWidth = false;\r
-            preventChangingHeight = false;\r
+            _preventChangingWidth = false;\r
+            _preventChangingHeight = false;\r
 \r
             text_width.Increment = int.Parse(drp_modulus.SelectedItem.ToString());\r
             text_height.Increment = int.Parse(drp_modulus.SelectedItem.ToString());\r
@@ -361,7 +365,7 @@ namespace Handbrake.Controls
         }\r
 \r
         // GUI Functions\r
-        private void setCustomAnamorphicOptionsVisible(bool visible)\r
+        private void SetCustomAnamorphicOptionsVisible(bool visible)\r
         {\r
             lbl_modulus.Visible = visible;\r
             lbl_displayWidth.Visible = visible;\r
@@ -375,21 +379,17 @@ namespace Handbrake.Controls
         }\r
 \r
         // Calculation Functions\r
-        private Size sourceAspect\r
+        private Size SourceAspect\r
         {\r
             get\r
             {\r
-                if (Source != null)\r
-                {\r
-                    if (Source.AspectRatio == 1.78F)\r
-                        return new Size(16, 9);\r
-                    if (Source.AspectRatio == 1.33F)\r
-                        return new Size(4, 3);\r
-                }\r
-                return new Size(0, 0);\r
+                if (Source != null) // display aspect = (width * par_width) / (height * par_height)\r
+                    return new Size((Source.ParVal.Width * Source.Resolution.Width), (Source.ParVal.Height * Source.Resolution.Height));\r
+\r
+                return new Size(0, 0); // Fall over to 16:9 and hope for the best\r
             }\r
         }\r
-        private Size calculateAnamorphicSizes()\r
+        private Size CalculateAnamorphicSizes()\r
         {\r
             if (Source != null)\r
             {\r
@@ -410,6 +410,7 @@ namespace Handbrake.Controls
                 double width, height;\r
                 switch (drp_anamorphic.SelectedIndex)\r
                 {\r
+                    default:\r
                     case 1:\r
                         /* Strict anamorphic */\r
                         double displayWidth = ((double)cropped_width * Source.ParVal.Width / Source.ParVal.Height);\r
index 861bd0bae7d378877791dd7cb99359ca4c7b95da..7f1e90b88aa2b7e56b61155ebd42604a704cabef 100644 (file)
@@ -18,18 +18,24 @@ namespace Handbrake.Functions
         /// </summary>\r
         public void getInfo(string input)\r
         {\r
-            // Get the correct Appcast and set input.\r
-            XmlNode nodeItem = readRss(new XmlTextReader(new StringReader(input)));\r
-            string result = nodeItem.InnerXml;\r
+            try\r
+            {\r
+                // Get the correct Appcast and set input.\r
+                XmlNode nodeItem = readRss(new XmlTextReader(new StringReader(input)));\r
+                string result = nodeItem.InnerXml;\r
 \r
-            // Regular Expressions\r
-            Match ver = Regex.Match(result, @"sparkle:version=""([0-9]*)\""");\r
-            Match verShort = Regex.Match(result, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\""");\r
+                // Regular Expressions\r
+                Match ver = Regex.Match(result, @"sparkle:version=""([0-9]*)\""");\r
+                Match verShort = Regex.Match(result, @"sparkle:shortVersionString=""(([svn]*)([0-9.\s]*))\""");\r
 \r
-            build = ver.ToString().Replace("sparkle:version=", "").Replace("\"", "");\r
-            version = verShort.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");\r
-            downloadFile = nodeItem["windows"].InnerText;\r
-            descriptionUrl = new Uri(nodeItem["sparkle:releaseNotesLink"].InnerText);\r
+                build = ver.ToString().Replace("sparkle:version=", "").Replace("\"", "");\r
+                version = verShort.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");\r
+                downloadFile = nodeItem["windows"].InnerText;\r
+                descriptionUrl = new Uri(nodeItem["sparkle:releaseNotesLink"].InnerText);\r
+            } catch( Exception)\r
+            {\r
+                // Ignore Error.\r
+            }\r
         }\r
 \r
         /// <summary>\r
index db127b2616741926b2b39976c6de78cb8e017b95..55b95c4a8379788644dccd7986fbfe32a522845f 100644 (file)
@@ -124,7 +124,7 @@ namespace Handbrake.Functions
         /// Function which generates the filename and path automatically based on \r
         /// the Source Name, DVD title and DVD Chapters\r
         /// </summary>\r
-        public static string autoName(ComboBox drpDvdtitle, string chapter_start, string chatper_end, string source, string dest, int format)\r
+        public static string autoName(ComboBox drpDvdtitle, string chapter_start, string chatper_end, string source, string dest, int format, Boolean chapters)\r
         {\r
             string AutoNamePath = string.Empty;\r
             if (drpDvdtitle.Text != "Automatic")\r
@@ -156,7 +156,7 @@ namespace Handbrake.Functions
                 // Add the appropriate file extension\r
                 if (format == 0)\r
                 {\r
-                    if (Properties.Settings.Default.useM4v)\r
+                    if (Properties.Settings.Default.useM4v || chapters)\r
                         destinationFilename += ".m4v";\r
                     else\r
                         destinationFilename += ".mp4";\r
index 9cd0c74302938e2bf4af8fd0e22e9074af5b04f6..4c3a4f8c1c079c158f880f8ca6b33c6000e4cabc 100644 (file)
       <HintPath>libraries\Growl.CoreLibrary.dll</HintPath>\r
       <Private>True</Private>\r
     </Reference>\r
-    <Reference Include="PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=x86" />\r
-    <Reference Include="PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />\r
     <Reference Include="System" />\r
     <Reference Include="System.Data" />\r
     <Reference Include="System.Deployment" />\r
index deee24ad081f766576c9d845105db717656e2892..9c44330f10c2efa157a6d13fd7979ac305e33d78 100644 (file)
@@ -175,8 +175,6 @@ namespace Handbrake.Parsing
                             @"^  \+ size: ([0-9]*)x([0-9]*), pixel aspect: ([0-9]*)/([0-9]*), display aspect: ([0-9]*\.[0-9]*), ([0-9]*\.[0-9]*) fps");\r
             //size: 720x576, pixel aspect: 16/15, display aspect: 1.33, 25.000 fps\r
 \r
-\r
-\r
             if (m.Success)\r
             {\r
                 thisTitle.m_resolution = new Size(int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value));\r
index 224c077c5797d1822b479b4fb61bbc42a5420073..fb63ed2295b806ce356bb373d6426842b88ab41a 100644 (file)
@@ -69,12 +69,12 @@ namespace Handbrake
                 DateTime lastCheck = Properties.Settings.Default.lastUpdateCheckDate;\r
                 TimeSpan elapsed = now.Subtract(lastCheck);\r
                 if (elapsed.TotalDays > Properties.Settings.Default.daysBetweenUpdateCheck)\r
-                {\r
+               {\r
                     lblStatus.Text = "Checking for updates ...";\r
                     Application.DoEvents();\r
 \r
                     Main.BeginCheckForUpdates(new AsyncCallback(UpdateCheckDone), false);\r
-                }\r
+               }\r
             }\r
 \r
             // Setup the GUI components\r
@@ -939,7 +939,7 @@ namespace Handbrake
             // Run the autoName & chapterNaming functions\r
             if (Properties.Settings.Default.autoNaming)\r
             {\r
-                string autoPath = Main.autoName(drp_dvdtitle, drop_chapterStart.Text, drop_chapterFinish.Text, sourcePath, text_destination.Text, drop_format.SelectedIndex);\r
+                string autoPath = Main.autoName(drp_dvdtitle, drop_chapterStart.Text, drop_chapterFinish.Text, sourcePath, text_destination.Text, drop_format.SelectedIndex, Check_ChapterMarkers.Checked);\r
                 if (autoPath != null)\r
                     text_destination.Text = autoPath;\r
                 else\r
@@ -1014,7 +1014,7 @@ namespace Handbrake
 \r
             // Run the Autonaming function\r
             if (Properties.Settings.Default.autoNaming)\r
-                text_destination.Text = Main.autoName(drp_dvdtitle, drop_chapterStart.Text, drop_chapterFinish.Text, sourcePath, text_destination.Text, drop_format.SelectedIndex);\r
+                text_destination.Text = Main.autoName(drp_dvdtitle, drop_chapterStart.Text, drop_chapterFinish.Text, sourcePath, text_destination.Text, drop_format.SelectedIndex, Check_ChapterMarkers.Checked);\r
 \r
             // Disable chapter markers if only 1 chapter is selected.\r
             if (chapterStart == chapterEnd)\r