From 499dbe37cfa932362827622bb04132ecd2371f96 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 4 Jul 2009 15:38:29 +0000 Subject: [PATCH] WinGui: - Change update check period to a dropdown with Daily, Weekly, and Monthly. Replaces numeric updown control. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2663 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Properties/Settings.Designer.cs | 2 +- win/C#/Properties/Settings.settings | 2 +- win/C#/app.config | 2 +- win/C#/frmOptions.Designer.cs | 74 ++++++++++++-------------- win/C#/frmOptions.cs | 30 +++++++++-- 5 files changed, 63 insertions(+), 47 deletions(-) diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index 026d297fb..ea1296f1c 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -384,7 +384,7 @@ namespace Handbrake.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("5")] + [global::System.Configuration.DefaultSettingValueAttribute("7")] public int daysBetweenUpdateCheck { get { return ((int)(this["daysBetweenUpdateCheck"])); diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index 834ae32e7..feb65c89a 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -93,7 +93,7 @@ - 5 + 7 False diff --git a/win/C#/app.config b/win/C#/app.config index 21a7c3b1d..3422baf8a 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -98,7 +98,7 @@ - 5 + 7 False diff --git a/win/C#/frmOptions.Designer.cs b/win/C#/frmOptions.Designer.cs index 5817af67e..a47d2b763 100644 --- a/win/C#/frmOptions.Designer.cs +++ b/win/C#/frmOptions.Designer.cs @@ -40,6 +40,7 @@ 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.check_m4v = new System.Windows.Forms.CheckBox(); this.label7 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.txt_autoNameFormat = new System.Windows.Forms.TextBox(); @@ -77,7 +78,6 @@ namespace Handbrake this.tab_advanced = new System.Windows.Forms.TabPage(); this.label31 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); - this.numeric_updateCheckDays = new System.Windows.Forms.NumericUpDown(); this.check_trayStatusAlerts = new System.Windows.Forms.CheckBox(); this.check_inGuiStatus = new System.Windows.Forms.CheckBox(); this.check_disablePresetNotification = new System.Windows.Forms.CheckBox(); @@ -123,13 +123,12 @@ 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.drop_updateCheckDays = new System.Windows.Forms.ComboBox(); this.tab_options.SuspendLayout(); this.tab_general.SuspendLayout(); this.tab_picture.SuspendLayout(); this.tab_cli.SuspendLayout(); this.tab_advanced.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numeric_updateCheckDays)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); this.SuspendLayout(); // @@ -203,6 +202,19 @@ namespace Handbrake this.tab_general.Text = "General"; this.tab_general.UseVisualStyleBackColor = true; // + // 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); + // // label7 // this.label7.AutoSize = true; @@ -632,9 +644,9 @@ namespace Handbrake // // tab_advanced // + this.tab_advanced.Controls.Add(this.drop_updateCheckDays); this.tab_advanced.Controls.Add(this.label31); this.tab_advanced.Controls.Add(this.label15); - this.tab_advanced.Controls.Add(this.numeric_updateCheckDays); this.tab_advanced.Controls.Add(this.check_trayStatusAlerts); this.tab_advanced.Controls.Add(this.check_inGuiStatus); this.tab_advanced.Controls.Add(this.check_disablePresetNotification); @@ -674,29 +686,6 @@ namespace Handbrake this.label15.TabIndex = 95; this.label15.Text = "Updates:"; // - // numeric_updateCheckDays - // - this.numeric_updateCheckDays.Location = new System.Drawing.Point(323, 166); - this.numeric_updateCheckDays.Maximum = new decimal(new int[] { - 31, - 0, - 0, - 0}); - this.numeric_updateCheckDays.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numeric_updateCheckDays.Name = "numeric_updateCheckDays"; - this.numeric_updateCheckDays.Size = new System.Drawing.Size(50, 21); - this.numeric_updateCheckDays.TabIndex = 94; - this.numeric_updateCheckDays.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numeric_updateCheckDays.ValueChanged += new System.EventHandler(this.numeric_updateCheckDays_ValueChanged); - // // check_trayStatusAlerts // this.check_trayStatusAlerts.AutoSize = true; @@ -1212,18 +1201,22 @@ 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); + // drop_updateCheckDays + // + this.drop_updateCheckDays.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.drop_updateCheckDays.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.drop_updateCheckDays.FormattingEnabled = true; + this.drop_updateCheckDays.Items.AddRange(new object[] { + "Daily", + "Weekly", + "Monthly"}); + this.drop_updateCheckDays.Location = new System.Drawing.Point(323, 165); + this.drop_updateCheckDays.Name = "drop_updateCheckDays"; + this.drop_updateCheckDays.Size = new System.Drawing.Size(85, 21); + this.drop_updateCheckDays.TabIndex = 97; + this.ToolTip.SetToolTip(this.drop_updateCheckDays, "The number of processor\'s / processor cores. Unless your having problems, leave o" + + "n Automatic."); + this.drop_updateCheckDays.SelectedIndexChanged += new System.EventHandler(this.drop_updateCheckDays_SelectedIndexChanged); // // frmOptions // @@ -1249,7 +1242,6 @@ namespace Handbrake this.tab_cli.PerformLayout(); this.tab_advanced.ResumeLayout(false); this.tab_advanced.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numeric_updateCheckDays)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -1340,11 +1332,11 @@ namespace Handbrake internal System.Windows.Forms.CheckBox check_disablePresetNotification; internal System.Windows.Forms.CheckBox check_inGuiStatus; internal System.Windows.Forms.CheckBox check_trayStatusAlerts; - private System.Windows.Forms.NumericUpDown numeric_updateCheckDays; private System.Windows.Forms.Label label15; 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; + internal System.Windows.Forms.ComboBox drop_updateCheckDays; } } \ No newline at end of file diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs index d6c9489c6..606d9d773 100644 --- a/win/C#/frmOptions.cs +++ b/win/C#/frmOptions.cs @@ -121,7 +121,18 @@ namespace Handbrake check_inGuiStatus.CheckState = CheckState.Checked; // Days between update checks - numeric_updateCheckDays.Value = Properties.Settings.Default.daysBetweenUpdateCheck; + switch (Properties.Settings.Default.daysBetweenUpdateCheck) + { + case 1: + drop_updateCheckDays.SelectedIndex = 0; + break; + case 7: + drop_updateCheckDays.SelectedIndex = 1; + break; + case 30: + drop_updateCheckDays.SelectedIndex = 2; + break; + } // x264 step CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US"); @@ -295,9 +306,20 @@ namespace Handbrake Properties.Settings.Default.enocdeStatusInGui = check_inGuiStatus.Checked; } - private void numeric_updateCheckDays_ValueChanged(object sender, EventArgs e) + private void drop_updateCheckDays_SelectedIndexChanged(object sender, EventArgs e) { - Properties.Settings.Default.daysBetweenUpdateCheck = (int)numeric_updateCheckDays.Value; + switch (drop_updateCheckDays.SelectedIndex) + { + case 0: + Properties.Settings.Default.daysBetweenUpdateCheck = 1; + break; + case 1: + Properties.Settings.Default.daysBetweenUpdateCheck = 7; + break; + case 2: + Properties.Settings.Default.daysBetweenUpdateCheck = 30; + break; + } } private void x264step_SelectedIndexChanged(object sender, EventArgs e) @@ -331,5 +353,7 @@ namespace Handbrake this.Close(); } + + } } \ No newline at end of file -- 2.40.0