summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-03-26 14:50:14 +0000
committersr55 <[email protected]>2011-03-26 14:50:14 +0000
commit16f0d75e4648bf14a3163e97fba9905ac79607e8 (patch)
tree6249171a140f107ed25eba724b9272c33cb1a2c2 /win/CS
parent36ceae9d9cabf17124c1b7148f082d7b375d33bc (diff)
WinGui:
- Fix for the AutoName helper. Should now set the correct file extension based on the user preference. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3880 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/Functions/Main.cs17
1 files changed, 12 insertions, 5 deletions
diff --git a/win/CS/Functions/Main.cs b/win/CS/Functions/Main.cs
index 33491ed96..48f15bd6f 100644
--- a/win/CS/Functions/Main.cs
+++ b/win/CS/Functions/Main.cs
@@ -235,10 +235,21 @@ namespace Handbrake.Functions
// Add the appropriate file extension
if (mainWindow.drop_format.SelectedIndex == 0)
{
- destinationFilename += Properties.Settings.Default.useM4v == 0 || Properties.Settings.Default.useM4v == 2 || mainWindow.Check_ChapterMarkers.Checked ||
+ switch (Properties.Settings.Default.useM4v)
+ {
+ case 0: // Automatic
+ destinationFilename += mainWindow.Check_ChapterMarkers.Checked ||
mainWindow.AudioSettings.RequiresM4V() || mainWindow.Subtitles.RequiresM4V()
? ".m4v"
: ".mp4";
+ break;
+ case 1: // Always MP4
+ destinationFilename += ".mp4";
+ break;
+ case 2: // Always M4V
+ destinationFilename += ".m4v";
+ break;
+ }
}
else if (mainWindow.drop_format.SelectedIndex == 1)
destinationFilename += ".mkv";
@@ -268,10 +279,6 @@ namespace Handbrake.Functions
{
// Use the path and change the file extension to match the previous destination
autoNamePath = Path.Combine(Path.GetDirectoryName(mainWindow.text_destination.Text), destinationFilename);
-
- if (Path.HasExtension(mainWindow.text_destination.Text))
- autoNamePath = Path.ChangeExtension(autoNamePath,
- Path.GetExtension(mainWindow.text_destination.Text));
}
}