diff options
-rw-r--r-- | win/C#/Controls/Subtitles.cs | 2 | ||||
-rw-r--r-- | win/C#/Functions/Main.cs | 9 | ||||
-rw-r--r-- | win/C#/Functions/PresetLoader.cs | 7 | ||||
-rw-r--r-- | win/C#/Properties/Settings.Designer.cs | 12 | ||||
-rw-r--r-- | win/C#/Properties/Settings.settings | 3 | ||||
-rw-r--r-- | win/C#/app.config | 3 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 25 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 37 | ||||
-rw-r--r-- | win/C#/frmOptions.Designer.cs | 16 | ||||
-rw-r--r-- | win/C#/frmOptions.cs | 14 |
10 files changed, 82 insertions, 46 deletions
diff --git a/win/C#/Controls/Subtitles.cs b/win/C#/Controls/Subtitles.cs index 47864f2ee..9358a7942 100644 --- a/win/C#/Controls/Subtitles.cs +++ b/win/C#/Controls/Subtitles.cs @@ -17,7 +17,7 @@ namespace Handbrake.Controls {
fileContainer = value;
Boolean trigger = false;
- if (fileContainer != 2)
+ if (fileContainer != 1)
foreach (ListViewItem item in lv_subList.Items)
{
if (item.SubItems[1].Text.Contains("Bitmap"))
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs index 1b223babd..d2e136a91 100644 --- a/win/C#/Functions/Main.cs +++ b/win/C#/Functions/Main.cs @@ -162,10 +162,13 @@ namespace Handbrake.Functions // Add the appropriate file extension
if (format == 0)
- destination_filename += ".mp4";
+ {
+ if (Properties.Settings.Default.useM4v)
+ destination_filename += ".m4v";
+ else
+ destination_filename += ".mp4";
+ }
else if (format == 1)
- destination_filename += ".m4v";
- else if (format == 2)
destination_filename += ".mkv";
// Now work out the path where the file will be stored.
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs index 043436c02..28cec6805 100644 --- a/win/C#/Functions/PresetLoader.cs +++ b/win/C#/Functions/PresetLoader.cs @@ -45,14 +45,9 @@ namespace Handbrake.Functions if (presetQuery.Format != null)
{
- if (presetQuery.Format == "mp4")
+ if (presetQuery.Format == "mp4" || presetQuery.Format == "m4v")
mainWindow.drop_format.SelectedIndex = 0;
- else if (presetQuery.Format == "m4v")
- mainWindow.drop_format.SelectedIndex = 1;
else if (presetQuery.Format == "mkv")
- mainWindow.drop_format.SelectedIndex = 2;
-
- if (presetQuery.ChapterMarkers && presetQuery.Format == "mp4")
mainWindow.drop_format.SelectedIndex = 1;
}
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index f61126209..026d297fb 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -393,5 +393,17 @@ namespace Handbrake.Properties { this["daysBetweenUpdateCheck"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool useM4v {
+ get {
+ return ((bool)(this["useM4v"]));
+ }
+ set {
+ this["useM4v"] = value;
+ }
+ }
}
}
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index 76bf6ca5a..834ae32e7 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -95,5 +95,8 @@ <Setting Name="daysBetweenUpdateCheck" Type="System.Int32" Scope="User">
<Value Profile="(Default)">5</Value>
</Setting>
+ <Setting Name="useM4v" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">False</Value>
+ </Setting>
</Settings>
</SettingsFile>
\ No newline at end of file diff --git a/win/C#/app.config b/win/C#/app.config index 9a95c030e..21a7c3b1d 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -100,6 +100,9 @@ <setting name="daysBetweenUpdateCheck" serializeAs="String">
<value>5</value>
</setting>
+ <setting name="useM4v" serializeAs="String">
+ <value>False</value>
+ </setting>
</Handbrake.Properties.Settings>
</userSettings>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index d7b522eb3..b93072ab2 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -153,12 +153,12 @@ namespace Handbrake this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.StatusStrip = new System.Windows.Forms.StatusStrip();
this.lbl_encode = new System.Windows.Forms.ToolStripStatusLabel();
+ this.lbl_updateCheck = new System.Windows.Forms.ToolStripStatusLabel();
this.hbproc = new System.Diagnostics.Process();
this.label1 = new System.Windows.Forms.Label();
this.lbl_source = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.groupBox_output = new System.Windows.Forms.Label();
- this.lbl_updateCheck = new System.Windows.Forms.ToolStripStatusLabel();
this.PictureSettings = new Handbrake.Controls.PictureSettings();
this.Filters = new Handbrake.Controls.Filters();
this.AudioSettings = new Handbrake.Controls.AudioPanel();
@@ -204,7 +204,7 @@ namespace Handbrake //
// DVD_Save
//
- this.DVD_Save.Filter = "mp4|*.mp4|m4v|*.m4v|mkv|*.mkv";
+ this.DVD_Save.Filter = "mp4|*.mp4|mkv|*.mkv";
this.DVD_Save.SupportMultiDottedExtensions = true;
//
// File_Save
@@ -484,7 +484,6 @@ namespace Handbrake this.drop_format.FormattingEnabled = true;
this.drop_format.Items.AddRange(new object[] {
"MP4 File",
- "M4V File",
"MKV File"});
this.drop_format.Location = new System.Drawing.Point(78, 215);
this.drop_format.Name = "drop_format";
@@ -1391,6 +1390,16 @@ namespace Handbrake this.lbl_encode.Size = new System.Drawing.Size(31, 17);
this.lbl_encode.Text = "{0}";
//
+ // lbl_updateCheck
+ //
+ this.lbl_updateCheck.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_updateCheck.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.lbl_updateCheck.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_updateCheck.Name = "lbl_updateCheck";
+ this.lbl_updateCheck.Size = new System.Drawing.Size(139, 17);
+ this.lbl_updateCheck.Text = "Checking for Updates ...";
+ this.lbl_updateCheck.Visible = false;
+ //
// hbproc
//
this.hbproc.StartInfo.Domain = "";
@@ -1441,16 +1450,6 @@ namespace Handbrake this.groupBox_output.TabIndex = 47;
this.groupBox_output.Text = "Output Settings: (Preset: None)";
//
- // lbl_updateCheck
- //
- this.lbl_updateCheck.BackColor = System.Drawing.Color.Transparent;
- this.lbl_updateCheck.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.lbl_updateCheck.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_updateCheck.Name = "lbl_updateCheck";
- this.lbl_updateCheck.Size = new System.Drawing.Size(139, 17);
- this.lbl_updateCheck.Text = "Checking for Updates ...";
- this.lbl_updateCheck.Visible = false;
- //
// PictureSettings
//
this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 5da52c61d..d51f9aa41 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -1024,8 +1024,6 @@ namespace Handbrake DVD_Save.FilterIndex = 1;
else if (drop_format.SelectedIndex.Equals(1))
DVD_Save.FilterIndex = 2;
- else if (drop_format.SelectedIndex.Equals(2))
- DVD_Save.FilterIndex = 3;
if (DVD_Save.ShowDialog() == DialogResult.OK)
{
@@ -1038,13 +1036,12 @@ namespace Handbrake {
case 1:
if (!Path.GetExtension(DVD_Save.FileName).Equals(".mp4", StringComparison.InvariantCultureIgnoreCase))
- DVD_Save.FileName += ".mp4";
+ if (Properties.Settings.Default.useM4v)
+ DVD_Save.FileName += ".m4v";
+ else
+ DVD_Save.FileName += ".mp4";
break;
case 2:
- if (!Path.GetExtension(DVD_Save.FileName).Equals(".m4v", StringComparison.InvariantCultureIgnoreCase))
- DVD_Save.FileName += ".m4v";
- break;
- case 3:
if (!Path.GetExtension(DVD_Save.FileName).Equals(".mkv", StringComparison.InvariantCultureIgnoreCase))
DVD_Save.FileName += ".mkv";
break;
@@ -1055,20 +1052,18 @@ namespace Handbrake text_destination.Text = DVD_Save.FileName;
// Quicktime requires .m4v file for chapter markers to work. If checked, change the extension to .m4v (mp4 and m4v are the same thing)
- if (Check_ChapterMarkers.Checked)
- drop_format.SelectedIndex = 1;
+ if (Check_ChapterMarkers.Checked && DVD_Save.FilterIndex != 2)
+ setExtension(".m4v");
}
}
}
private void text_destination_TextChanged(object sender, EventArgs e)
{
string path = text_destination.Text;
- if (path.EndsWith(".mp4"))
+ if (path.EndsWith(".mp4") || path.EndsWith(".m4v"))
drop_format.SelectedIndex = 0;
- else if (path.EndsWith(".m4v"))
- drop_format.SelectedIndex = 1;
else if (path.EndsWith(".mkv"))
- drop_format.SelectedIndex = 2;
+ drop_format.SelectedIndex = 1;
}
// Output Settings
@@ -1077,12 +1072,12 @@ namespace Handbrake switch (drop_format.SelectedIndex)
{
case 0:
- setExtension(".mp4");
+ if (Properties.Settings.Default.useM4v)
+ setExtension(".m4v");
+ else
+ setExtension(".mp4");
break;
case 1:
- setExtension(".m4v");
- break;
- case 2:
setExtension(".mkv");
break;
}
@@ -1273,8 +1268,8 @@ namespace Handbrake {
if (Check_ChapterMarkers.Checked)
{
- if (drop_format.SelectedIndex != 2)
- drop_format.SelectedIndex = 1;
+ if (drop_format.SelectedIndex != 1)
+ setExtension(".m4v");
data_chpt.Rows.Clear();
data_chpt.Enabled = true;
DataGridView chapterGridView = Main.chapterNaming(data_chpt, drop_chapterFinish.Text);
@@ -1283,8 +1278,8 @@ namespace Handbrake }
else
{
- if (drop_format.SelectedIndex != 2)
- drop_format.SelectedIndex = 0;
+ if (drop_format.SelectedIndex != 1 && !Properties.Settings.Default.useM4v)
+ setExtension(".mp4");
data_chpt.Rows.Clear();
data_chpt.Enabled = false;
}
diff --git a/win/C#/frmOptions.Designer.cs b/win/C#/frmOptions.Designer.cs index edb2fe5ef..5817af67e 100644 --- a/win/C#/frmOptions.Designer.cs +++ b/win/C#/frmOptions.Designer.cs @@ -123,6 +123,7 @@ namespace Handbrake this.label26 = new System.Windows.Forms.Label();
this.label27 = new System.Windows.Forms.Label();
this.openFile_vlc = new System.Windows.Forms.OpenFileDialog();
+ this.check_m4v = new System.Windows.Forms.CheckBox();
this.tab_options.SuspendLayout();
this.tab_general.SuspendLayout();
this.tab_picture.SuspendLayout();
@@ -180,6 +181,7 @@ namespace Handbrake //
// tab_general
//
+ this.tab_general.Controls.Add(this.check_m4v);
this.tab_general.Controls.Add(this.label7);
this.tab_general.Controls.Add(this.label5);
this.tab_general.Controls.Add(this.txt_autoNameFormat);
@@ -1210,6 +1212,19 @@ namespace Handbrake this.openFile_vlc.DefaultExt = "exe";
this.openFile_vlc.Filter = "exe|*.exe";
//
+ // check_m4v
+ //
+ this.check_m4v.AutoSize = true;
+ this.check_m4v.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.check_m4v.Location = new System.Drawing.Point(114, 247);
+ this.check_m4v.Name = "check_m4v";
+ this.check_m4v.Size = new System.Drawing.Size(334, 17);
+ this.check_m4v.TabIndex = 82;
+ this.check_m4v.Text = "Use iPod/iTunes friendly (.m4v) file extension for MP4";
+ this.ToolTip.SetToolTip(this.check_m4v, "Use .m4v instead of .mp4 for MP4 files");
+ this.check_m4v.UseVisualStyleBackColor = true;
+ this.check_m4v.CheckedChanged += new System.EventHandler(this.check_m4v_CheckedChanged);
+ //
// frmOptions
//
this.ClientSize = new System.Drawing.Size(521, 413);
@@ -1330,5 +1345,6 @@ namespace Handbrake private System.Windows.Forms.Label label31;
private System.Windows.Forms.Button btn_viewLogs;
private System.Windows.Forms.Button btn_clearLogs;
+ internal System.Windows.Forms.CheckBox check_m4v;
}
}
\ No newline at end of file diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs index 9aeeb000b..d6c9489c6 100644 --- a/win/C#/frmOptions.cs +++ b/win/C#/frmOptions.cs @@ -38,7 +38,7 @@ namespace Handbrake // On Encode Completeion Action
drp_completeOption.Text = Properties.Settings.Default.CompletionOption;
-
+
// Enable auto naming feature.
if (Properties.Settings.Default.autoNaming)
check_autoNaming.CheckState = CheckState.Checked;
@@ -51,6 +51,10 @@ namespace Handbrake // Store auto name format
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;
+
// #############################
// Picture Tab
// #############################
@@ -174,6 +178,11 @@ namespace Handbrake else
Properties.Settings.Default.autoNamePath = text_an_path.Text;
}
+
+ private void check_m4v_CheckedChanged(object sender, EventArgs e)
+ {
+ Properties.Settings.Default.useM4v = check_m4v.Checked;
+ }
#endregion
#region Picture
@@ -313,7 +322,7 @@ namespace Handbrake private void check_dvdnav_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.dvdnav = check_dvdnav.Checked;
- }
+ }
#endregion
private void btn_close_Click(object sender, EventArgs e)
@@ -321,5 +330,6 @@ namespace Handbrake Properties.Settings.Default.Save(); // Small hack for Vista. Seems to work fine on XP without this
this.Close();
}
+
}
}
\ No newline at end of file |