From 990241acf2640730ef43173afe70b11593681b7c Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 14 Mar 2008 15:52:04 +0000 Subject: [PATCH] WinGui: - Added warning about UNC file paths - Removed the generate presets.dat function on start-up. (It wasn't really needed) - Changed a few tooltips - Switched back to .Net version 2 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1337 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/HandBrakeCS.csproj | 5 +-- win/C#/Properties/Settings.Designer.cs | 12 ------ win/C#/Properties/Settings.settings | 3 -- win/C#/app.config | 3 -- win/C#/frmMain.Designer.cs | 27 +++++++----- win/C#/frmMain.cs | 58 +++++++++++++------------- win/C#/frmMain.resx | 9 ++-- win/C#/frmOptions.Designer.cs | 16 ------- win/C#/frmOptions.cs | 10 ----- 9 files changed, 54 insertions(+), 89 deletions(-) diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj index 93cd6e8a8..d9c3fe0fe 100644 --- a/win/C#/HandBrakeCS.csproj +++ b/win/C#/HandBrakeCS.csproj @@ -18,7 +18,7 @@ 2.0 - v3.5 + v2.0 publish\ true Disk @@ -83,9 +83,6 @@ - - 3.5 - diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index 0b2a51f23..6b014a053 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -143,18 +143,6 @@ namespace Handbrake.Properties { } } - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Checked")] - public string updatePresets { - get { - return ((string)(this["updatePresets"])); - } - set { - this["updatePresets"] = value; - } - } - [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Checked")] diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index 928ae649e..c526f7a09 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -32,9 +32,6 @@ 0 - - Checked - Checked diff --git a/win/C#/app.config b/win/C#/app.config index f39705bcb..f5213e9d7 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -37,9 +37,6 @@ 0 - - Checked - Checked diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 0ce9530e8..54845ccfa 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -37,7 +37,7 @@ namespace Handbrake this.components = new System.ComponentModel.Container(); System.Windows.Forms.Label Label38; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); this.DVD_Save = new System.Windows.Forms.SaveFileDialog(); this.File_Save = new System.Windows.Forms.SaveFileDialog(); this.ToolTip = new System.Windows.Forms.ToolTip(this.components); @@ -200,7 +200,6 @@ namespace Handbrake this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.btn_ActivityWindow = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); Label38 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.slider_drc)).BeginInit(); @@ -442,8 +441,8 @@ namespace Handbrake this.check_largeFile.Size = new System.Drawing.Size(82, 17); this.check_largeFile.TabIndex = 4; this.check_largeFile.Text = "64Bit MP4"; - this.ToolTip.SetToolTip(this.check_largeFile, "Allows creation of MP4 files greater than 4GB.\r\nWarning: Breaks iPod, Apple TV an" + - "d PS3 compatibility."); + this.ToolTip.SetToolTip(this.check_largeFile, "Allows creation of MP4 files greater than 4GB.\r\nWarning: Breaks iPod, Apple TV Ve" + + "rsion 1 and PS3 compatibility."); this.check_largeFile.UseVisualStyleBackColor = false; this.check_largeFile.CheckedChanged += new System.EventHandler(this.check_largeFile_CheckedChanged); // @@ -602,7 +601,6 @@ namespace Handbrake this.slider_drc.Size = new System.Drawing.Size(241, 42); this.slider_drc.TabIndex = 18; this.slider_drc.TickFrequency = 10; - this.ToolTip.SetToolTip(this.slider_drc, "Dynamic Range Compression"); this.slider_drc.Scroll += new System.EventHandler(this.slider_drc_Scroll); // // rtf_h264advanced @@ -631,7 +629,7 @@ namespace Handbrake // // DVD_Open // - this.DVD_Open.Description = "Select the \"VIDEO_TS\" folder from your DVD Drvie."; + this.DVD_Open.Description = "Select the \"VIDEO_TS\" folder from your DVD Drive."; // // File_Open // @@ -973,6 +971,8 @@ namespace Handbrake this.check_optimiseMP4.Size = new System.Drawing.Size(143, 17); this.check_optimiseMP4.TabIndex = 25; this.check_optimiseMP4.Text = "HTTP Optimized MP4"; + this.ToolTip.SetToolTip(this.check_optimiseMP4, "MP4 files can be optimized for progressive downloads over the Web, but note that " + + "QuickTime can only read the files as long as the file extension is .mp4."); this.check_optimiseMP4.UseVisualStyleBackColor = false; this.check_optimiseMP4.CheckedChanged += new System.EventHandler(this.check_optimiseMP4_CheckedChanged); // @@ -1386,6 +1386,8 @@ namespace Handbrake this.check_iPodAtom.Size = new System.Drawing.Size(122, 17); this.check_iPodAtom.TabIndex = 26; this.check_iPodAtom.Text = "Insert iPod Atom"; + this.ToolTip.SetToolTip(this.check_iPodAtom, "Required for 5th and 6th Generation iPods. Encodes will not sync if this is not e" + + "nabled for H.264 encodes"); this.check_iPodAtom.UseVisualStyleBackColor = false; this.check_iPodAtom.CheckedChanged += new System.EventHandler(this.check_iPodAtom_CheckedChanged); // @@ -1844,12 +1846,13 @@ namespace Handbrake this.data_chpt.Name = "data_chpt"; this.data_chpt.Size = new System.Drawing.Size(607, 182); this.data_chpt.TabIndex = 2; + this.ToolTip.SetToolTip(this.data_chpt, resources.GetString("data_chpt.ToolTip")); // // number // - dataGridViewCellStyle2.Format = "N0"; - dataGridViewCellStyle2.NullValue = null; - this.number.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle3.Format = "N0"; + dataGridViewCellStyle3.NullValue = null; + this.number.DefaultCellStyle = dataGridViewCellStyle3; this.number.HeaderText = "Chapter Number"; this.number.MaxInputLength = 3; this.number.Name = "number"; @@ -2104,6 +2107,7 @@ namespace Handbrake this.btn_start.Name = "btn_start"; this.btn_start.Size = new System.Drawing.Size(67, 36); this.btn_start.Text = "Start"; + this.btn_start.ToolTipText = "Start the encoding process"; this.btn_start.Click += new System.EventHandler(this.btn_start_Click); // // toolStripSeparator1 @@ -2119,6 +2123,7 @@ namespace Handbrake this.btn_add2Queue.Name = "btn_add2Queue"; this.btn_add2Queue.Size = new System.Drawing.Size(110, 36); this.btn_add2Queue.Text = "Add to Queue"; + this.btn_add2Queue.ToolTipText = "Add a new item to the Queue"; this.btn_add2Queue.Click += new System.EventHandler(this.btn_add2Queue_Click); // // btn_showQueue @@ -2128,6 +2133,7 @@ namespace Handbrake this.btn_showQueue.ImageTransparentColor = System.Drawing.Color.Magenta; this.btn_showQueue.Name = "btn_showQueue"; this.btn_showQueue.Size = new System.Drawing.Size(104, 36); + this.btn_showQueue.Tag = ""; this.btn_showQueue.Text = "Show Queue"; this.btn_showQueue.Click += new System.EventHandler(this.btn_showQueue_Click); // @@ -2144,6 +2150,8 @@ namespace Handbrake this.btn_ActivityWindow.Name = "btn_ActivityWindow"; this.btn_ActivityWindow.Size = new System.Drawing.Size(120, 36); this.btn_ActivityWindow.Text = "Activity Window"; + this.btn_ActivityWindow.ToolTipText = "Displays the activity window which displays the log of the last completed or curr" + + "ently running encode."; this.btn_ActivityWindow.Click += new System.EventHandler(this.btn_ActivityWindow_Click); // // toolStripSeparator8 @@ -2371,7 +2379,6 @@ namespace Handbrake private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; private System.Windows.Forms.ToolStripButton btn_ActivityWindow; private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; - private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.Label lbl_warn_chapt; private System.Windows.Forms.ToolStripMenuItem mnu_handbrake_home; diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index d93bbfad3..3c945b9fe 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -56,9 +56,7 @@ namespace Handbrake // show the form, but leave disabled until preloading is complete then show the main form this.Enabled = false; - this.Show(); - // Forces frmMain to draw Application.DoEvents(); @@ -74,27 +72,20 @@ namespace Handbrake // Load the presets // Set some defaults for the dropdown menus. Just incase the normal or user presets dont load. - drp_crop.SelectedIndex = 0; - - lblStatus.Text = "Loading Presets ..."; + lblStatus.Text = "Loading Presets Bar ..."; Application.DoEvents(); - if (Properties.Settings.Default.updatePresets == "Checked") - { - grabCLIPresets(); - } + drp_crop.SelectedIndex = 0; loadPresetPanel(); Thread.Sleep(200); // Now load the users default if required. (Will overide the above setting) + lblStatus.Text = "Loading Preset Settings ..."; + Application.DoEvents(); if (Properties.Settings.Default.defaultSettings == "Checked") - { - lblStatus.Text = "Loading User Default Settings..."; - Application.DoEvents(); loadUserDefaults(); - Thread.Sleep(100); - } else loadNormalPreset(); + Thread.Sleep(100); // Enable or disable tooltips if (Properties.Settings.Default.tooltipEnable == "Checked") @@ -357,18 +348,24 @@ namespace Handbrake filename = ISO_Open.FileName; } - if (filename != "") - { - Form frmRD = new frmReadDVD(filename, this, dvdInfoWindow); - text_source.Text = filename; - frmRD.ShowDialog(); - } + if (filename.StartsWith("\\")) + MessageBox.Show("Sorry, HandBrake does not support UNC file paths. \nTry mounting the share as a network drive in My Computer", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); else - text_source.Text = "Click 'Browse' to continue"; + { + if (filename != "") + { + Form frmRD = new frmReadDVD(filename, this, dvdInfoWindow); + text_source.Text = filename; + frmRD.ShowDialog(); + } + else + text_source.Text = "Click 'Browse' to continue"; - // If there are no titles in the dropdown menu then the scan has obviously failed. Display an error message explaining to the user. - if (drp_dvdtitle.Items.Count == 0) - MessageBox.Show("No Title(s) found. Please make sure you have selected a valid, non-copy protected source. Please refer to the FAQ (see Help Menu).", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand); + // If there are no titles in the dropdown menu then the scan has obviously failed. Display an error message explaining to the user. + if (drp_dvdtitle.Items.Count == 0) + MessageBox.Show("No Title(s) found. Please make sure you have selected a valid, non-copy protected source. Please refer to the FAQ (see Help Menu).", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand); + + } } private void btn_destBrowse_Click(object sender, EventArgs e) @@ -379,11 +376,16 @@ namespace Handbrake // Show the dialog and set the main form file path DVD_Save.ShowDialog(); - text_destination.Text = DVD_Save.FileName; + if (DVD_Save.FileName.StartsWith("\\")) + MessageBox.Show("Sorry, HandBrake does not support UNC file paths. \nTry mounting the share as a network drive in My Computer", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); + else + { + 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) - text_destination.Text = text_destination.Text.Replace(".mp4", ".m4v"); + // 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) + text_destination.Text = text_destination.Text.Replace(".mp4", ".m4v"); + } } private void btn_h264Clear_Click(object sender, EventArgs e) diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx index e4500ad20..807a16b45 100644 --- a/win/C#/frmMain.resx +++ b/win/C#/frmMain.resx @@ -189,6 +189,12 @@ Best used in conjunction with forced subtitles. True + + Here you can name each chapter that the encoded video will contain. +Make sure you have selected a "Title" from the "Source" box above otherwise +the list will not be populated with the correct amount of chapters. +Note: Do not change any of the chapter numbers! + True @@ -198,9 +204,6 @@ Best used in conjunction with forced subtitles. 731, 18 - - 830, 18 - 56 diff --git a/win/C#/frmOptions.Designer.cs b/win/C#/frmOptions.Designer.cs index 97b40d9cc..94bba95c8 100644 --- a/win/C#/frmOptions.Designer.cs +++ b/win/C#/frmOptions.Designer.cs @@ -40,7 +40,6 @@ namespace Handbrake this.label5 = new System.Windows.Forms.Label(); this.tab_options = new System.Windows.Forms.TabControl(); this.tab_general = new System.Windows.Forms.TabPage(); - this.check_updatePresets = new System.Windows.Forms.CheckBox(); this.check_tooltip = new System.Windows.Forms.CheckBox(); this.check_updateCheck = new System.Windows.Forms.CheckBox(); this.check_userDefaultSettings = new System.Windows.Forms.CheckBox(); @@ -127,7 +126,6 @@ namespace Handbrake // tab_general // this.tab_general.BackColor = System.Drawing.SystemColors.ControlLight; - this.tab_general.Controls.Add(this.check_updatePresets); this.tab_general.Controls.Add(this.check_tooltip); this.tab_general.Controls.Add(this.check_updateCheck); this.tab_general.Controls.Add(this.check_userDefaultSettings); @@ -140,19 +138,6 @@ namespace Handbrake this.tab_general.Text = "Startup"; this.tab_general.UseVisualStyleBackColor = true; // - // check_updatePresets - // - this.check_updatePresets.AutoSize = true; - this.check_updatePresets.BackColor = System.Drawing.Color.Transparent; - this.check_updatePresets.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.check_updatePresets.Location = new System.Drawing.Point(16, 102); - this.check_updatePresets.Name = "check_updatePresets"; - this.check_updatePresets.Size = new System.Drawing.Size(112, 17); - this.check_updatePresets.TabIndex = 59; - this.check_updatePresets.Text = "Update presets"; - this.check_updatePresets.UseVisualStyleBackColor = false; - this.check_updatePresets.CheckedChanged += new System.EventHandler(this.check_updatePresets_CheckedChanged); - // // check_tooltip // this.check_tooltip.AutoSize = true; @@ -447,7 +432,6 @@ namespace Handbrake private System.Windows.Forms.Label label8; private System.Windows.Forms.PictureBox pictureBox2; private System.Windows.Forms.Label label7; - internal System.Windows.Forms.CheckBox check_updatePresets; private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.Label label9; internal System.Windows.Forms.CheckBox check_autoNaming; diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs index 83bbffbdd..000afdc3d 100644 --- a/win/C#/frmOptions.cs +++ b/win/C#/frmOptions.cs @@ -40,11 +40,6 @@ namespace Handbrake check_tooltip.CheckState = CheckState.Checked; } - if (Properties.Settings.Default.updatePresets == "Checked") - { - check_updatePresets.CheckState = CheckState.Checked; - } - if (Properties.Settings.Default.autoNaming == "Checked") { check_autoNaming.CheckState = CheckState.Checked; @@ -93,11 +88,6 @@ namespace Handbrake Properties.Settings.Default.CompletionOption = drp_completeOption.Text; } - private void check_updatePresets_CheckedChanged(object sender, EventArgs e) - { - Properties.Settings.Default.updatePresets = check_updatePresets.CheckState.ToString(); - } - private void check_autoNaming_CheckedChanged(object sender, EventArgs e) { Properties.Settings.Default.autoNaming = check_autoNaming.CheckState.ToString(); -- 2.40.0