- 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
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
// 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
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
\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
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