]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Fri, 19 Nov 2010 19:16:29 +0000 (19:16 +0000)
committersr55 <sr55.hb@outlook.com>
Fri, 19 Nov 2010 19:16:29 +0000 (19:16 +0000)
- Added support for preset descriptions (currently disabled so as not to interfere with the release)

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3682 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Presets/Preset.cs
win/C#/Presets/PresetsHandler.cs
win/C#/frmAddPreset.cs
win/C#/frmMain.Designer.cs
win/C#/frmMain.cs
win/C#/frmMain.resx

index 024d31667c50f00bb2bc15375fae093530a71a54..b6151a3b098c5a556365a460d499daed4a1fddd1 100644 (file)
@@ -34,5 +34,10 @@ namespace Handbrake.Presets
         /// Gets or sets The version number which associates this preset with a HB build\r
         /// </summary>\r
         public string Version { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the Description for the preset\r
+        /// </summary>\r
+        public string Description { get; set; }\r
     }\r
 }
\ No newline at end of file
index d53a64dddc9b6163873e0b5f5fbbe133adff6995..456cdfd8a626ac08f1810be3cbed39547d6ed001 100644 (file)
@@ -62,10 +62,13 @@ namespace Handbrake.Presets
         /// <param name="pictureSettings">\r
         /// Bool, store crop/picture sizes in the Presets\r
         /// </param>\r
+        /// <param name="description">\r
+        /// The description.\r
+        /// </param>\r
         /// <returns>\r
         /// The add.\r
         /// </returns>\r
-        public bool Add(string presetName, string query, bool pictureSettings)\r
+        public bool Add(string presetName, string query, bool pictureSettings, string description)\r
         {\r
             if (this.CheckIfPresetExists(presetName) == false)\r
             {\r
@@ -113,8 +116,7 @@ namespace Handbrake.Presets
             }\r
             this.userPresets = newUserPresets;\r
 \r
-            // Rebuild the UserPresets.xml file\r
-            this.UpdatePresetFiles();\r
+            // Rebuild the Preset XML files\r
             this.UpdatePresetFiles();\r
         }\r
 \r
@@ -222,7 +224,8 @@ namespace Handbrake.Presets
                                                    Name = presetName[0].Replace("+", string.Empty).Trim(), \r
                                                    Query = presetName[2], \r
                                                    Version = Properties.Settings.Default.hb_version, \r
-                                                   CropSettings = pic\r
+                                                   CropSettings = pic,\r
+                                                   Description = string.Empty // Maybe one day we will populate this.\r
                                                };\r
                         this.presets.Add(newPreset);\r
                     }\r
@@ -243,13 +246,15 @@ namespace Handbrake.Presets
         {\r
             this.LoadPresetData();\r
             presetPanel.Nodes.Clear();\r
-            string category = string.Empty;\r
+            string category = string.Empty; // The category we are currnetly processing\r
             TreeNode rootNode = null;\r
 \r
             if (this.presets.Count != 0) // Built In Presets\r
             {\r
                 foreach (Preset preset in this.presets)\r
                 {\r
+                    // If the category of this preset doesn't match the current category we are processing\r
+                    // Then we need to create a new root node.\r
                     if (preset.Category != category)\r
                     {\r
                         rootNode = new TreeNode(preset.Category);\r
@@ -258,7 +263,7 @@ namespace Handbrake.Presets
                     }\r
 \r
                     if (preset.Category == category && rootNode != null)\r
-                        rootNode.Nodes.Add(preset.Name);\r
+                        rootNode.Nodes.Add(new TreeNode(preset.Name) { ToolTipText = preset.Description });\r
                 }\r
             }\r
 \r
@@ -274,9 +279,9 @@ namespace Handbrake.Presets
                 }\r
 \r
                 if (preset.Category == category && rootNode != null)\r
-                    rootNode.Nodes.Add(new TreeNode(preset.Name) {ForeColor = Color.Black});\r
+                    rootNode.Nodes.Add(new TreeNode(preset.Name) {ForeColor = Color.Black, ToolTipText = preset.Description});\r
                 else\r
-                    presetPanel.Nodes.Add(new TreeNode(preset.Name) {ForeColor = Color.Black});\r
+                    presetPanel.Nodes.Add(new TreeNode(preset.Name) { ForeColor = Color.Black, ToolTipText = preset.Description });\r
             }\r
         }\r
 \r
index 8a497d7ac2a170fe6429ba16b28a8305e2e05331..208dd1cc3297397df1c2d29142a0a59d43e5b2a1 100644 (file)
@@ -78,7 +78,7 @@ namespace Handbrake
 \r
             string query = QueryGenerator.GenerateQueryForPreset(mainWindow, pictureSettingsMode, check_useFilters.Checked, 0, 0);\r
 \r
-            if (presetCode.Add(txt_preset_name.Text.Trim(), query, pictureSettingsMode != QueryPictureSettingsMode.None))\r
+            if (presetCode.Add(txt_preset_name.Text.Trim(), query, pictureSettingsMode != QueryPictureSettingsMode.None, string.Empty))\r
             {\r
                 this.DialogResult = DialogResult.OK;\r
                 this.Close();           \r
index 3e2399a7812af16cfd942f93aaa3415e1d1d2ad2..122ee638d265520bed67edec49e62a4be8311533 100644 (file)
@@ -71,6 +71,15 @@ namespace Handbrake
             this.btn_export = new System.Windows.Forms.Button();\r
             this.drop_mode = new System.Windows.Forms.ComboBox();\r
             this.btn_generate_Query = new System.Windows.Forms.Button();\r
+            this.treeView_presets = new System.Windows.Forms.TreeView();\r
+            this.presets_menu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
+            this.pmnu_expandAll = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.pmnu_collapse = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.sep1 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.pmnu_import = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.pmnu_saveChanges = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.pmnu_delete = new System.Windows.Forms.ToolStripMenuItem();\r
             this.DVD_Open = new System.Windows.Forms.FolderBrowserDialog();\r
             this.File_Open = new System.Windows.Forms.OpenFileDialog();\r
             this.ISO_Open = new System.Windows.Forms.OpenFileDialog();\r
@@ -102,7 +111,6 @@ namespace Handbrake
             this.Label47 = new System.Windows.Forms.Label();\r
             this.Label3 = new System.Windows.Forms.Label();\r
             this.tab_audio = new System.Windows.Forms.TabPage();\r
-            this.AudioSettings = new Handbrake.Controls.AudioPanel();\r
             this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);\r
             this.tab_video = new System.Windows.Forms.TabPage();\r
             this.checkMaximumFramerate = new System.Windows.Forms.CheckBox();\r
@@ -115,17 +123,13 @@ namespace Handbrake
             this.lbl_SliderValue = new System.Windows.Forms.Label();\r
             this.lbl_framerate = new System.Windows.Forms.Label();\r
             this.tab_picture = new System.Windows.Forms.TabPage();\r
-            this.PictureSettings = new Handbrake.Controls.PictureSettings();\r
             this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();\r
             this.tabs_panel = new System.Windows.Forms.TabControl();\r
             this.tab_filters = new System.Windows.Forms.TabPage();\r
-            this.Filters = new Handbrake.Controls.Filters();\r
             this.tab_subtitles = new System.Windows.Forms.TabPage();\r
-            this.Subtitles = new Handbrake.Controls.Subtitles();\r
             this.tab_chapters = new System.Windows.Forms.TabPage();\r
             this.label31 = new System.Windows.Forms.Label();\r
             this.tab_advanced = new System.Windows.Forms.TabPage();\r
-            this.x264Panel = new Handbrake.Controls.x264Panel();\r
             this.tab_query = new System.Windows.Forms.TabPage();\r
             this.btn_clear = new System.Windows.Forms.Button();\r
             this.label34 = new System.Windows.Forms.Label();\r
@@ -133,15 +137,6 @@ namespace Handbrake
             this.rtf_query = new System.Windows.Forms.RichTextBox();\r
             this.groupBox2 = new System.Windows.Forms.GroupBox();\r
             this.splitContainer1 = new System.Windows.Forms.SplitContainer();\r
-            this.treeView_presets = new System.Windows.Forms.TreeView();\r
-            this.presets_menu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
-            this.pmnu_expandAll = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.pmnu_collapse = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.sep1 = new System.Windows.Forms.ToolStripSeparator();\r
-            this.pmnu_import = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();\r
-            this.pmnu_saveChanges = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.pmnu_delete = new System.Windows.Forms.ToolStripMenuItem();\r
             this.toolStrip1 = new System.Windows.Forms.ToolStrip();\r
             this.btn_source = new System.Windows.Forms.ToolStripDropDownButton();\r
             this.btn_dvd_source = new System.Windows.Forms.ToolStripMenuItem();\r
@@ -179,11 +174,17 @@ namespace Handbrake
             this.SourceLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();\r
             this.openPreset = new System.Windows.Forms.OpenFileDialog();\r
             this.File_ChapterImport = new System.Windows.Forms.OpenFileDialog();\r
+            this.PictureSettings = new Handbrake.Controls.PictureSettings();\r
+            this.Filters = new Handbrake.Controls.Filters();\r
+            this.AudioSettings = new Handbrake.Controls.AudioPanel();\r
+            this.Subtitles = new Handbrake.Controls.Subtitles();\r
+            this.x264Panel = new Handbrake.Controls.x264Panel();\r
             notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
             notifyIconMenu.SuspendLayout();\r
             ((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();\r
             ((System.ComponentModel.ISupportInitialize)(this.data_chpt)).BeginInit();\r
             this.ChaptersMenu.SuspendLayout();\r
+            this.presets_menu.SuspendLayout();\r
             this.frmMainMenu.SuspendLayout();\r
             this.tab_audio.SuspendLayout();\r
             this.tab_video.SuspendLayout();\r
@@ -198,7 +199,6 @@ namespace Handbrake
             this.splitContainer1.Panel1.SuspendLayout();\r
             this.splitContainer1.Panel2.SuspendLayout();\r
             this.splitContainer1.SuspendLayout();\r
-            this.presets_menu.SuspendLayout();\r
             this.toolStrip1.SuspendLayout();\r
             this.StatusStrip.SuspendLayout();\r
             this.tableLayoutPanel2.SuspendLayout();\r
@@ -282,7 +282,7 @@ namespace Handbrake
             this.check_turbo.Enabled = false;\r
             this.check_turbo.Location = new System.Drawing.Point(146, 143);\r
             this.check_turbo.Name = "check_turbo";\r
-            this.check_turbo.Size = new System.Drawing.Size(99, 17);\r
+            this.check_turbo.Size = new System.Drawing.Size(101, 17);\r
             this.check_turbo.TabIndex = 7;\r
             this.check_turbo.Text = "Turbo first Pass";\r
             this.ToolTip.SetToolTip(this.check_turbo, "Makes the first pass of a 2 pass encode faster.");\r
@@ -600,6 +600,85 @@ namespace Handbrake
             this.btn_generate_Query.UseVisualStyleBackColor = true;\r
             this.btn_generate_Query.Click += new System.EventHandler(this.btn_generate_Query_Click);\r
             // \r
+            // treeView_presets\r
+            // \r
+            this.treeView_presets.ContextMenuStrip = this.presets_menu;\r
+            this.treeView_presets.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.treeView_presets.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.treeView_presets.ForeColor = System.Drawing.Color.DarkBlue;\r
+            this.treeView_presets.FullRowSelect = true;\r
+            this.treeView_presets.HideSelection = false;\r
+            this.treeView_presets.ItemHeight = 21;\r
+            this.treeView_presets.Location = new System.Drawing.Point(0, 0);\r
+            this.treeView_presets.Name = "treeView_presets";\r
+            this.treeView_presets.ShowLines = false;\r
+            this.treeView_presets.Size = new System.Drawing.Size(240, 424);\r
+            this.treeView_presets.TabIndex = 0;\r
+            this.treeView_presets.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_presets_AfterSelect);\r
+            this.treeView_presets.KeyUp += new System.Windows.Forms.KeyEventHandler(this.treeView_presets_deleteKey);\r
+            this.treeView_presets.MouseMove += new System.Windows.Forms.MouseEventHandler(this.TreeViewPresetsMouseMove);\r
+            this.treeView_presets.MouseUp += new System.Windows.Forms.MouseEventHandler(this.treeview_presets_mouseUp);\r
+            // \r
+            // presets_menu\r
+            // \r
+            this.presets_menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.pmnu_expandAll,\r
+            this.pmnu_collapse,\r
+            this.sep1,\r
+            this.pmnu_import,\r
+            this.toolStripSeparator2,\r
+            this.pmnu_saveChanges,\r
+            this.pmnu_delete});\r
+            this.presets_menu.Name = "presets_menu";\r
+            this.presets_menu.Size = new System.Drawing.Size(148, 126);\r
+            this.presets_menu.Text = ";";\r
+            this.presets_menu.Opening += new System.ComponentModel.CancelEventHandler(this.presets_menu_Opening);\r
+            // \r
+            // pmnu_expandAll\r
+            // \r
+            this.pmnu_expandAll.Name = "pmnu_expandAll";\r
+            this.pmnu_expandAll.Size = new System.Drawing.Size(147, 22);\r
+            this.pmnu_expandAll.Text = "Expand All";\r
+            this.pmnu_expandAll.Click += new System.EventHandler(this.pmnu_expandAll_Click);\r
+            // \r
+            // pmnu_collapse\r
+            // \r
+            this.pmnu_collapse.Name = "pmnu_collapse";\r
+            this.pmnu_collapse.Size = new System.Drawing.Size(147, 22);\r
+            this.pmnu_collapse.Text = "Collapse All";\r
+            this.pmnu_collapse.Click += new System.EventHandler(this.pmnu_collapse_Click);\r
+            // \r
+            // sep1\r
+            // \r
+            this.sep1.Name = "sep1";\r
+            this.sep1.Size = new System.Drawing.Size(144, 6);\r
+            // \r
+            // pmnu_import\r
+            // \r
+            this.pmnu_import.Name = "pmnu_import";\r
+            this.pmnu_import.Size = new System.Drawing.Size(147, 22);\r
+            this.pmnu_import.Text = "Import";\r
+            this.pmnu_import.Click += new System.EventHandler(this.pmnu_import_Click);\r
+            // \r
+            // toolStripSeparator2\r
+            // \r
+            this.toolStripSeparator2.Name = "toolStripSeparator2";\r
+            this.toolStripSeparator2.Size = new System.Drawing.Size(144, 6);\r
+            // \r
+            // pmnu_saveChanges\r
+            // \r
+            this.pmnu_saveChanges.Name = "pmnu_saveChanges";\r
+            this.pmnu_saveChanges.Size = new System.Drawing.Size(147, 22);\r
+            this.pmnu_saveChanges.Text = "Save Changes";\r
+            this.pmnu_saveChanges.Click += new System.EventHandler(this.pmnu_saveChanges_Click);\r
+            // \r
+            // pmnu_delete\r
+            // \r
+            this.pmnu_delete.Name = "pmnu_delete";\r
+            this.pmnu_delete.Size = new System.Drawing.Size(147, 22);\r
+            this.pmnu_delete.Text = "Delete";\r
+            this.pmnu_delete.Click += new System.EventHandler(this.pmnu_delete_click);\r
+            // \r
             // DVD_Open\r
             // \r
             this.DVD_Open.Description = "Select the \"VIDEO_TS\" folder from your DVD Drive.";\r
@@ -859,15 +938,6 @@ namespace Handbrake
             this.tab_audio.Text = "Audio";\r
             this.tab_audio.UseVisualStyleBackColor = true;\r
             // \r
-            // AudioSettings\r
-            // \r
-            this.AudioSettings.BackColor = System.Drawing.Color.Transparent;\r
-            this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.AudioSettings.Location = new System.Drawing.Point(0, 0);\r
-            this.AudioSettings.Name = "AudioSettings";\r
-            this.AudioSettings.Size = new System.Drawing.Size(715, 310);\r
-            this.AudioSettings.TabIndex = 0;\r
-            // \r
             // AudioMenuRowHeightHack\r
             // \r
             this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;\r
@@ -907,7 +977,7 @@ namespace Handbrake
             this.checkMaximumFramerate.BackColor = System.Drawing.Color.Transparent;\r
             this.checkMaximumFramerate.Location = new System.Drawing.Point(125, 89);\r
             this.checkMaximumFramerate.Name = "checkMaximumFramerate";\r
-            this.checkMaximumFramerate.Size = new System.Drawing.Size(131, 17);\r
+            this.checkMaximumFramerate.Size = new System.Drawing.Size(132, 17);\r
             this.checkMaximumFramerate.TabIndex = 19;\r
             this.checkMaximumFramerate.Text = "Peak Framerate (VFR)";\r
             this.checkMaximumFramerate.UseVisualStyleBackColor = false;\r
@@ -918,7 +988,7 @@ namespace Handbrake
             this.radio_cq.BackColor = System.Drawing.Color.Transparent;\r
             this.radio_cq.Location = new System.Drawing.Point(365, 97);\r
             this.radio_cq.Name = "radio_cq";\r
-            this.radio_cq.Size = new System.Drawing.Size(105, 17);\r
+            this.radio_cq.Size = new System.Drawing.Size(110, 17);\r
             this.radio_cq.TabIndex = 18;\r
             this.radio_cq.Text = "Constant Quality:";\r
             this.radio_cq.UseVisualStyleBackColor = false;\r
@@ -931,7 +1001,7 @@ namespace Handbrake
             this.radio_avgBitrate.Checked = true;\r
             this.radio_avgBitrate.Location = new System.Drawing.Point(365, 64);\r
             this.radio_avgBitrate.Name = "radio_avgBitrate";\r
-            this.radio_avgBitrate.Size = new System.Drawing.Size(112, 17);\r
+            this.radio_avgBitrate.Size = new System.Drawing.Size(116, 17);\r
             this.radio_avgBitrate.TabIndex = 17;\r
             this.radio_avgBitrate.TabStop = true;\r
             this.radio_avgBitrate.Text = "Avg Bitrate (kbps):";\r
@@ -944,7 +1014,7 @@ namespace Handbrake
             this.radio_targetFilesize.BackColor = System.Drawing.Color.Transparent;\r
             this.radio_targetFilesize.Location = new System.Drawing.Point(365, 37);\r
             this.radio_targetFilesize.Name = "radio_targetFilesize";\r
-            this.radio_targetFilesize.Size = new System.Drawing.Size(107, 17);\r
+            this.radio_targetFilesize.Size = new System.Drawing.Size(108, 17);\r
             this.radio_targetFilesize.TabIndex = 16;\r
             this.radio_targetFilesize.Text = "Target Size (MB):";\r
             this.radio_targetFilesize.UseVisualStyleBackColor = false;\r
@@ -967,7 +1037,7 @@ namespace Handbrake
             this.check_2PassEncode.BackColor = System.Drawing.Color.Transparent;\r
             this.check_2PassEncode.Location = new System.Drawing.Point(125, 120);\r
             this.check_2PassEncode.Name = "check_2PassEncode";\r
-            this.check_2PassEncode.Size = new System.Drawing.Size(106, 17);\r
+            this.check_2PassEncode.Size = new System.Drawing.Size(104, 17);\r
             this.check_2PassEncode.TabIndex = 6;\r
             this.check_2PassEncode.Text = "2-Pass Encoding";\r
             this.check_2PassEncode.UseVisualStyleBackColor = false;\r
@@ -1017,25 +1087,13 @@ namespace Handbrake
             this.tab_picture.Text = "Picture";\r
             this.tab_picture.UseVisualStyleBackColor = true;\r
             // \r
-            // PictureSettings\r
-            // \r
-            this.PictureSettings.BackColor = System.Drawing.Color.Transparent;\r
-            this.PictureSettings.CurrentlySelectedPreset = null;\r
-            this.PictureSettings.Enabled = false;\r
-            this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.PictureSettings.Location = new System.Drawing.Point(0, 0);\r
-            this.PictureSettings.Name = "PictureSettings";\r
-            this.PictureSettings.PresetMaximumResolution = new System.Drawing.Size(0, 0);\r
-            this.PictureSettings.Size = new System.Drawing.Size(666, 279);\r
-            this.PictureSettings.TabIndex = 0;\r
-            // \r
             // Check_ChapterMarkers\r
             // \r
             this.Check_ChapterMarkers.AutoSize = true;\r
             this.Check_ChapterMarkers.BackColor = System.Drawing.Color.Transparent;\r
             this.Check_ChapterMarkers.Location = new System.Drawing.Point(16, 32);\r
             this.Check_ChapterMarkers.Name = "Check_ChapterMarkers";\r
-            this.Check_ChapterMarkers.Size = new System.Drawing.Size(136, 17);\r
+            this.Check_ChapterMarkers.Size = new System.Drawing.Size(140, 17);\r
             this.Check_ChapterMarkers.TabIndex = 1;\r
             this.Check_ChapterMarkers.Text = "Create chapter markers";\r
             this.Check_ChapterMarkers.UseVisualStyleBackColor = false;\r
@@ -1068,15 +1126,6 @@ namespace Handbrake
             this.tab_filters.Text = "Video Filters";\r
             this.tab_filters.UseVisualStyleBackColor = true;\r
             // \r
-            // Filters\r
-            // \r
-            this.Filters.BackColor = System.Drawing.Color.Transparent;\r
-            this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.Filters.Location = new System.Drawing.Point(0, 0);\r
-            this.Filters.Name = "Filters";\r
-            this.Filters.Size = new System.Drawing.Size(713, 310);\r
-            this.Filters.TabIndex = 0;\r
-            // \r
             // tab_subtitles\r
             // \r
             this.tab_subtitles.Controls.Add(this.Subtitles);\r
@@ -1088,15 +1137,6 @@ namespace Handbrake
             this.tab_subtitles.Text = "Subtitles";\r
             this.tab_subtitles.UseVisualStyleBackColor = true;\r
             // \r
-            // Subtitles\r
-            // \r
-            this.Subtitles.BackColor = System.Drawing.Color.Transparent;\r
-            this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.Subtitles.Location = new System.Drawing.Point(0, 0);\r
-            this.Subtitles.Name = "Subtitles";\r
-            this.Subtitles.Size = new System.Drawing.Size(722, 310);\r
-            this.Subtitles.TabIndex = 0;\r
-            // \r
             // tab_chapters\r
             // \r
             this.tab_chapters.BackColor = System.Drawing.Color.Transparent;\r
@@ -1135,16 +1175,6 @@ namespace Handbrake
             this.tab_advanced.Text = "Advanced";\r
             this.tab_advanced.UseVisualStyleBackColor = true;\r
             // \r
-            // x264Panel\r
-            // \r
-            this.x264Panel.BackColor = System.Drawing.Color.Transparent;\r
-            this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.x264Panel.Location = new System.Drawing.Point(0, 0);\r
-            this.x264Panel.Name = "x264Panel";\r
-            this.x264Panel.Size = new System.Drawing.Size(720, 306);\r
-            this.x264Panel.TabIndex = 0;\r
-            this.x264Panel.X264Query = "";\r
-            // \r
             // tab_query\r
             // \r
             this.tab_query.Controls.Add(this.btn_clear);\r
@@ -1232,84 +1262,6 @@ namespace Handbrake
             this.splitContainer1.SplitterDistance = 424;\r
             this.splitContainer1.TabIndex = 1;\r
             // \r
-            // treeView_presets\r
-            // \r
-            this.treeView_presets.ContextMenuStrip = this.presets_menu;\r
-            this.treeView_presets.Dock = System.Windows.Forms.DockStyle.Fill;\r
-            this.treeView_presets.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.treeView_presets.ForeColor = System.Drawing.Color.DarkBlue;\r
-            this.treeView_presets.FullRowSelect = true;\r
-            this.treeView_presets.HideSelection = false;\r
-            this.treeView_presets.ItemHeight = 21;\r
-            this.treeView_presets.Location = new System.Drawing.Point(0, 0);\r
-            this.treeView_presets.Name = "treeView_presets";\r
-            this.treeView_presets.ShowLines = false;\r
-            this.treeView_presets.Size = new System.Drawing.Size(240, 424);\r
-            this.treeView_presets.TabIndex = 0;\r
-            this.treeView_presets.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_presets_AfterSelect);\r
-            this.treeView_presets.KeyUp += new System.Windows.Forms.KeyEventHandler(this.treeView_presets_deleteKey);\r
-            this.treeView_presets.MouseUp += new System.Windows.Forms.MouseEventHandler(this.treeview_presets_mouseUp);\r
-            // \r
-            // presets_menu\r
-            // \r
-            this.presets_menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
-            this.pmnu_expandAll,\r
-            this.pmnu_collapse,\r
-            this.sep1,\r
-            this.pmnu_import,\r
-            this.toolStripSeparator2,\r
-            this.pmnu_saveChanges,\r
-            this.pmnu_delete});\r
-            this.presets_menu.Name = "presets_menu";\r
-            this.presets_menu.Size = new System.Drawing.Size(148, 126);\r
-            this.presets_menu.Text = ";";\r
-            this.presets_menu.Opening += new System.ComponentModel.CancelEventHandler(this.presets_menu_Opening);\r
-            // \r
-            // pmnu_expandAll\r
-            // \r
-            this.pmnu_expandAll.Name = "pmnu_expandAll";\r
-            this.pmnu_expandAll.Size = new System.Drawing.Size(147, 22);\r
-            this.pmnu_expandAll.Text = "Expand All";\r
-            this.pmnu_expandAll.Click += new System.EventHandler(this.pmnu_expandAll_Click);\r
-            // \r
-            // pmnu_collapse\r
-            // \r
-            this.pmnu_collapse.Name = "pmnu_collapse";\r
-            this.pmnu_collapse.Size = new System.Drawing.Size(147, 22);\r
-            this.pmnu_collapse.Text = "Collapse All";\r
-            this.pmnu_collapse.Click += new System.EventHandler(this.pmnu_collapse_Click);\r
-            // \r
-            // sep1\r
-            // \r
-            this.sep1.Name = "sep1";\r
-            this.sep1.Size = new System.Drawing.Size(144, 6);\r
-            // \r
-            // pmnu_import\r
-            // \r
-            this.pmnu_import.Name = "pmnu_import";\r
-            this.pmnu_import.Size = new System.Drawing.Size(147, 22);\r
-            this.pmnu_import.Text = "Import";\r
-            this.pmnu_import.Click += new System.EventHandler(this.pmnu_import_Click);\r
-            // \r
-            // toolStripSeparator2\r
-            // \r
-            this.toolStripSeparator2.Name = "toolStripSeparator2";\r
-            this.toolStripSeparator2.Size = new System.Drawing.Size(144, 6);\r
-            // \r
-            // pmnu_saveChanges\r
-            // \r
-            this.pmnu_saveChanges.Name = "pmnu_saveChanges";\r
-            this.pmnu_saveChanges.Size = new System.Drawing.Size(147, 22);\r
-            this.pmnu_saveChanges.Text = "Save Changes";\r
-            this.pmnu_saveChanges.Click += new System.EventHandler(this.pmnu_saveChanges_Click);\r
-            // \r
-            // pmnu_delete\r
-            // \r
-            this.pmnu_delete.Name = "pmnu_delete";\r
-            this.pmnu_delete.Size = new System.Drawing.Size(147, 22);\r
-            this.pmnu_delete.Text = "Delete";\r
-            this.pmnu_delete.Click += new System.EventHandler(this.pmnu_delete_click);\r
-            // \r
             // toolStrip1\r
             // \r
             this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;\r
@@ -1714,6 +1666,55 @@ namespace Handbrake
             // \r
             this.File_ChapterImport.Filter = "CSV Files|*.csv";\r
             // \r
+            // PictureSettings\r
+            // \r
+            this.PictureSettings.BackColor = System.Drawing.Color.Transparent;\r
+            this.PictureSettings.CurrentlySelectedPreset = null;\r
+            this.PictureSettings.Enabled = false;\r
+            this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.PictureSettings.Location = new System.Drawing.Point(0, 0);\r
+            this.PictureSettings.Name = "PictureSettings";\r
+            this.PictureSettings.PresetMaximumResolution = new System.Drawing.Size(0, 0);\r
+            this.PictureSettings.Size = new System.Drawing.Size(666, 279);\r
+            this.PictureSettings.TabIndex = 0;\r
+            // \r
+            // Filters\r
+            // \r
+            this.Filters.BackColor = System.Drawing.Color.Transparent;\r
+            this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Filters.Location = new System.Drawing.Point(0, 0);\r
+            this.Filters.Name = "Filters";\r
+            this.Filters.Size = new System.Drawing.Size(713, 310);\r
+            this.Filters.TabIndex = 0;\r
+            // \r
+            // AudioSettings\r
+            // \r
+            this.AudioSettings.BackColor = System.Drawing.Color.Transparent;\r
+            this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.AudioSettings.Location = new System.Drawing.Point(0, 0);\r
+            this.AudioSettings.Name = "AudioSettings";\r
+            this.AudioSettings.Size = new System.Drawing.Size(715, 310);\r
+            this.AudioSettings.TabIndex = 0;\r
+            // \r
+            // Subtitles\r
+            // \r
+            this.Subtitles.BackColor = System.Drawing.Color.Transparent;\r
+            this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Subtitles.Location = new System.Drawing.Point(0, 0);\r
+            this.Subtitles.Name = "Subtitles";\r
+            this.Subtitles.Size = new System.Drawing.Size(722, 310);\r
+            this.Subtitles.TabIndex = 0;\r
+            // \r
+            // x264Panel\r
+            // \r
+            this.x264Panel.BackColor = System.Drawing.Color.Transparent;\r
+            this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.x264Panel.Location = new System.Drawing.Point(0, 0);\r
+            this.x264Panel.Name = "x264Panel";\r
+            this.x264Panel.Size = new System.Drawing.Size(720, 306);\r
+            this.x264Panel.TabIndex = 0;\r
+            this.x264Panel.X264Query = "";\r
+            // \r
             // frmMain\r
             // \r
             this.AllowDrop = true;\r
@@ -1744,6 +1745,7 @@ namespace Handbrake
             ((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).EndInit();\r
             ((System.ComponentModel.ISupportInitialize)(this.data_chpt)).EndInit();\r
             this.ChaptersMenu.ResumeLayout(false);\r
+            this.presets_menu.ResumeLayout(false);\r
             this.frmMainMenu.ResumeLayout(false);\r
             this.frmMainMenu.PerformLayout();\r
             this.tab_audio.ResumeLayout(false);\r
@@ -1762,7 +1764,6 @@ namespace Handbrake
             this.splitContainer1.Panel1.ResumeLayout(false);\r
             this.splitContainer1.Panel2.ResumeLayout(false);\r
             this.splitContainer1.ResumeLayout(false);\r
-            this.presets_menu.ResumeLayout(false);\r
             this.toolStrip1.ResumeLayout(false);\r
             this.toolStrip1.PerformLayout();\r
             this.StatusStrip.ResumeLayout(false);\r
index af589572718a4b8d8a87cdee6cf668a631b6c66b..3b6474bdb0a953ad2f87c0642a41300684839873 100644 (file)
@@ -792,6 +792,29 @@ namespace Handbrake
             selectPreset();\r
         }\r
 \r
+        /// <summary>\r
+        /// When the mouse moves, display a preset\r
+        /// </summary>\r
+        /// <param name="sender">The Sender</param>\r
+        /// <param name="e">the MouseEventArgs</param>\r
+        private void TreeViewPresetsMouseMove(object sender, MouseEventArgs e)\r
+        {\r
+            TreeNode theNode = this.treeView_presets.GetNodeAt(e.X, e.Y);\r
+\r
+            if ((theNode != null))\r
+            {\r
+                // Change the ToolTip only if the pointer moved to a new node.\r
+                if (theNode.ToolTipText != this.ToolTip.GetToolTip(this.treeView_presets))\r
+                {\r
+                    this.ToolTip.SetToolTip(this.treeView_presets, theNode.ToolTipText);\r
+                }\r
+            }\r
+            else     // Pointer is not over a node so clear the ToolTip.\r
+            {\r
+                this.ToolTip.SetToolTip(this.treeView_presets, string.Empty);\r
+            }\r
+        }\r
+\r
         /// <summary>\r
         /// Preset Bar - Handle the Delete Key\r
         /// </summary>\r
@@ -912,7 +935,7 @@ namespace Handbrake
                     PresetLoader.LoadPreset(this, parsed, parsed.PresetName);\r
                     if (presetHandler.Add(parsed.PresetName + " (Imported)",\r
                                           QueryGenerator.GenerateFullQuery(this),\r
-                                          parsed.UsesPictureSettings))\r
+                                          parsed.UsesPictureSettings, string.Empty))\r
                     {\r
                         TreeNode preset_treeview = new TreeNode(parsed.PresetName + " (Imported)")\r
                                                        {\r
@@ -1202,13 +1225,13 @@ namespace Handbrake
                             MessageBoxIcon.Warning);\r
 \r
                     if (result != DialogResult.Yes) return false;\r
-                } \r
+                }\r
                 else\r
                 {\r
                     return false;\r
                 }\r
             }\r
-            \r
+\r
             // Add the job.\r
             encodeQueue.Add(query, this.GetTitle(), jobSourcePath, jobDestination, (rtf_query.Text != string.Empty));\r
 \r
index c173c69917a20e9a4b6daaca68f515e23ac882d5..bb2f6f7f3faabf3e7a217d5c2603dab0257d20ae 100644 (file)
     <value>False</value>\r
   </metadata>\r
   <metadata name="notifyIconMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-    <value>17, 54</value>\r
+    <value>1106, 15</value>\r
   </metadata>\r
   <metadata name="DVD_Save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
     <value>556, 15</value>\r
     <value>True</value>\r
   </metadata>\r
   <metadata name="ChaptersMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-    <value>935, 54</value>\r
+    <value>578, 54</value>\r
   </metadata>\r
   <data name="data_chpt.ToolTip" xml:space="preserve">\r
     <value>Here you can name each chapter that the encoded video will contain.\r
@@ -173,6 +173,9 @@ The Following options are not 100% accurate:
 - Encode video between a start and end time, measured in seconds\r
 - Encode video between a start and end frame.</value>\r
   </data>\r
+  <metadata name="presets_menu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>1354, 15</value>\r
+  </metadata>\r
   <metadata name="DVD_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
     <value>232, 15</value>\r
   </metadata>\r
@@ -186,7 +189,7 @@ The Following options are not 100% accurate:
     <value>106, 15</value>\r
   </metadata>\r
   <metadata name="AudioMenuRowHeightHack.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-    <value>392, 54</value>\r
+    <value>17, 54</value>\r
   </metadata>\r
   <data name="label34.Text" xml:space="preserve">\r
     <value>Here you can alter the query generated by this program. This feature is for one job overriding of the automatic query generation.\r
@@ -194,9 +197,6 @@ Don't forget to re-generate this query if you change any GUI options.
 Note that this will also override the "Add to Queue" query as well.\r
 Clear the text box below to return to the internal query generation.</value>\r
   </data>\r
-  <metadata name="presets_menu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-    <value>265, 54</value>\r
-  </metadata>\r
   <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
     <value>767, 15</value>\r
   </metadata>\r
@@ -584,10 +584,10 @@ Clear the text box below to return to the internal query generation.</value>
 </value>\r
   </data>\r
   <metadata name="StatusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-    <value>155, 54</value>\r
+    <value>1244, 15</value>\r
   </metadata>\r
   <metadata name="hbproc.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-    <value>595, 54</value>\r
+    <value>220, 54</value>\r
   </metadata>\r
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
     <value>98</value>\r
@@ -975,9 +975,9 @@ Clear the text box below to return to the internal query generation.</value>
     <value>664, 15</value>\r
   </metadata>\r
   <metadata name="openPreset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-    <value>680, 54</value>\r
+    <value>310, 54</value>\r
   </metadata>\r
   <metadata name="File_ChapterImport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-    <value>787, 54</value>\r
+    <value>423, 54</value>\r
   </metadata>\r
 </root>
\ No newline at end of file