• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

githubのコードからのfolk


Commit MetaInfo

Revisionbc0df09b7da5a601d8e96fcab43a0c66f9b84981 (tree)
Time2011-02-20 04:14:12
Authorsr55 <sr55@b64f...>
Commitersr55

Log Message

WinGui:
- Give more control over MP4 file extensions. (Automatic, Always use MP4, Always use M4v)

git-svn-id: svn://localhost/HandBrake/trunk@3801 b64f7644-9d1e-0410-96f1-a4d463321fa5

Change Summary

Incremental Difference

--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -240,7 +240,7 @@ namespace Handbrake.Functions
240240 // Add the appropriate file extension
241241 if (mainWindow.drop_format.SelectedIndex == 0)
242242 {
243- destinationFilename += Properties.Settings.Default.useM4v || mainWindow.Check_ChapterMarkers.Checked ||
243+ destinationFilename += Properties.Settings.Default.useM4v == 0 || Properties.Settings.Default.useM4v == 2 || mainWindow.Check_ChapterMarkers.Checked ||
244244 mainWindow.AudioSettings.RequiresM4V() || mainWindow.Subtitles.RequiresM4V()
245245 ? ".m4v"
246246 : ".mp4";
--- a/win/C#/Properties/Settings.Designer.cs
+++ b/win/C#/Properties/Settings.Designer.cs
@@ -336,10 +336,10 @@ namespace Handbrake.Properties {
336336
337337 [global::System.Configuration.UserScopedSettingAttribute()]
338338 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
339- [global::System.Configuration.DefaultSettingValueAttribute("True")]
340- public bool useM4v {
339+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
340+ public int useM4v {
341341 get {
342- return ((bool)(this["useM4v"]));
342+ return ((int)(this["useM4v"]));
343343 }
344344 set {
345345 this["useM4v"] = value;
--- a/win/C#/Properties/Settings.settings
+++ b/win/C#/Properties/Settings.settings
@@ -80,8 +80,8 @@
8080 <Setting Name="daysBetweenUpdateCheck" Type="System.Int32" Scope="User">
8181 <Value Profile="(Default)">7</Value>
8282 </Setting>
83- <Setting Name="useM4v" Type="System.Boolean" Scope="User">
84- <Value Profile="(Default)">True</Value>
83+ <Setting Name="useM4v" Type="System.Int32" Scope="User">
84+ <Value Profile="(Default)">0</Value>
8585 </Setting>
8686 <Setting Name="PromptOnUnmatchingQueries" Type="System.Boolean" Scope="User">
8787 <Value Profile="(Default)">True</Value>
--- a/win/C#/app.config
+++ b/win/C#/app.config
@@ -26,7 +26,7 @@
2626 <value>Do Nothing</value>
2727 </setting>
2828 <setting name="defaultPreset" serializeAs="String">
29- <value/>
29+ <value />
3030 </setting>
3131 <setting name="hb_build" serializeAs="String">
3232 <value>0</value>
@@ -38,7 +38,7 @@
3838 <value>True</value>
3939 </setting>
4040 <setting name="autoNamePath" serializeAs="String">
41- <value/>
41+ <value />
4242 </setting>
4343 <setting name="appcast" serializeAs="String">
4444 <value>http://handbrake.fr/appcast.xml</value>
@@ -53,7 +53,7 @@
5353 <value>False</value>
5454 </setting>
5555 <setting name="saveLogPath" serializeAs="String">
56- <value/>
56+ <value />
5757 </setting>
5858 <setting name="saveLogWithVideo" serializeAs="String">
5959 <value>False</value>
@@ -83,13 +83,13 @@
8383 <value>True</value>
8484 </setting>
8585 <setting name="lastUpdateCheckDate" serializeAs="String">
86- <value/>
86+ <value />
8787 </setting>
8888 <setting name="daysBetweenUpdateCheck" serializeAs="String">
8989 <value>7</value>
9090 </setting>
9191 <setting name="useM4v" serializeAs="String">
92- <value>True</value>
92+ <value>0</value>
9393 </setting>
9494 <setting name="PromptOnUnmatchingQueries" serializeAs="String">
9595 <value>True</value>
@@ -101,7 +101,7 @@
101101 <value>0</value>
102102 </setting>
103103 <setting name="hb_platform" serializeAs="String">
104- <value/>
104+ <value />
105105 </setting>
106106 <setting name="growlQueue" serializeAs="String">
107107 <value>False</value>
@@ -110,7 +110,7 @@
110110 <value>False</value>
111111 </setting>
112112 <setting name="CliExeHash" serializeAs="String">
113- <value/>
113+ <value />
114114 </setting>
115115 <setting name="previewScanCount" serializeAs="String">
116116 <value>10</value>
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -1787,17 +1787,14 @@ namespace Handbrake
17871787 switch (DVD_Save.FilterIndex)
17881788 {
17891789 case 1:
1790- if (
1791- !Path.GetExtension(DVD_Save.FileName).Equals(".mp4",
1792- StringComparison.InvariantCultureIgnoreCase))
1793- if (Properties.Settings.Default.useM4v)
1790+ if (!Path.GetExtension(DVD_Save.FileName).Equals(".mp4", StringComparison.InvariantCultureIgnoreCase))
1791+ if (Properties.Settings.Default.useM4v == 2 || Properties.Settings.Default.useM4v == 0)
17941792 DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", ".m4v").Replace(".mkv", ".m4v");
17951793 else
17961794 DVD_Save.FileName = DVD_Save.FileName.Replace(".m4v", ".mp4").Replace(".mkv", ".mp4");
17971795 break;
17981796 case 2:
1799- if (
1800- !Path.GetExtension(DVD_Save.FileName).Equals(".mkv", StringComparison.InvariantCultureIgnoreCase))
1797+ if (!Path.GetExtension(DVD_Save.FileName).Equals(".mkv", StringComparison.InvariantCultureIgnoreCase))
18011798 DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", ".mkv").Replace(".m4v", ".mkv");
18021799 break;
18031800 default:
@@ -1827,11 +1824,7 @@ namespace Handbrake
18271824 switch (drop_format.SelectedIndex)
18281825 {
18291826 case 0:
1830- if (Properties.Settings.Default.useM4v || Check_ChapterMarkers.Checked ||
1831- AudioSettings.RequiresM4V() || Subtitles.RequiresM4V())
1832- SetExtension(".m4v");
1833- else
1834- SetExtension(".mp4");
1827+ SetExtension(".mp4");
18351828 break;
18361829 case 1:
18371830 SetExtension(".mkv");
@@ -1855,9 +1848,8 @@ namespace Handbrake
18551848 public void SetExtension(string newExtension)
18561849 {
18571850 if (newExtension == ".mp4" || newExtension == ".m4v")
1858- if (Properties.Settings.Default.useM4v || Check_ChapterMarkers.Checked || AudioSettings.RequiresM4V() ||
1859- Subtitles.RequiresM4V())
1860- newExtension = ".m4v";
1851+ if (Check_ChapterMarkers.Checked || AudioSettings.RequiresM4V() || Subtitles.RequiresM4V() || Properties.Settings.Default.useM4v == 2)
1852+ newExtension = Properties.Settings.Default.useM4v == 1 ? ".mp4" : ".m4v";
18611853 else
18621854 newExtension = ".mp4";
18631855
@@ -2062,7 +2054,7 @@ namespace Handbrake
20622054 }
20632055 else
20642056 {
2065- if (drop_format.SelectedIndex != 1 && !Properties.Settings.Default.useM4v)
2057+ if (drop_format.SelectedIndex != 1)
20662058 SetExtension(".mp4");
20672059 data_chpt.Enabled = false;
20682060 btn_importChapters.Enabled = false;
--- a/win/C#/frmOptions.Designer.cs
+++ b/win/C#/frmOptions.Designer.cs
@@ -39,12 +39,13 @@ namespace Handbrake
3939 this.drp_completeOption = new System.Windows.Forms.ComboBox();
4040 this.tab_options = new System.Windows.Forms.TabControl();
4141 this.tab_general = new System.Windows.Forms.TabPage();
42+ this.label35 = new System.Windows.Forms.Label();
43+ this.cb_mp4FileMode = new System.Windows.Forms.ComboBox();
4244 this.label34 = new System.Windows.Forms.Label();
4345 this.check_TitleCase = new System.Windows.Forms.CheckBox();
4446 this.check_removeUnderscores = new System.Windows.Forms.CheckBox();
4547 this.check_growlEncode = new System.Windows.Forms.CheckBox();
4648 this.check_GrowlQueue = new System.Windows.Forms.CheckBox();
47- this.check_m4v = new System.Windows.Forms.CheckBox();
4849 this.label1 = new System.Windows.Forms.Label();
4950 this.label7 = new System.Windows.Forms.Label();
5051 this.drop_updateCheckDays = new System.Windows.Forms.ComboBox();
@@ -198,12 +199,13 @@ namespace Handbrake
198199 //
199200 // tab_general
200201 //
202+ this.tab_general.Controls.Add(this.label35);
203+ this.tab_general.Controls.Add(this.cb_mp4FileMode);
201204 this.tab_general.Controls.Add(this.label34);
202205 this.tab_general.Controls.Add(this.check_TitleCase);
203206 this.tab_general.Controls.Add(this.check_removeUnderscores);
204207 this.tab_general.Controls.Add(this.check_growlEncode);
205208 this.tab_general.Controls.Add(this.check_GrowlQueue);
206- this.tab_general.Controls.Add(this.check_m4v);
207209 this.tab_general.Controls.Add(this.label1);
208210 this.tab_general.Controls.Add(this.label7);
209211 this.tab_general.Controls.Add(this.drp_completeOption);
@@ -226,6 +228,30 @@ namespace Handbrake
226228 this.tab_general.Text = "General";
227229 this.tab_general.UseVisualStyleBackColor = true;
228230 //
231+ // label35
232+ //
233+ this.label35.AutoSize = true;
234+ this.label35.Location = new System.Drawing.Point(105, 323);
235+ this.label35.Name = "label35";
236+ this.label35.Size = new System.Drawing.Size(100, 13);
237+ this.label35.TabIndex = 104;
238+ this.label35.Text = "MP4 File Extension:";
239+ //
240+ // cb_mp4FileMode
241+ //
242+ this.cb_mp4FileMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
243+ this.cb_mp4FileMode.FormattingEnabled = true;
244+ this.cb_mp4FileMode.Items.AddRange(new object[] {
245+ "Automatic",
246+ "Always use MP4",
247+ "Always use M4V"});
248+ this.cb_mp4FileMode.Location = new System.Drawing.Point(211, 320);
249+ this.cb_mp4FileMode.Name = "cb_mp4FileMode";
250+ this.cb_mp4FileMode.Size = new System.Drawing.Size(150, 21);
251+ this.cb_mp4FileMode.TabIndex = 103;
252+ this.ToolTip.SetToolTip(this.cb_mp4FileMode, resources.GetString("cb_mp4FileMode.ToolTip"));
253+ this.cb_mp4FileMode.SelectedIndexChanged += new System.EventHandler(this.cb_mp4FileMode_SelectedIndexChanged);
254+ //
229255 // label34
230256 //
231257 this.label34.AutoSize = true;
@@ -292,18 +318,6 @@ namespace Handbrake
292318 this.check_GrowlQueue.UseVisualStyleBackColor = false;
293319 this.check_GrowlQueue.CheckedChanged += new System.EventHandler(this.check_GrowlQueue_CheckedChanged);
294320 //
295- // check_m4v
296- //
297- this.check_m4v.AutoSize = true;
298- this.check_m4v.Location = new System.Drawing.Point(108, 321);
299- this.check_m4v.Name = "check_m4v";
300- this.check_m4v.Size = new System.Drawing.Size(319, 17);
301- this.check_m4v.TabIndex = 82;
302- this.check_m4v.Text = "Always use iPod/iTunes friendly file extension (.m4v) for MP4";
303- this.ToolTip.SetToolTip(this.check_m4v, resources.GetString("check_m4v.ToolTip"));
304- this.check_m4v.UseVisualStyleBackColor = true;
305- this.check_m4v.CheckedChanged += new System.EventHandler(this.check_m4v_CheckedChanged);
306- //
307321 // label1
308322 //
309323 this.label1.AutoSize = true;
@@ -1569,7 +1583,6 @@ namespace Handbrake
15691583 internal System.Windows.Forms.CheckBox check_trayStatusAlerts;
15701584 private System.Windows.Forms.Button btn_viewLogs;
15711585 private System.Windows.Forms.Button btn_clearLogs;
1572- internal System.Windows.Forms.CheckBox check_m4v;
15731586 internal System.Windows.Forms.ComboBox drop_updateCheckDays;
15741587 private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
15751588 internal System.Windows.Forms.ComboBox drp_Priority;
@@ -1596,5 +1609,7 @@ namespace Handbrake
15961609 private System.Windows.Forms.RadioButton radio_preferredAudioAndSubs;
15971610 private System.Windows.Forms.CheckBox check_AddCCTracks;
15981611 private System.Windows.Forms.Label label34;
1612+ internal System.Windows.Forms.Label label35;
1613+ internal System.Windows.Forms.ComboBox cb_mp4FileMode;
15991614 }
16001615 }
\ No newline at end of file
--- a/win/C#/frmOptions.cs
+++ b/win/C#/frmOptions.cs
@@ -88,8 +88,7 @@ namespace Handbrake
8888 txt_autoNameFormat.Text = Properties.Settings.Default.autoNameFormat;
8989
9090 // Use iPod/iTunes friendly .m4v extension for MP4 files.
91- if (Properties.Settings.Default.useM4v)
92- check_m4v.CheckState = CheckState.Checked;
91+ cb_mp4FileMode.SelectedIndex = Properties.Settings.Default.useM4v;
9392
9493 // Remove Underscores
9594 check_removeUnderscores.Checked = Properties.Settings.Default.AutoNameRemoveUnderscore;
@@ -287,9 +286,10 @@ namespace Handbrake
287286 }
288287 }
289288
290- private void check_m4v_CheckedChanged(object sender, EventArgs e)
289+ private void cb_mp4FileMode_SelectedIndexChanged(object sender, EventArgs e)
291290 {
292- Properties.Settings.Default.useM4v = check_m4v.Checked;
291+
292+ Properties.Settings.Default.useM4v = cb_mp4FileMode.SelectedIndex;
293293 }
294294
295295 private void check_removeUnderscores_CheckedChanged(object sender, EventArgs e)
--- a/win/C#/frmOptions.resx
+++ b/win/C#/frmOptions.resx
@@ -120,12 +120,13 @@
120120 <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121121 <value>132, 18</value>
122122 </metadata>
123- <data name="check_m4v.ToolTip" xml:space="preserve">
124- <value>Use .m4v instead of .mp4 for MP4 files
123+ <data name="cb_mp4FileMode.ToolTip" xml:space="preserve">
124+ <value>The default file extension for MP4 Files.
125+Automatic - This will use M4v when AC3 Audio, SRT Subtitles or Chapters are present, otherwise MP4.
126+Always MP4 - The MP4 extension will always be used.
127+Always M4V - The M4V extension will always be used.
125128
126-Chapter Markers, AC3 Audio and SRT Subtitles will require the m4v extension if you are using QuickTime for playback.
127-When this option is disabled, Chapter Markers, AC3 audio and SRT subtitiles will still automatically change the file extension to m4v.
128-</value>
129+Note, the file itself is identical. This simply changes the default extension for MP4 files.</value>
129130 </data>
130131 <data name="text_an_path.ToolTip" xml:space="preserve">
131132 <value>This is the default location where your encoded files will be stored if "Automatically name output files" is enabled.