]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Fri, 19 Sep 2008 14:07:46 +0000 (14:07 +0000)
committersr55 <sr55.hb@outlook.com>
Fri, 19 Sep 2008 14:07:46 +0000 (14:07 +0000)
- Patch from canvas :- use format dropdown value for extension with the autoName function. Typo fix and add's the .m2ts file extension to the file open dialog box.
- Fix in calculateDuration, don't crash if start chapter > end chapter.

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

win/C#/Functions/Common.cs
win/C#/frmMain.Designer.cs
win/C#/frmMain.cs
win/C#/frmReadDVD.cs

index 01c337817b0e27e24f6ade6b78d6b1231cdb5934..41f6e71f62dc13cdddd7c722c5daa03f17313bee 100644 (file)
@@ -1155,7 +1155,17 @@ namespace Handbrake.Functions
                             if (Properties.Settings.Default.autoNamePath.Trim() != "Click 'Browse' to set the default location")\r
                                 filePath = Properties.Settings.Default.autoNamePath + "\\";\r
                         }\r
-                        mainWindow.text_destination.Text = filePath + destination_filename + ".mp4";\r
+\r
+                        if (mainWindow.drop_format.SelectedIndex == 0)\r
+                            mainWindow.text_destination.Text = filePath + destination_filename + ".mp4";\r
+                        else if (mainWindow.drop_format.SelectedIndex == 1)\r
+                            mainWindow.text_destination.Text = filePath + destination_filename + ".m4v";\r
+                        else if (mainWindow.drop_format.SelectedIndex == 2)\r
+                            mainWindow.text_destination.Text = filePath + destination_filename + ".mkv";\r
+                        else if (mainWindow.drop_format.SelectedIndex == 3)\r
+                            mainWindow.text_destination.Text = filePath + destination_filename + ".avi";\r
+                        else if (mainWindow.drop_format.SelectedIndex == 4)\r
+                            mainWindow.text_destination.Text = filePath + destination_filename + ".ogm";\r
                     }\r
                     else // If the text box already has a path and file\r
                     {\r
index 6f2475507f5ea5176bc7db347d0da040e85fd1f7..9f2ba53e18d2056e4c55a80eb331691f8c10b708 100644 (file)
@@ -1016,7 +1016,7 @@ 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;*.avi;*.mp4;*.mkv;" +\r
+            this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.m2ts;*.vob;*.ts;*.mpeg;*.mpeg;*.avi;*.mp4;*.mkv;" +\r
                 "";\r
             this.ISO_Open.RestoreDirectory = true;\r
             this.ISO_Open.SupportMultiDottedExtensions = true;\r
@@ -3191,7 +3191,7 @@ namespace Handbrake
             this.MinimumSize = new System.Drawing.Size(946, 668);\r
             this.Name = "frmMain";\r
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
-            this.Text = "Handbrake";\r
+            this.Text = "HandBrake";\r
             notifyIconMenu.ResumeLayout(false);\r
             ((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).EndInit();\r
             ((System.ComponentModel.ISupportInitialize)(this.data_chpt)).EndInit();\r
index 3664b319e89fc3d819c3d214549289f848d967ba..349ba98a26def2d87ac521df2e75cca9bbbc60b0 100644 (file)
@@ -1442,14 +1442,17 @@ namespace Handbrake
 \r
                 int position = start_chapter - 1;\r
 \r
-                if (end_chapter > selectedTitle.Chapters.Count)\r
-                    end_chapter = selectedTitle.Chapters.Count;\r
-\r
-                while (position != end_chapter)\r
+                if (start_chapter <= end_chapter)\r
                 {\r
-                    TimeSpan dur = selectedTitle.Chapters[position].Duration;\r
-                    Duration = Duration + dur;\r
-                    position++;\r
+                    if (end_chapter > selectedTitle.Chapters.Count)\r
+                        end_chapter = selectedTitle.Chapters.Count;\r
+\r
+                    while (position != end_chapter)\r
+                    {\r
+                        TimeSpan dur = selectedTitle.Chapters[position].Duration;\r
+                        Duration = Duration + dur;\r
+                        position++;\r
+                    }\r
                 }\r
             }\r
 \r
index 21dfa650521f38002ae61e88338cf94d2bd121d6..f4fc30c71b91950bb877aef12d9946ae3aaa0a88 100644 (file)
@@ -89,8 +89,8 @@ namespace Handbrake
                 MessageBox.Show("frmReadDVD.cs - startProc() " + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
                 closeWindowAfterError();\r
             }\r
-\r
         }\r
+\r
         private void updateUIElements()\r
         {\r
             try\r