OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 10 Apr 2009 14:27:27 +0000 (14:27 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 10 Apr 2009 14:27:27 +0000 (14:27 +0000)
- Added option to set verbosity level. default 1

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

win/C#/Properties/Settings.Designer.cs
win/C#/Properties/Settings.settings
win/C#/app.config
win/C#/frmMain/QueryGenerator.cs
win/C#/frmOptions.Designer.cs
win/C#/frmOptions.cs

index 5433976..de9c106 100644 (file)
@@ -322,5 +322,17 @@ namespace Handbrake.Properties {
                 this["x264cqstep"] = value;\r
             }\r
         }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("1")]\r
+        public int verboseLevel {\r
+            get {\r
+                return ((int)(this["verboseLevel"]));\r
+            }\r
+            set {\r
+                this["verboseLevel"] = value;\r
+            }\r
+        }\r
     }\r
 }\r
index 4af4a74..a74478c 100644 (file)
@@ -77,5 +77,8 @@
     <Setting Name="x264cqstep" Type="System.String" Scope="User">\r
       <Value Profile="(Default)">0.25</Value>\r
     </Setting>\r
+    <Setting Name="verboseLevel" Type="System.Int32" Scope="User">\r
+      <Value Profile="(Default)">1</Value>\r
+    </Setting>\r
   </Settings>\r
 </SettingsFile>
\ No newline at end of file
index ef5c4ad..1e16655 100644 (file)
@@ -82,6 +82,9 @@
             <setting name="x264cqstep" serializeAs="String">\r
                 <value>0.25</value>\r
             </setting>\r
+            <setting name="verboseLevel" serializeAs="String">\r
+                <value>1</value>\r
+            </setting>\r
         </Handbrake.Properties.Settings>\r
     </userSettings>\r
 <startup><supportedRuntime version="v2.0.50727"/></startup></configuration>\r
index 16c7fe4..96f2cda 100644 (file)
@@ -427,7 +427,7 @@ namespace Handbrake
             if (processors != "Automatic")\r
                 query += " -C " + processors + " ";\r
 \r
-            query += " -v ";\r
+            query += " -v " + Properties.Settings.Default.verboseLevel;\r
             #endregion\r
 \r
             return query;\r
index fce6af7..b112b86 100644 (file)
@@ -114,6 +114,8 @@ namespace Handbrake
             this.label26 = new System.Windows.Forms.Label();\r
             this.label27 = new System.Windows.Forms.Label();\r
             this.openFile_vlc = new System.Windows.Forms.OpenFileDialog();\r
+            this.cb_logVerboseLvl = new System.Windows.Forms.ComboBox();\r
+            this.label3 = new System.Windows.Forms.Label();\r
             this.tab_options.SuspendLayout();\r
             this.tab_general.SuspendLayout();\r
             this.tab_picture.SuspendLayout();\r
@@ -128,7 +130,7 @@ namespace Handbrake
             this.btn_close.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
             this.btn_close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.btn_close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_close.Location = new System.Drawing.Point(430, 346);\r
+            this.btn_close.Location = new System.Drawing.Point(430, 366);\r
             this.btn_close.Name = "btn_close";\r
             this.btn_close.Size = new System.Drawing.Size(72, 22);\r
             this.btn_close.TabIndex = 53;\r
@@ -165,7 +167,7 @@ namespace Handbrake
             this.tab_options.Location = new System.Drawing.Point(12, 55);\r
             this.tab_options.Name = "tab_options";\r
             this.tab_options.SelectedIndex = 0;\r
-            this.tab_options.Size = new System.Drawing.Size(490, 285);\r
+            this.tab_options.Size = new System.Drawing.Size(490, 305);\r
             this.tab_options.TabIndex = 58;\r
             // \r
             // tab_general\r
@@ -186,7 +188,7 @@ namespace Handbrake
             this.tab_general.Controls.Add(this.drp_completeOption);\r
             this.tab_general.Location = new System.Drawing.Point(4, 22);\r
             this.tab_general.Name = "tab_general";\r
-            this.tab_general.Size = new System.Drawing.Size(482, 259);\r
+            this.tab_general.Size = new System.Drawing.Size(482, 279);\r
             this.tab_general.TabIndex = 3;\r
             this.tab_general.Text = "General";\r
             this.tab_general.UseVisualStyleBackColor = true;\r
@@ -348,7 +350,7 @@ namespace Handbrake
             this.tab_picture.Controls.Add(this.label29);\r
             this.tab_picture.Location = new System.Drawing.Point(4, 22);\r
             this.tab_picture.Name = "tab_picture";\r
-            this.tab_picture.Size = new System.Drawing.Size(482, 259);\r
+            this.tab_picture.Size = new System.Drawing.Size(482, 279);\r
             this.tab_picture.TabIndex = 5;\r
             this.tab_picture.Text = "Picture";\r
             this.tab_picture.UseVisualStyleBackColor = true;\r
@@ -372,7 +374,8 @@ namespace Handbrake
             this.txt_vlcPath.Name = "txt_vlcPath";\r
             this.txt_vlcPath.Size = new System.Drawing.Size(294, 21);\r
             this.txt_vlcPath.TabIndex = 81;\r
-            this.ToolTip.SetToolTip(this.txt_vlcPath, "The default location where auto named files are stored.");\r
+            this.ToolTip.SetToolTip(this.txt_vlcPath, "The path where VLC is installed on this system.\r\nThis is used for the video previ" +\r
+                    "ew feature.");\r
             this.txt_vlcPath.TextChanged += new System.EventHandler(this.txt_vlcPath_TextChanged);\r
             // \r
             // label29\r
@@ -387,6 +390,8 @@ namespace Handbrake
             // \r
             // tab_cli\r
             // \r
+            this.tab_cli.Controls.Add(this.cb_logVerboseLvl);\r
+            this.tab_cli.Controls.Add(this.label3);\r
             this.tab_cli.Controls.Add(this.label15);\r
             this.tab_cli.Controls.Add(this.check_saveLogWithVideo);\r
             this.tab_cli.Controls.Add(this.btn_saveLog);\r
@@ -402,7 +407,7 @@ namespace Handbrake
             this.tab_cli.Controls.Add(this.Label4);\r
             this.tab_cli.Location = new System.Drawing.Point(4, 22);\r
             this.tab_cli.Name = "tab_cli";\r
-            this.tab_cli.Size = new System.Drawing.Size(482, 259);\r
+            this.tab_cli.Size = new System.Drawing.Size(482, 279);\r
             this.tab_cli.TabIndex = 2;\r
             this.tab_cli.Text = "CLI";\r
             this.tab_cli.UseVisualStyleBackColor = true;\r
@@ -411,7 +416,7 @@ namespace Handbrake
             // \r
             this.label15.AutoSize = true;\r
             this.label15.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label15.Location = new System.Drawing.Point(195, 197);\r
+            this.label15.Location = new System.Drawing.Point(195, 214);\r
             this.label15.Name = "label15";\r
             this.label15.Size = new System.Drawing.Size(24, 13);\r
             this.label15.TabIndex = 84;\r
@@ -421,7 +426,7 @@ namespace Handbrake
             // \r
             this.check_saveLogWithVideo.AutoSize = true;\r
             this.check_saveLogWithVideo.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_saveLogWithVideo.Location = new System.Drawing.Point(71, 177);\r
+            this.check_saveLogWithVideo.Location = new System.Drawing.Point(71, 194);\r
             this.check_saveLogWithVideo.Name = "check_saveLogWithVideo";\r
             this.check_saveLogWithVideo.Size = new System.Drawing.Size(349, 17);\r
             this.check_saveLogWithVideo.TabIndex = 83;\r
@@ -435,7 +440,7 @@ namespace Handbrake
             this.btn_saveLog.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
             this.btn_saveLog.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.btn_saveLog.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
-            this.btn_saveLog.Location = new System.Drawing.Point(343, 218);\r
+            this.btn_saveLog.Location = new System.Drawing.Point(343, 235);\r
             this.btn_saveLog.Name = "btn_saveLog";\r
             this.btn_saveLog.Size = new System.Drawing.Size(68, 22);\r
             this.btn_saveLog.TabIndex = 82;\r
@@ -447,7 +452,7 @@ namespace Handbrake
             // \r
             this.label14.AutoSize = true;\r
             this.label14.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label14.Location = new System.Drawing.Point(68, 221);\r
+            this.label14.Location = new System.Drawing.Point(68, 238);\r
             this.label14.Name = "label14";\r
             this.label14.Size = new System.Drawing.Size(61, 13);\r
             this.label14.TabIndex = 81;\r
@@ -455,7 +460,7 @@ namespace Handbrake
             // \r
             // text_logPath\r
             // \r
-            this.text_logPath.Location = new System.Drawing.Point(135, 218);\r
+            this.text_logPath.Location = new System.Drawing.Point(135, 235);\r
             this.text_logPath.Name = "text_logPath";\r
             this.text_logPath.Size = new System.Drawing.Size(202, 21);\r
             this.text_logPath.TabIndex = 80;\r
@@ -466,7 +471,7 @@ namespace Handbrake
             // \r
             this.check_keepLogs.AutoSize = true;\r
             this.check_keepLogs.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.check_keepLogs.Location = new System.Drawing.Point(71, 135);\r
+            this.check_keepLogs.Location = new System.Drawing.Point(71, 171);\r
             this.check_keepLogs.Name = "check_keepLogs";\r
             this.check_keepLogs.Size = new System.Drawing.Size(185, 17);\r
             this.check_keepLogs.TabIndex = 79;\r
@@ -520,7 +525,7 @@ namespace Handbrake
             "Normal",\r
             "Below Normal",\r
             "Low"});\r
-            this.drp_Priority.Location = new System.Drawing.Point(177, 72);\r
+            this.drp_Priority.Location = new System.Drawing.Point(198, 75);\r
             this.drp_Priority.Name = "drp_Priority";\r
             this.drp_Priority.Size = new System.Drawing.Size(111, 21);\r
             this.drp_Priority.TabIndex = 43;\r
@@ -554,7 +559,7 @@ namespace Handbrake
             "6",\r
             "7",\r
             "8"});\r
-            this.drp_processors.Location = new System.Drawing.Point(177, 45);\r
+            this.drp_processors.Location = new System.Drawing.Point(198, 48);\r
             this.drp_processors.Name = "drp_processors";\r
             this.drp_processors.Size = new System.Drawing.Size(111, 21);\r
             this.drp_processors.TabIndex = 41;\r
@@ -587,7 +592,7 @@ namespace Handbrake
             this.tab_advanced.Location = new System.Drawing.Point(4, 22);\r
             this.tab_advanced.Name = "tab_advanced";\r
             this.tab_advanced.Padding = new System.Windows.Forms.Padding(3);\r
-            this.tab_advanced.Size = new System.Drawing.Size(482, 259);\r
+            this.tab_advanced.Size = new System.Drawing.Size(482, 279);\r
             this.tab_advanced.TabIndex = 4;\r
             this.tab_advanced.Text = "Advanced / Other";\r
             this.tab_advanced.UseVisualStyleBackColor = true;\r
@@ -1064,9 +1069,36 @@ namespace Handbrake
             this.openFile_vlc.DefaultExt = "exe";\r
             this.openFile_vlc.Filter = "exe|*.exe";\r
             // \r
+            // cb_logVerboseLvl\r
+            // \r
+            this.cb_logVerboseLvl.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.cb_logVerboseLvl.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.cb_logVerboseLvl.FormattingEnabled = true;\r
+            this.cb_logVerboseLvl.Items.AddRange(new object[] {\r
+            "0",\r
+            "1",\r
+            "2"});\r
+            this.cb_logVerboseLvl.Location = new System.Drawing.Point(198, 133);\r
+            this.cb_logVerboseLvl.Name = "cb_logVerboseLvl";\r
+            this.cb_logVerboseLvl.Size = new System.Drawing.Size(111, 21);\r
+            this.cb_logVerboseLvl.TabIndex = 86;\r
+            this.ToolTip.SetToolTip(this.cb_logVerboseLvl, "Activity Log Verbosity Level");\r
+            this.cb_logVerboseLvl.SelectedIndexChanged += new System.EventHandler(this.cb_logVerboseLvl_SelectedIndexChanged);\r
+            // \r
+            // label3\r
+            // \r
+            this.label3.AutoSize = true;\r
+            this.label3.BackColor = System.Drawing.Color.Transparent;\r
+            this.label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label3.Location = new System.Drawing.Point(68, 136);\r
+            this.label3.Name = "label3";\r
+            this.label3.Size = new System.Drawing.Size(124, 13);\r
+            this.label3.TabIndex = 85;\r
+            this.label3.Text = "Log Verbosity Level:";\r
+            // \r
             // frmOptions\r
             // \r
-            this.ClientSize = new System.Drawing.Size(514, 375);\r
+            this.ClientSize = new System.Drawing.Size(514, 396);\r
             this.Controls.Add(this.label8);\r
             this.Controls.Add(this.pictureBox2);\r
             this.Controls.Add(this.tab_options);\r
@@ -1174,5 +1206,7 @@ namespace Handbrake
         private System.Windows.Forms.Label label30;\r
         internal System.Windows.Forms.ComboBox drop_x264step;\r
         private System.Windows.Forms.Label label28;\r
+        internal System.Windows.Forms.ComboBox cb_logVerboseLvl;\r
+        internal System.Windows.Forms.Label label3;\r
     }\r
 }
\ No newline at end of file
index 3f78175..bbea71f 100644 (file)
@@ -73,6 +73,9 @@ namespace Handbrake
             // Priority level for encodes\r
             drp_Priority.Text = Properties.Settings.Default.processPriority;\r
 \r
+            // Log Verbosity Level\r
+            cb_logVerboseLvl.SelectedIndex = Properties.Settings.Default.verboseLevel;\r
+\r
             // Save individual log files\r
             if (Properties.Settings.Default.saveLog == "Checked")\r
                 check_keepLogs.CheckState = CheckState.Checked;\r
@@ -191,6 +194,11 @@ namespace Handbrake
             Properties.Settings.Default.processPriority = drp_Priority.Text;\r
         }\r
 \r
+        private void cb_logVerboseLvl_SelectedIndexChanged(object sender, EventArgs e)\r
+        {\r
+            Properties.Settings.Default.verboseLevel = cb_logVerboseLvl.SelectedIndex;\r
+        }\r
+\r
         private void check_keepLogs_CheckedChanged(object sender, EventArgs e)\r
         {\r
             Properties.Settings.Default.saveLog = check_keepLogs.CheckState.ToString();\r
@@ -252,8 +260,6 @@ namespace Handbrake
         {\r
             Properties.Settings.Default.Save(); // Small hack for Vista. Seems to work fine on XP without this\r
             this.Close();\r
-        }\r
-\r
-        \r
+        }        \r
     }\r
 }
\ No newline at end of file