From: sr55 Date: Sat, 4 Aug 2007 16:00:30 +0000 (+0000) Subject: WinGui: X-Git-Tag: 0.9.0~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=183781712959423ed001f539918d8567e76cecc1;p=handbrake WinGui: - Readded a bit of code that was accidentally removed in the last commit. - Removed some old error handling code that is no longer required. - Set frmReadDVD to always display on top git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@787 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 1cd982f8f..328c5126c 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -70,7 +70,14 @@ namespace Handbrake this.mnu_preset_ipod178 = new System.Windows.Forms.ToolStripMenuItem(); this.mnu_preset_ipod235 = new System.Windows.Forms.ToolStripMenuItem(); this.mnu_appleTv = new System.Windows.Forms.ToolStripMenuItem(); + this.mnu_iphone = new System.Windows.Forms.ToolStripMenuItem(); this.mnu_presetPS3 = new System.Windows.Forms.ToolStripMenuItem(); + this.mnu_psp = new System.Windows.Forms.ToolStripMenuItem(); + this.mnu_qt = new System.Windows.Forms.ToolStripMenuItem(); + this.mnu_television = new System.Windows.Forms.ToolStripMenuItem(); + this.mnu_film = new System.Windows.Forms.ToolStripMenuItem(); + this.mnu_Classic = new System.Windows.Forms.ToolStripMenuItem(); + this.mnu_normal = new System.Windows.Forms.ToolStripMenuItem(); this.ToolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.mnu_ProgramDefaultOptions = new System.Windows.Forms.ToolStripMenuItem(); this.HelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -174,13 +181,6 @@ namespace Handbrake this.text_right = new System.Windows.Forms.TextBox(); this.text_left = new System.Windows.Forms.TextBox(); this.advancedOptions = new System.Windows.Forms.TabControl(); - this.mnu_psp = new System.Windows.Forms.ToolStripMenuItem(); - this.mnu_Classic = new System.Windows.Forms.ToolStripMenuItem(); - this.mnu_qt = new System.Windows.Forms.ToolStripMenuItem(); - this.mnu_television = new System.Windows.Forms.ToolStripMenuItem(); - this.mnu_film = new System.Windows.Forms.ToolStripMenuItem(); - this.mnu_iphone = new System.Windows.Forms.ToolStripMenuItem(); - this.mnu_normal = new System.Windows.Forms.ToolStripMenuItem(); Label38 = new System.Windows.Forms.Label(); this.frmMainMenu.SuspendLayout(); this.GroupBox1.SuspendLayout(); @@ -304,6 +304,7 @@ namespace Handbrake this.btn_Browse.Text = "Browse"; this.ToolTip.SetToolTip(this.btn_Browse, "Step 1 - Select a Source. This can be either a DVD or ts/mpg/iso file"); this.btn_Browse.UseVisualStyleBackColor = true; + this.btn_Browse.Click += new System.EventHandler(this.btn_Browse_Click); // // text_height // @@ -593,6 +594,12 @@ namespace Handbrake this.mnu_appleTv.Text = "Apple TV"; this.mnu_appleTv.Click += new System.EventHandler(this.mnu_appleTv_Click); // + // mnu_iphone + // + this.mnu_iphone.Name = "mnu_iphone"; + this.mnu_iphone.Size = new System.Drawing.Size(276, 22); + this.mnu_iphone.Text = "iPhone"; + // // mnu_presetPS3 // this.mnu_presetPS3.Name = "mnu_presetPS3"; @@ -600,6 +607,48 @@ namespace Handbrake this.mnu_presetPS3.Text = "PS3"; this.mnu_presetPS3.Click += new System.EventHandler(this.mnu_presetPS3_Click); // + // mnu_psp + // + this.mnu_psp.Name = "mnu_psp"; + this.mnu_psp.Size = new System.Drawing.Size(276, 22); + this.mnu_psp.Text = "PSP"; + this.mnu_psp.Click += new System.EventHandler(this.mnu_psp_Click); + // + // mnu_qt + // + this.mnu_qt.Name = "mnu_qt"; + this.mnu_qt.Size = new System.Drawing.Size(276, 22); + this.mnu_qt.Text = "Quicktime"; + this.mnu_qt.Click += new System.EventHandler(this.mnu_qt_Click); + // + // mnu_television + // + this.mnu_television.Name = "mnu_television"; + this.mnu_television.Size = new System.Drawing.Size(276, 22); + this.mnu_television.Text = "Television"; + this.mnu_television.Click += new System.EventHandler(this.mnu_television_Click); + // + // mnu_film + // + this.mnu_film.Name = "mnu_film"; + this.mnu_film.Size = new System.Drawing.Size(276, 22); + this.mnu_film.Text = "Film"; + this.mnu_film.Click += new System.EventHandler(this.mnu_film_Click); + // + // mnu_Classic + // + this.mnu_Classic.Name = "mnu_Classic"; + this.mnu_Classic.Size = new System.Drawing.Size(276, 22); + this.mnu_Classic.Text = "Classic"; + this.mnu_Classic.Click += new System.EventHandler(this.mnu_Classic_Click); + // + // mnu_normal + // + this.mnu_normal.Name = "mnu_normal"; + this.mnu_normal.Size = new System.Drawing.Size(276, 22); + this.mnu_normal.Text = "Normal"; + this.mnu_normal.Click += new System.EventHandler(this.mnu_normal_Click); + // // ToolStripSeparator4 // this.ToolStripSeparator4.Name = "ToolStripSeparator4"; @@ -1805,54 +1854,6 @@ namespace Handbrake this.advancedOptions.TabIndex = 411; this.advancedOptions.TabStop = false; // - // mnu_psp - // - this.mnu_psp.Name = "mnu_psp"; - this.mnu_psp.Size = new System.Drawing.Size(276, 22); - this.mnu_psp.Text = "PSP"; - this.mnu_psp.Click += new System.EventHandler(this.mnu_psp_Click); - // - // mnu_Classic - // - this.mnu_Classic.Name = "mnu_Classic"; - this.mnu_Classic.Size = new System.Drawing.Size(276, 22); - this.mnu_Classic.Text = "Classic"; - this.mnu_Classic.Click += new System.EventHandler(this.mnu_Classic_Click); - // - // mnu_qt - // - this.mnu_qt.Name = "mnu_qt"; - this.mnu_qt.Size = new System.Drawing.Size(276, 22); - this.mnu_qt.Text = "Quicktime"; - this.mnu_qt.Click += new System.EventHandler(this.mnu_qt_Click); - // - // mnu_television - // - this.mnu_television.Name = "mnu_television"; - this.mnu_television.Size = new System.Drawing.Size(276, 22); - this.mnu_television.Text = "Television"; - this.mnu_television.Click += new System.EventHandler(this.mnu_television_Click); - // - // mnu_film - // - this.mnu_film.Name = "mnu_film"; - this.mnu_film.Size = new System.Drawing.Size(276, 22); - this.mnu_film.Text = "Film"; - this.mnu_film.Click += new System.EventHandler(this.mnu_film_Click); - // - // mnu_iphone - // - this.mnu_iphone.Name = "mnu_iphone"; - this.mnu_iphone.Size = new System.Drawing.Size(276, 22); - this.mnu_iphone.Text = "iPhone"; - // - // mnu_normal - // - this.mnu_normal.Name = "mnu_normal"; - this.mnu_normal.Size = new System.Drawing.Size(276, 22); - this.mnu_normal.Text = "Normal"; - this.mnu_normal.Click += new System.EventHandler(this.mnu_normal_Click); - // // frmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index a46eb5892..9e7643a30 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -660,6 +660,45 @@ namespace Handbrake // -------------------------------------------------------------- #region Buttons + private void btn_Browse_Click(object sender, EventArgs e) + { + String filename =""; + text_source.Text = ""; + + if (RadioDVD.Checked) + { + DVD_Open.ShowDialog(); + filename = DVD_Open.SelectedPath; + if (filename != "") + { + Form frmRD = new frmReadDVD(filename, this, dvdInfoWindow); + text_source.Text = filename; + frmRD.ShowDialog(); + } + } + else + { + ISO_Open.ShowDialog(); + filename = ISO_Open.FileName; + if (filename != "") + { + Form frmRD = new frmReadDVD(filename, this, dvdInfoWindow); + text_source.Text = filename; + frmRD.ShowDialog(); + } + } + + // Check if there was titles in the dvd title dropdown + if (filename == "") + { + text_source.Text = "Click 'Browse' to continue"; + } + + 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) { @@ -1577,6 +1616,8 @@ namespace Handbrake #endregion + + // This is the END of the road ------------------------------------------------------------------------------ } diff --git a/win/C#/frmReadDVD.Designer.cs b/win/C#/frmReadDVD.Designer.cs index d26fa202d..7a95d28fd 100644 --- a/win/C#/frmReadDVD.Designer.cs +++ b/win/C#/frmReadDVD.Designer.cs @@ -146,6 +146,7 @@ namespace Handbrake this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Reading DVD..."; + this.TopMost = true; this.ResumeLayout(false); this.PerformLayout();