summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-02-19 19:14:12 +0000
committersr55 <[email protected]>2011-02-19 19:14:12 +0000
commitcc3e6f976310bcc72b31f4011edb7270e885e6b4 (patch)
tree17b961f02aadfbf2e71a8f3e6b7960b58c3ba1d7
parent0b8918fb48eca14c002657942b199b706fc8959d (diff)
WinGui:
- Give more control over MP4 file extensions. (Automatic, Always use MP4, Always use M4v) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3801 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/Functions/Main.cs2
-rw-r--r--win/C#/Properties/Settings.Designer.cs6
-rw-r--r--win/C#/Properties/Settings.settings4
-rw-r--r--win/C#/app.config14
-rw-r--r--win/C#/frmMain.cs22
-rw-r--r--win/C#/frmOptions.Designer.cs45
-rw-r--r--win/C#/frmOptions.cs8
-rw-r--r--win/C#/frmOptions.resx11
8 files changed, 60 insertions, 52 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
index 578d2e8b0..3b1e54631 100644
--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -240,7 +240,7 @@ namespace Handbrake.Functions
// Add the appropriate file extension
if (mainWindow.drop_format.SelectedIndex == 0)
{
- destinationFilename += Properties.Settings.Default.useM4v || mainWindow.Check_ChapterMarkers.Checked ||
+ destinationFilename += Properties.Settings.Default.useM4v == 0 || Properties.Settings.Default.useM4v == 2 || mainWindow.Check_ChapterMarkers.Checked ||
mainWindow.AudioSettings.RequiresM4V() || mainWindow.Subtitles.RequiresM4V()
? ".m4v"
: ".mp4";
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs
index 9dad5078d..5e1a2bfb9 100644
--- a/win/C#/Properties/Settings.Designer.cs
+++ b/win/C#/Properties/Settings.Designer.cs
@@ -336,10 +336,10 @@ namespace Handbrake.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool useM4v {
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public int useM4v {
get {
- return ((bool)(this["useM4v"]));
+ return ((int)(this["useM4v"]));
}
set {
this["useM4v"] = value;
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings
index 2cd3898de..08849f0ea 100644
--- a/win/C#/Properties/Settings.settings
+++ b/win/C#/Properties/Settings.settings
@@ -80,8 +80,8 @@
<Setting Name="daysBetweenUpdateCheck" Type="System.Int32" Scope="User">
<Value Profile="(Default)">7</Value>
</Setting>
- <Setting Name="useM4v" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">True</Value>
+ <Setting Name="useM4v" Type="System.Int32" Scope="User">
+ <Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="PromptOnUnmatchingQueries" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
diff --git a/win/C#/app.config b/win/C#/app.config
index d2164ddf6..c4155cd07 100644
--- a/win/C#/app.config
+++ b/win/C#/app.config
@@ -26,7 +26,7 @@
<value>Do Nothing</value>
</setting>
<setting name="defaultPreset" serializeAs="String">
- <value/>
+ <value />
</setting>
<setting name="hb_build" serializeAs="String">
<value>0</value>
@@ -38,7 +38,7 @@
<value>True</value>
</setting>
<setting name="autoNamePath" serializeAs="String">
- <value/>
+ <value />
</setting>
<setting name="appcast" serializeAs="String">
<value>http://handbrake.fr/appcast.xml</value>
@@ -53,7 +53,7 @@
<value>False</value>
</setting>
<setting name="saveLogPath" serializeAs="String">
- <value/>
+ <value />
</setting>
<setting name="saveLogWithVideo" serializeAs="String">
<value>False</value>
@@ -83,13 +83,13 @@
<value>True</value>
</setting>
<setting name="lastUpdateCheckDate" serializeAs="String">
- <value/>
+ <value />
</setting>
<setting name="daysBetweenUpdateCheck" serializeAs="String">
<value>7</value>
</setting>
<setting name="useM4v" serializeAs="String">
- <value>True</value>
+ <value>0</value>
</setting>
<setting name="PromptOnUnmatchingQueries" serializeAs="String">
<value>True</value>
@@ -101,7 +101,7 @@
<value>0</value>
</setting>
<setting name="hb_platform" serializeAs="String">
- <value/>
+ <value />
</setting>
<setting name="growlQueue" serializeAs="String">
<value>False</value>
@@ -110,7 +110,7 @@
<value>False</value>
</setting>
<setting name="CliExeHash" serializeAs="String">
- <value/>
+ <value />
</setting>
<setting name="previewScanCount" serializeAs="String">
<value>10</value>
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 64ce8c058..1323ff734 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -1787,17 +1787,14 @@ namespace Handbrake
switch (DVD_Save.FilterIndex)
{
case 1:
- if (
- !Path.GetExtension(DVD_Save.FileName).Equals(".mp4",
- StringComparison.InvariantCultureIgnoreCase))
- if (Properties.Settings.Default.useM4v)
+ if (!Path.GetExtension(DVD_Save.FileName).Equals(".mp4", StringComparison.InvariantCultureIgnoreCase))
+ if (Properties.Settings.Default.useM4v == 2 || Properties.Settings.Default.useM4v == 0)
DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", ".m4v").Replace(".mkv", ".m4v");
else
DVD_Save.FileName = DVD_Save.FileName.Replace(".m4v", ".mp4").Replace(".mkv", ".mp4");
break;
case 2:
- if (
- !Path.GetExtension(DVD_Save.FileName).Equals(".mkv", StringComparison.InvariantCultureIgnoreCase))
+ if (!Path.GetExtension(DVD_Save.FileName).Equals(".mkv", StringComparison.InvariantCultureIgnoreCase))
DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", ".mkv").Replace(".m4v", ".mkv");
break;
default:
@@ -1827,11 +1824,7 @@ namespace Handbrake
switch (drop_format.SelectedIndex)
{
case 0:
- if (Properties.Settings.Default.useM4v || Check_ChapterMarkers.Checked ||
- AudioSettings.RequiresM4V() || Subtitles.RequiresM4V())
- SetExtension(".m4v");
- else
- SetExtension(".mp4");
+ SetExtension(".mp4");
break;
case 1:
SetExtension(".mkv");
@@ -1855,9 +1848,8 @@ namespace Handbrake
public void SetExtension(string newExtension)
{
if (newExtension == ".mp4" || newExtension == ".m4v")
- if (Properties.Settings.Default.useM4v || Check_ChapterMarkers.Checked || AudioSettings.RequiresM4V() ||
- Subtitles.RequiresM4V())
- newExtension = ".m4v";
+ if (Check_ChapterMarkers.Checked || AudioSettings.RequiresM4V() || Subtitles.RequiresM4V() || Properties.Settings.Default.useM4v == 2)
+ newExtension = Properties.Settings.Default.useM4v == 1 ? ".mp4" : ".m4v";
else
newExtension = ".mp4";
@@ -2062,7 +2054,7 @@ namespace Handbrake
}
else
{
- if (drop_format.SelectedIndex != 1 && !Properties.Settings.Default.useM4v)
+ if (drop_format.SelectedIndex != 1)
SetExtension(".mp4");
data_chpt.Enabled = false;
btn_importChapters.Enabled = false;
diff --git a/win/C#/frmOptions.Designer.cs b/win/C#/frmOptions.Designer.cs
index 51a7cc904..c304e4d35 100644
--- a/win/C#/frmOptions.Designer.cs
+++ b/win/C#/frmOptions.Designer.cs
@@ -39,12 +39,13 @@ namespace Handbrake
this.drp_completeOption = new System.Windows.Forms.ComboBox();
this.tab_options = new System.Windows.Forms.TabControl();
this.tab_general = new System.Windows.Forms.TabPage();
+ this.label35 = new System.Windows.Forms.Label();
+ this.cb_mp4FileMode = new System.Windows.Forms.ComboBox();
this.label34 = new System.Windows.Forms.Label();
this.check_TitleCase = new System.Windows.Forms.CheckBox();
this.check_removeUnderscores = new System.Windows.Forms.CheckBox();
this.check_growlEncode = new System.Windows.Forms.CheckBox();
this.check_GrowlQueue = new System.Windows.Forms.CheckBox();
- this.check_m4v = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.drop_updateCheckDays = new System.Windows.Forms.ComboBox();
@@ -198,12 +199,13 @@ namespace Handbrake
//
// tab_general
//
+ this.tab_general.Controls.Add(this.label35);
+ this.tab_general.Controls.Add(this.cb_mp4FileMode);
this.tab_general.Controls.Add(this.label34);
this.tab_general.Controls.Add(this.check_TitleCase);
this.tab_general.Controls.Add(this.check_removeUnderscores);
this.tab_general.Controls.Add(this.check_growlEncode);
this.tab_general.Controls.Add(this.check_GrowlQueue);
- this.tab_general.Controls.Add(this.check_m4v);
this.tab_general.Controls.Add(this.label1);
this.tab_general.Controls.Add(this.label7);
this.tab_general.Controls.Add(this.drp_completeOption);
@@ -226,6 +228,30 @@ namespace Handbrake
this.tab_general.Text = "General";
this.tab_general.UseVisualStyleBackColor = true;
//
+ // label35
+ //
+ this.label35.AutoSize = true;
+ this.label35.Location = new System.Drawing.Point(105, 323);
+ this.label35.Name = "label35";
+ this.label35.Size = new System.Drawing.Size(100, 13);
+ this.label35.TabIndex = 104;
+ this.label35.Text = "MP4 File Extension:";
+ //
+ // cb_mp4FileMode
+ //
+ this.cb_mp4FileMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.cb_mp4FileMode.FormattingEnabled = true;
+ this.cb_mp4FileMode.Items.AddRange(new object[] {
+ "Automatic",
+ "Always use MP4",
+ "Always use M4V"});
+ this.cb_mp4FileMode.Location = new System.Drawing.Point(211, 320);
+ this.cb_mp4FileMode.Name = "cb_mp4FileMode";
+ this.cb_mp4FileMode.Size = new System.Drawing.Size(150, 21);
+ this.cb_mp4FileMode.TabIndex = 103;
+ this.ToolTip.SetToolTip(this.cb_mp4FileMode, resources.GetString("cb_mp4FileMode.ToolTip"));
+ this.cb_mp4FileMode.SelectedIndexChanged += new System.EventHandler(this.cb_mp4FileMode_SelectedIndexChanged);
+ //
// label34
//
this.label34.AutoSize = true;
@@ -292,18 +318,6 @@ namespace Handbrake
this.check_GrowlQueue.UseVisualStyleBackColor = false;
this.check_GrowlQueue.CheckedChanged += new System.EventHandler(this.check_GrowlQueue_CheckedChanged);
//
- // check_m4v
- //
- this.check_m4v.AutoSize = true;
- this.check_m4v.Location = new System.Drawing.Point(108, 321);
- this.check_m4v.Name = "check_m4v";
- this.check_m4v.Size = new System.Drawing.Size(319, 17);
- this.check_m4v.TabIndex = 82;
- this.check_m4v.Text = "Always use iPod/iTunes friendly file extension (.m4v) for MP4";
- this.ToolTip.SetToolTip(this.check_m4v, resources.GetString("check_m4v.ToolTip"));
- this.check_m4v.UseVisualStyleBackColor = true;
- this.check_m4v.CheckedChanged += new System.EventHandler(this.check_m4v_CheckedChanged);
- //
// label1
//
this.label1.AutoSize = true;
@@ -1569,7 +1583,6 @@ namespace Handbrake
internal System.Windows.Forms.CheckBox check_trayStatusAlerts;
private System.Windows.Forms.Button btn_viewLogs;
private System.Windows.Forms.Button btn_clearLogs;
- internal System.Windows.Forms.CheckBox check_m4v;
internal System.Windows.Forms.ComboBox drop_updateCheckDays;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
internal System.Windows.Forms.ComboBox drp_Priority;
@@ -1596,5 +1609,7 @@ namespace Handbrake
private System.Windows.Forms.RadioButton radio_preferredAudioAndSubs;
private System.Windows.Forms.CheckBox check_AddCCTracks;
private System.Windows.Forms.Label label34;
+ internal System.Windows.Forms.Label label35;
+ internal System.Windows.Forms.ComboBox cb_mp4FileMode;
}
} \ No newline at end of file
diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs
index 968534cf1..1a3fd1919 100644
--- a/win/C#/frmOptions.cs
+++ b/win/C#/frmOptions.cs
@@ -88,8 +88,7 @@ namespace Handbrake
txt_autoNameFormat.Text = Properties.Settings.Default.autoNameFormat;
// Use iPod/iTunes friendly .m4v extension for MP4 files.
- if (Properties.Settings.Default.useM4v)
- check_m4v.CheckState = CheckState.Checked;
+ cb_mp4FileMode.SelectedIndex = Properties.Settings.Default.useM4v;
// Remove Underscores
check_removeUnderscores.Checked = Properties.Settings.Default.AutoNameRemoveUnderscore;
@@ -287,9 +286,10 @@ namespace Handbrake
}
}
- private void check_m4v_CheckedChanged(object sender, EventArgs e)
+ private void cb_mp4FileMode_SelectedIndexChanged(object sender, EventArgs e)
{
- Properties.Settings.Default.useM4v = check_m4v.Checked;
+
+ Properties.Settings.Default.useM4v = cb_mp4FileMode.SelectedIndex;
}
private void check_removeUnderscores_CheckedChanged(object sender, EventArgs e)
diff --git a/win/C#/frmOptions.resx b/win/C#/frmOptions.resx
index 2bfb5c9f4..7407b5005 100644
--- a/win/C#/frmOptions.resx
+++ b/win/C#/frmOptions.resx
@@ -120,12 +120,13 @@
<metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 18</value>
</metadata>
- <data name="check_m4v.ToolTip" xml:space="preserve">
- <value>Use .m4v instead of .mp4 for MP4 files
+ <data name="cb_mp4FileMode.ToolTip" xml:space="preserve">
+ <value>The default file extension for MP4 Files.
+Automatic - This will use M4v when AC3 Audio, SRT Subtitles or Chapters are present, otherwise MP4.
+Always MP4 - The MP4 extension will always be used.
+Always M4V - The M4V extension will always be used.
-Chapter Markers, AC3 Audio and SRT Subtitles will require the m4v extension if you are using QuickTime for playback.
-When this option is disabled, Chapter Markers, AC3 audio and SRT subtitiles will still automatically change the file extension to m4v.
-</value>
+Note, the file itself is identical. This simply changes the default extension for MP4 files.</value>
</data>
<data name="text_an_path.ToolTip" xml:space="preserve">
<value>This is the default location where your encoded files will be stored if "Automatically name output files" is enabled.