diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/C#/Properties/Settings.Designer.cs | 14 | ||||
-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 | 72 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 58 | ||||
-rw-r--r-- | win/C#/frmOptions.Designer.cs | 74 | ||||
-rw-r--r-- | win/C#/frmOptions.cs | 8 |
7 files changed, 144 insertions, 88 deletions
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index 17391563f..c18b31dd4 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.3053
+// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -322,5 +322,17 @@ namespace Handbrake.Properties { this["MainWindowMinimize"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string QueryEditorTab {
+ get {
+ return ((string)(this["QueryEditorTab"]));
+ }
+ set {
+ this["QueryEditorTab"] = value;
+ }
+ }
}
}
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index 42af2949d..2b8b4f2c2 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -77,5 +77,8 @@ <Setting Name="MainWindowMinimize" Type="System.String" Scope="User">
<Value Profile="(Default)">Checked</Value>
</Setting>
+ <Setting Name="QueryEditorTab" Type="System.String" Scope="User">
+ <Value Profile="(Default)" />
+ </Setting>
</Settings>
</SettingsFile>
\ No newline at end of file diff --git a/win/C#/app.config b/win/C#/app.config index dcaf46f71..433cbf14d 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -82,6 +82,9 @@ <setting name="MainWindowMinimize" serializeAs="String">
<value>Checked</value>
</setting>
+ <setting name="QueryEditorTab" serializeAs="String">
+ <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 fd5ebbee9..b742b8589 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -192,7 +192,7 @@ namespace Handbrake this.Label51 = new System.Windows.Forms.Label();
this.Label15 = new System.Windows.Forms.Label();
this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();
- this.advancedOptions = new System.Windows.Forms.TabControl();
+ this.tabs_panel = new System.Windows.Forms.TabControl();
this.tab_chapters = new System.Windows.Forms.TabPage();
this.label31 = new System.Windows.Forms.Label();
this.h264Tab = new System.Windows.Forms.TabPage();
@@ -211,7 +211,7 @@ namespace Handbrake this.lbl_direct_prediction = new System.Windows.Forms.Label();
this.label62 = new System.Windows.Forms.Label();
this.label64 = new System.Windows.Forms.Label();
- this.tabPage4 = new System.Windows.Forms.TabPage();
+ this.tab_query = new System.Windows.Forms.TabPage();
this.btn_clear = new System.Windows.Forms.Button();
this.label34 = new System.Windows.Forms.Label();
this.btn_generate_Query = new System.Windows.Forms.Button();
@@ -260,10 +260,10 @@ namespace Handbrake ((System.ComponentModel.ISupportInitialize)(this.text_top)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.text_left)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.text_right)).BeginInit();
- this.advancedOptions.SuspendLayout();
+ this.tabs_panel.SuspendLayout();
this.tab_chapters.SuspendLayout();
this.h264Tab.SuspendLayout();
- this.tabPage4.SuspendLayout();
+ this.tab_query.SuspendLayout();
this.groupBox_dest.SuspendLayout();
this.groupBox2.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
@@ -2270,21 +2270,21 @@ namespace Handbrake this.Check_ChapterMarkers.UseVisualStyleBackColor = false;
this.Check_ChapterMarkers.CheckedChanged += new System.EventHandler(this.Check_ChapterMarkers_CheckedChanged);
//
- // advancedOptions
- //
- this.advancedOptions.Controls.Add(this.TabPage1);
- this.advancedOptions.Controls.Add(this.TabPage3);
- this.advancedOptions.Controls.Add(this.TabPage2);
- this.advancedOptions.Controls.Add(this.tab_chapters);
- this.advancedOptions.Controls.Add(this.h264Tab);
- this.advancedOptions.Controls.Add(this.tabPage4);
- this.advancedOptions.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.advancedOptions.Location = new System.Drawing.Point(9, 274);
- this.advancedOptions.Name = "advancedOptions";
- this.advancedOptions.SelectedIndex = 0;
- this.advancedOptions.Size = new System.Drawing.Size(721, 342);
- this.advancedOptions.TabIndex = 5;
- this.advancedOptions.TabStop = false;
+ // tabs_panel
+ //
+ this.tabs_panel.Controls.Add(this.TabPage1);
+ this.tabs_panel.Controls.Add(this.TabPage3);
+ this.tabs_panel.Controls.Add(this.TabPage2);
+ this.tabs_panel.Controls.Add(this.tab_chapters);
+ this.tabs_panel.Controls.Add(this.h264Tab);
+ this.tabs_panel.Controls.Add(this.tab_query);
+ this.tabs_panel.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tabs_panel.Location = new System.Drawing.Point(9, 274);
+ this.tabs_panel.Name = "tabs_panel";
+ this.tabs_panel.SelectedIndex = 0;
+ this.tabs_panel.Size = new System.Drawing.Size(721, 342);
+ this.tabs_panel.TabIndex = 5;
+ this.tabs_panel.TabStop = false;
//
// tab_chapters
//
@@ -2501,18 +2501,18 @@ namespace Handbrake this.label64.TabIndex = 1;
this.label64.Text = "Reference Frames:";
//
- // tabPage4
+ // tab_query
//
- this.tabPage4.Controls.Add(this.btn_clear);
- this.tabPage4.Controls.Add(this.label34);
- this.tabPage4.Controls.Add(this.btn_generate_Query);
- this.tabPage4.Controls.Add(this.label33);
- this.tabPage4.Controls.Add(this.rtf_query);
- this.tabPage4.Location = new System.Drawing.Point(4, 22);
- this.tabPage4.Name = "tabPage4";
- this.tabPage4.Size = new System.Drawing.Size(713, 316);
- this.tabPage4.TabIndex = 7;
- this.tabPage4.Text = "Query Editor";
+ this.tab_query.Controls.Add(this.btn_clear);
+ this.tab_query.Controls.Add(this.label34);
+ this.tab_query.Controls.Add(this.btn_generate_Query);
+ this.tab_query.Controls.Add(this.label33);
+ this.tab_query.Controls.Add(this.rtf_query);
+ this.tab_query.Location = new System.Drawing.Point(4, 22);
+ this.tab_query.Name = "tab_query";
+ this.tab_query.Size = new System.Drawing.Size(713, 316);
+ this.tab_query.TabIndex = 7;
+ this.tab_query.Text = "Query Editor";
//
// btn_clear
//
@@ -2848,7 +2848,7 @@ namespace Handbrake this.Controls.Add(this.groupBox_output);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.toolStrip1);
- this.Controls.Add(this.advancedOptions);
+ this.Controls.Add(this.tabs_panel);
this.Controls.Add(this.frmMainMenu);
this.Controls.Add(this.StatusStrip);
this.DoubleBuffered = true;
@@ -2878,13 +2878,13 @@ namespace Handbrake ((System.ComponentModel.ISupportInitialize)(this.text_top)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.text_left)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.text_right)).EndInit();
- this.advancedOptions.ResumeLayout(false);
+ this.tabs_panel.ResumeLayout(false);
this.tab_chapters.ResumeLayout(false);
this.tab_chapters.PerformLayout();
this.h264Tab.ResumeLayout(false);
this.h264Tab.PerformLayout();
- this.tabPage4.ResumeLayout(false);
- this.tabPage4.PerformLayout();
+ this.tab_query.ResumeLayout(false);
+ this.tab_query.PerformLayout();
this.groupBox_dest.ResumeLayout(false);
this.groupBox_dest.PerformLayout();
this.groupBox2.ResumeLayout(false);
@@ -2957,7 +2957,7 @@ namespace Handbrake internal System.Windows.Forms.Label Label52;
internal System.Windows.Forms.Label Label51;
internal System.Windows.Forms.Label Label15;
- internal System.Windows.Forms.TabControl advancedOptions;
+ internal System.Windows.Forms.TabControl tabs_panel;
internal System.Windows.Forms.Label Label46;
private System.Windows.Forms.GroupBox groupBox_dest;
internal System.Windows.Forms.ComboBox drp_subtitle;
@@ -2995,7 +2995,7 @@ namespace Handbrake internal System.Windows.Forms.CheckBox check_optimiseMP4;
internal System.Windows.Forms.CheckBox check_forced;
internal System.Windows.Forms.DataGridView data_chpt;
- private System.Windows.Forms.TabPage tabPage4;
+ private System.Windows.Forms.TabPage tab_query;
private System.Windows.Forms.Label label34;
internal System.Windows.Forms.Button btn_generate_Query;
internal System.Windows.Forms.Label label33;
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 71ecbec32..faaa58d7b 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -87,6 +87,8 @@ namespace Handbrake treeView_presets.ExpandAll();
lbl_encode.Text = "";
queueWindow = new frmQueue(this); // Prepare the Queue
+ if (Properties.Settings.Default.QueryEditorTab != "Checked")
+ tabs_panel.TabPages.RemoveAt(5); // Remove the query editor tab if the user does not want it enabled.
// Load the user's default settings or Normal Preset
if (Properties.Settings.Default.defaultSettings == "Checked" && Properties.Settings.Default.defaultUserSettings != "")
@@ -284,12 +286,6 @@ namespace Handbrake {
treeView_presets.CollapseAll();
}
- private void treeview_presets_mouseUp(object sender, MouseEventArgs e)
- {
- if (e.Button == MouseButtons.Right)
- treeView_presets.SelectedNode = treeView_presets.GetNodeAt(e.Location);
- treeView_presets.Select();
- }
private void pmnu_delete_click(object sender, EventArgs e)
{
if (treeView_presets.SelectedNode != null)
@@ -349,26 +345,42 @@ namespace Handbrake Properties.Settings.Default.Save();
MessageBox.Show("New default settings saved.", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
- private void treeView_presets_AfterSelect(object sender, TreeViewEventArgs e)
+ private void treeview_presets_mouseUp(object sender, MouseEventArgs e)
{
- // Ok, so, we've selected a preset. Now we want to load it.
- string presetName = treeView_presets.SelectedNode.Text;
- string query = presetHandler.getCliForPreset(presetName);
+ if (e.Button == MouseButtons.Right)
+ treeView_presets.SelectedNode = treeView_presets.GetNodeAt(e.Location);
+ else if (e.Button == MouseButtons.Left)
+ selectPreset();
- if (query != null)
+ treeView_presets.Select();
+ }
+ private void treeView_presets_AfterSelect(object sender, TreeViewEventArgs e)
+ {
+ selectPreset();
+ }
+ private void selectPreset()
+ {
+ if (treeView_presets.SelectedNode != null)
{
- //Ok, Reset all the H264 widgets before changing the preset
- x264PanelFunctions.reset2Defaults(this);
+ // Ok, so, we've selected a preset. Now we want to load it.
+ string presetName = treeView_presets.SelectedNode.Text;
+ string query = presetHandler.getCliForPreset(presetName);
- // Send the query from the file to the Query Parser class
- Functions.QueryParser presetQuery = Functions.QueryParser.Parse(query);
+ if (query != null)
+ {
+ //Ok, Reset all the H264 widgets before changing the preset
+ x264PanelFunctions.reset2Defaults(this);
- // Now load the preset
- presetLoader.presetLoader(this, presetQuery, presetName);
+ // Send the query from the file to the Query Parser class
+ Functions.QueryParser presetQuery = Functions.QueryParser.Parse(query);
- // The x264 widgets will need updated, so do this now:
- x264PanelFunctions.X264_StandardizeOptString(this);
- x264PanelFunctions.X264_SetCurrentSettingsInPanel(this);
+ // Now load the preset
+ presetLoader.presetLoader(this, presetQuery, presetName);
+
+ // The x264 widgets will need updated, so do this now:
+ x264PanelFunctions.X264_StandardizeOptString(this);
+ x264PanelFunctions.X264_SetCurrentSettingsInPanel(this);
+ }
}
}
private void treeView_presets_deleteKey(object sender, KeyEventArgs e)
@@ -1203,12 +1215,12 @@ namespace Handbrake }
private void btn_RemoveAudioTrack_Click(object sender, EventArgs e)
{
- // Record the current selected index.
- int currentPosition = lv_audioList.SelectedIndices[0];
-
// Remove the Item and reselect the control if the following conditions are met.
if (lv_audioList.SelectedItems.Count != 0)
{
+ // Record the current selected index.
+ int currentPosition = lv_audioList.SelectedIndices[0];
+
lv_audioList.Items.RemoveAt(lv_audioList.SelectedIndices[0]);
// Now reslect the correct item and give focus to the audio list.
diff --git a/win/C#/frmOptions.Designer.cs b/win/C#/frmOptions.Designer.cs index 044b7abf3..909051189 100644 --- a/win/C#/frmOptions.Designer.cs +++ b/win/C#/frmOptions.Designer.cs @@ -74,6 +74,8 @@ namespace Handbrake this.drp_processors = new System.Windows.Forms.ComboBox();
this.Label4 = new System.Windows.Forms.Label();
this.tab_advanced = new System.Windows.Forms.TabPage();
+ this.lbl_appcastUnstable = new System.Windows.Forms.Label();
+ this.check_mainMinimize = new System.Windows.Forms.CheckBox();
this.check_snapshot = new System.Windows.Forms.CheckBox();
this.btn_drive_detect = new System.Windows.Forms.CheckBox();
this.label6 = new System.Windows.Forms.Label();
@@ -110,8 +112,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_mainMinimize = new System.Windows.Forms.CheckBox();
- this.lbl_appcastUnstable = new System.Windows.Forms.Label();
+ this.check_queryEditorTab = new System.Windows.Forms.CheckBox();
this.tab_options.SuspendLayout();
this.tab_general.SuspendLayout();
this.tab_picture.SuspendLayout();
@@ -594,6 +595,7 @@ namespace Handbrake //
// tab_advanced
//
+ this.tab_advanced.Controls.Add(this.check_queryEditorTab);
this.tab_advanced.Controls.Add(this.lbl_appcastUnstable);
this.tab_advanced.Controls.Add(this.check_mainMinimize);
this.tab_advanced.Controls.Add(this.check_snapshot);
@@ -607,12 +609,38 @@ namespace Handbrake this.tab_advanced.Text = "Advanced / Other";
this.tab_advanced.UseVisualStyleBackColor = true;
//
+ // lbl_appcastUnstable
+ //
+ this.lbl_appcastUnstable.AutoSize = true;
+ this.lbl_appcastUnstable.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_appcastUnstable.Location = new System.Drawing.Point(6, 105);
+ this.lbl_appcastUnstable.Name = "lbl_appcastUnstable";
+ this.lbl_appcastUnstable.Size = new System.Drawing.Size(64, 13);
+ this.lbl_appcastUnstable.TabIndex = 83;
+ this.lbl_appcastUnstable.Text = "Updates:";
+ //
+ // check_mainMinimize
+ //
+ this.check_mainMinimize.AutoSize = true;
+ this.check_mainMinimize.BackColor = System.Drawing.Color.Transparent;
+ this.check_mainMinimize.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.check_mainMinimize.Location = new System.Drawing.Point(76, 41);
+ this.check_mainMinimize.Name = "check_mainMinimize";
+ this.check_mainMinimize.Size = new System.Drawing.Size(286, 17);
+ this.check_mainMinimize.TabIndex = 82;
+ this.check_mainMinimize.Text = "Minimize to System Tray rather than task bar";
+ this.ToolTip.SetToolTip(this.check_mainMinimize, "Minimize the window to the system tray rather than the task bar.\r\nThe system tray" +
+ " icon has encode status notifications.\r\nNote: requires restart to take effect!\r\n" +
+ "");
+ this.check_mainMinimize.UseVisualStyleBackColor = false;
+ this.check_mainMinimize.CheckedChanged += new System.EventHandler(this.check_mainMinimize_CheckedChanged);
+ //
// check_snapshot
//
this.check_snapshot.AutoSize = true;
this.check_snapshot.BackColor = System.Drawing.Color.Transparent;
this.check_snapshot.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_snapshot.Location = new System.Drawing.Point(76, 81);
+ this.check_snapshot.Location = new System.Drawing.Point(76, 104);
this.check_snapshot.Name = "check_snapshot";
this.check_snapshot.Size = new System.Drawing.Size(273, 17);
this.check_snapshot.TabIndex = 80;
@@ -1001,31 +1029,20 @@ namespace Handbrake this.openFile_vlc.DefaultExt = "exe";
this.openFile_vlc.Filter = "exe|*.exe";
//
- // check_mainMinimize
- //
- this.check_mainMinimize.AutoSize = true;
- this.check_mainMinimize.BackColor = System.Drawing.Color.Transparent;
- this.check_mainMinimize.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_mainMinimize.Location = new System.Drawing.Point(76, 41);
- this.check_mainMinimize.Name = "check_mainMinimize";
- this.check_mainMinimize.Size = new System.Drawing.Size(286, 17);
- this.check_mainMinimize.TabIndex = 82;
- this.check_mainMinimize.Text = "Minimize to System Tray rather than task bar";
- this.ToolTip.SetToolTip(this.check_mainMinimize, "Minimize the window to the system tray rather than the task bar.\r\nThe system tray" +
- " icon has encode status notifications.\r\nNote: requires restart to take effect!\r\n" +
- "");
- this.check_mainMinimize.UseVisualStyleBackColor = false;
- this.check_mainMinimize.CheckedChanged += new System.EventHandler(this.check_mainMinimize_CheckedChanged);
- //
- // lbl_appcastUnstable
- //
- this.lbl_appcastUnstable.AutoSize = true;
- this.lbl_appcastUnstable.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_appcastUnstable.Location = new System.Drawing.Point(6, 82);
- this.lbl_appcastUnstable.Name = "lbl_appcastUnstable";
- this.lbl_appcastUnstable.Size = new System.Drawing.Size(64, 13);
- this.lbl_appcastUnstable.TabIndex = 83;
- this.lbl_appcastUnstable.Text = "Updates:";
+ // check_queryEditorTab
+ //
+ this.check_queryEditorTab.AutoSize = true;
+ this.check_queryEditorTab.BackColor = System.Drawing.Color.Transparent;
+ this.check_queryEditorTab.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.check_queryEditorTab.Location = new System.Drawing.Point(76, 64);
+ this.check_queryEditorTab.Name = "check_queryEditorTab";
+ this.check_queryEditorTab.Size = new System.Drawing.Size(175, 17);
+ this.check_queryEditorTab.TabIndex = 84;
+ this.check_queryEditorTab.Text = "Enable \"Query Editor\" Tab";
+ this.ToolTip.SetToolTip(this.check_queryEditorTab, "Enables the Query Editor tab on the main window. Requires program restart to take" +
+ " effect.");
+ this.check_queryEditorTab.UseVisualStyleBackColor = false;
+ this.check_queryEditorTab.CheckedChanged += new System.EventHandler(this.check_queryEditorTab_CheckedChanged);
//
// frmOptions
//
@@ -1135,5 +1152,6 @@ namespace Handbrake private System.Windows.Forms.OpenFileDialog openFile_vlc;
private System.Windows.Forms.Label lbl_appcastUnstable;
internal System.Windows.Forms.CheckBox check_mainMinimize;
+ internal System.Windows.Forms.CheckBox check_queryEditorTab;
}
}
\ No newline at end of file diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs index 32c63b23a..e31e41abf 100644 --- a/win/C#/frmOptions.cs +++ b/win/C#/frmOptions.cs @@ -114,6 +114,9 @@ namespace Handbrake if (Properties.Settings.Default.drive_detection == "Checked")
btn_drive_detect.CheckState = CheckState.Checked;
+ if (Properties.Settings.Default.QueryEditorTab == "Checked")
+ check_queryEditorTab.CheckState = CheckState.Checked;
+
// Enable snapshot updating
if (Properties.Settings.Default.MainWindowMinimize == "Checked")
check_mainMinimize.CheckState = CheckState.Checked;
@@ -251,6 +254,11 @@ namespace Handbrake Properties.Settings.Default.MainWindowMinimize = check_mainMinimize.CheckState.ToString();
}
+ private void check_queryEditorTab_CheckedChanged(object sender, EventArgs e)
+ {
+ Properties.Settings.Default.QueryEditorTab = check_queryEditorTab.CheckState.ToString();
+ }
+
private void check_snapshot_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.checkSnapshot = check_snapshot.CheckState.ToString();
|