OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 2 Apr 2010 15:17:04 +0000 (15:17 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 2 Apr 2010 15:17:04 +0000 (15:17 +0000)
- Fix an issue with the Chapters tab where it wouldn't always enable the tab when the source had chapters

git-svn-id: svn://localhost/HandBrake/trunk@3183 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/frmMain.Designer.cs
win/C#/frmMain.cs

index 1d55629..445498c 100644 (file)
@@ -90,7 +90,6 @@ namespace Handbrake
             this.mnu_SelectDefault = new System.Windows.Forms.ToolStripMenuItem();\r
             this.HelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
             this.mnu_user_guide = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.mnu_handbrake_home = new System.Windows.Forms.ToolStripMenuItem();\r
             this.ToolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();\r
             this.mnu_UpdateCheck = new System.Windows.Forms.ToolStripMenuItem();\r
             this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();\r
@@ -696,7 +695,6 @@ namespace Handbrake
             // \r
             this.HelpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
             this.mnu_user_guide,\r
-            this.mnu_handbrake_home,\r
             this.ToolStripSeparator3,\r
             this.mnu_UpdateCheck,\r
             this.toolStripSeparator6,\r
@@ -709,40 +707,32 @@ namespace Handbrake
             // \r
             this.mnu_user_guide.Image = global::Handbrake.Properties.Resources.Help16;\r
             this.mnu_user_guide.Name = "mnu_user_guide";\r
-            this.mnu_user_guide.Size = new System.Drawing.Size(194, 22);\r
+            this.mnu_user_guide.Size = new System.Drawing.Size(192, 22);\r
             this.mnu_user_guide.Text = "HandBrake User Guide";\r
             this.mnu_user_guide.Click += new System.EventHandler(this.mnu_user_guide_Click);\r
             // \r
-            // mnu_handbrake_home\r
-            // \r
-            this.mnu_handbrake_home.Image = global::Handbrake.Properties.Resources.info16;\r
-            this.mnu_handbrake_home.Name = "mnu_handbrake_home";\r
-            this.mnu_handbrake_home.Size = new System.Drawing.Size(194, 22);\r
-            this.mnu_handbrake_home.Text = "HandBrake Homepage";\r
-            this.mnu_handbrake_home.Click += new System.EventHandler(this.mnu_handbrake_home_Click);\r
-            // \r
             // ToolStripSeparator3\r
             // \r
             this.ToolStripSeparator3.Name = "ToolStripSeparator3";\r
-            this.ToolStripSeparator3.Size = new System.Drawing.Size(191, 6);\r
+            this.ToolStripSeparator3.Size = new System.Drawing.Size(189, 6);\r
             // \r
             // mnu_UpdateCheck\r
             // \r
             this.mnu_UpdateCheck.Name = "mnu_UpdateCheck";\r
-            this.mnu_UpdateCheck.Size = new System.Drawing.Size(194, 22);\r
+            this.mnu_UpdateCheck.Size = new System.Drawing.Size(192, 22);\r
             this.mnu_UpdateCheck.Text = "Check for Updates";\r
             this.mnu_UpdateCheck.Click += new System.EventHandler(this.mnu_UpdateCheck_Click);\r
             // \r
             // toolStripSeparator6\r
             // \r
             this.toolStripSeparator6.Name = "toolStripSeparator6";\r
-            this.toolStripSeparator6.Size = new System.Drawing.Size(191, 6);\r
+            this.toolStripSeparator6.Size = new System.Drawing.Size(189, 6);\r
             // \r
             // mnu_about\r
             // \r
             this.mnu_about.Image = global::Handbrake.Properties.Resources.hb16;\r
             this.mnu_about.Name = "mnu_about";\r
-            this.mnu_about.Size = new System.Drawing.Size(194, 22);\r
+            this.mnu_about.Size = new System.Drawing.Size(192, 22);\r
             this.mnu_about.Text = "About...";\r
             this.mnu_about.Click += new System.EventHandler(this.mnu_about_Click);\r
             // \r
@@ -1760,7 +1750,6 @@ namespace Handbrake
         private System.Windows.Forms.ToolStripButton btn_showQueue;\r
         private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;\r
         private System.Windows.Forms.ToolStripButton btn_ActivityWindow;\r
-        private System.Windows.Forms.ToolStripMenuItem mnu_handbrake_home;\r
         internal System.Windows.Forms.Button btn_removePreset;\r
         internal System.Windows.Forms.Button btn_addPreset;\r
         internal System.Windows.Forms.Label label25;\r
index 1fb52db..5f8cd4e 100644 (file)
@@ -1736,8 +1736,10 @@ namespace Handbrake
                     drp_dvdtitle.SelectedItem = Main.SelectLongestTitle(currentSource);\r
 \r
                 // Enable the creation of chapter markers if the file is an image of a dvd.\r
-                if (sourcePath.ToLower().Contains(".iso") || sourcePath.Contains("VIDEO_TS") ||\r
-                    Directory.Exists(Path.Combine(sourcePath, "VIDEO_TS")))\r
+                int start, end;\r
+                int.TryParse(drop_chapterStart.Items[0].ToString(), out start);\r
+                int.TryParse(drop_chapterFinish.Items[drop_chapterFinish.Items.Count -1].ToString(), out end);\r
+                if (end > start)\r
                     Check_ChapterMarkers.Enabled = true;\r
                 else\r
                 {\r