diff options
author | sr55 <[email protected]> | 2008-09-19 14:07:46 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-09-19 14:07:46 +0000 |
commit | 63358f3ed712537de16a10698e55bccc72a2793a (patch) | |
tree | b97c65e451f4c02f3a59bd6e8adc44428b4461c8 /win/C# | |
parent | c451bb0b078b4d1bfcea1d9c7ceced9166e15711 (diff) |
WinGui:
- 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
Diffstat (limited to 'win/C#')
-rw-r--r-- | win/C#/Functions/Common.cs | 12 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 4 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 17 | ||||
-rw-r--r-- | win/C#/frmReadDVD.cs | 2 |
4 files changed, 24 insertions, 11 deletions
diff --git a/win/C#/Functions/Common.cs b/win/C#/Functions/Common.cs index 01c337817..41f6e71f6 100644 --- a/win/C#/Functions/Common.cs +++ b/win/C#/Functions/Common.cs @@ -1155,7 +1155,17 @@ namespace Handbrake.Functions if (Properties.Settings.Default.autoNamePath.Trim() != "Click 'Browse' to set the default location")
filePath = Properties.Settings.Default.autoNamePath + "\\";
}
- mainWindow.text_destination.Text = filePath + destination_filename + ".mp4";
+
+ if (mainWindow.drop_format.SelectedIndex == 0)
+ mainWindow.text_destination.Text = filePath + destination_filename + ".mp4";
+ else if (mainWindow.drop_format.SelectedIndex == 1)
+ mainWindow.text_destination.Text = filePath + destination_filename + ".m4v";
+ else if (mainWindow.drop_format.SelectedIndex == 2)
+ mainWindow.text_destination.Text = filePath + destination_filename + ".mkv";
+ else if (mainWindow.drop_format.SelectedIndex == 3)
+ mainWindow.text_destination.Text = filePath + destination_filename + ".avi";
+ else if (mainWindow.drop_format.SelectedIndex == 4)
+ mainWindow.text_destination.Text = filePath + destination_filename + ".ogm";
}
else // If the text box already has a path and file
{
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 6f2475507..9f2ba53e1 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -1016,7 +1016,7 @@ namespace Handbrake // ISO_Open
//
this.ISO_Open.DefaultExt = "ISO";
- this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.vob;*.ts;*.mpeg;*.mpeg;*.avi;*.mp4;*.mkv;" +
+ this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.m2ts;*.vob;*.ts;*.mpeg;*.mpeg;*.avi;*.mp4;*.mkv;" +
"";
this.ISO_Open.RestoreDirectory = true;
this.ISO_Open.SupportMultiDottedExtensions = true;
@@ -3191,7 +3191,7 @@ namespace Handbrake this.MinimumSize = new System.Drawing.Size(946, 668);
this.Name = "frmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "Handbrake";
+ this.Text = "HandBrake";
notifyIconMenu.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.data_chpt)).EndInit();
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 3664b319e..349ba98a2 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -1442,14 +1442,17 @@ namespace Handbrake int position = start_chapter - 1;
- if (end_chapter > selectedTitle.Chapters.Count)
- end_chapter = selectedTitle.Chapters.Count;
-
- while (position != end_chapter)
+ if (start_chapter <= end_chapter)
{
- TimeSpan dur = selectedTitle.Chapters[position].Duration;
- Duration = Duration + dur;
- position++;
+ if (end_chapter > selectedTitle.Chapters.Count)
+ end_chapter = selectedTitle.Chapters.Count;
+
+ while (position != end_chapter)
+ {
+ TimeSpan dur = selectedTitle.Chapters[position].Duration;
+ Duration = Duration + dur;
+ position++;
+ }
}
}
diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs index 21dfa6505..f4fc30c71 100644 --- a/win/C#/frmReadDVD.cs +++ b/win/C#/frmReadDVD.cs @@ -89,8 +89,8 @@ namespace Handbrake MessageBox.Show("frmReadDVD.cs - startProc() " + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
closeWindowAfterError();
}
-
}
+
private void updateUIElements()
{
try
|