From: Latif Khalifa Date: Mon, 4 Mar 2013 16:47:38 +0000 (+0100) Subject: RAD-322 RAD-409: Add ability to show/hide script errors in the main chat console X-Git-Tag: 2.10~15 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=7744ac3d6f837a0e733dfdcfd4d51a1def79aaef;p=radegast%2Fradegast.git RAD-322 RAD-409: Add ability to show/hide script errors in the main chat console --- diff --git a/Radegast/Core/ChatTextManager.cs b/Radegast/Core/ChatTextManager.cs index 72898a9..87809e3 100644 --- a/Radegast/Core/ChatTextManager.cs +++ b/Radegast/Core/ChatTextManager.cs @@ -238,6 +238,12 @@ namespace Radegast null != client.Self.MuteList.Find(me => me.Type == MuteType.Resident && me.ID == e.SourceID) ) return; + // Check if it's script debug + if (e.Type == ChatType.Debug && !instance.GlobalSettings["show_script_errors"]) + { + return; + } + // Check if sender object is muted if (e.SourceType == ChatSourceType.Object && null != client.Self.MuteList.Find(me => @@ -317,6 +323,10 @@ namespace Radegast { item.Style = ChatBufferTextStyle.OwnerSay; } + else if (e.Type == ChatType.Debug) + { + item.Style = ChatBufferTextStyle.Error; + } else { item.Style = ChatBufferTextStyle.ObjectChat; diff --git a/Radegast/GUI/Dialogs/Settings.Designer.cs b/Radegast/GUI/Dialogs/Settings.Designer.cs index f01f44a..831637f 100644 --- a/Radegast/GUI/Dialogs/Settings.Designer.cs +++ b/Radegast/GUI/Dialogs/Settings.Designer.cs @@ -128,6 +128,7 @@ namespace Radegast this.autoSitUUID = new System.Windows.Forms.TextBox(); this.autoSitName = new System.Windows.Forms.TextBox(); this.autoSitNameLabel = new System.Windows.Forms.Label(); + this.cbShowScriptErrors = new System.Windows.Forms.CheckBox(); this.tcGraphics.SuspendLayout(); this.tbpGeneral.SuspendLayout(); this.cbHighLight.SuspendLayout(); @@ -239,6 +240,7 @@ namespace Radegast // // cbMisc // + this.cbMisc.Controls.Add(this.cbShowScriptErrors); this.cbMisc.Controls.Add(this.cbDisableHTTPInventory); this.cbMisc.Controls.Add(this.cbHideLoginGraphics); this.cbMisc.Controls.Add(this.cbDisableLookAt); @@ -934,6 +936,16 @@ namespace Radegast this.autoSitNameLabel.Text = "Name"; this.autoSitNameLabel.Click += new System.EventHandler(this.autoSitNameLabel_Click); // + // cbShowScriptErrors + // + this.cbShowScriptErrors.AutoSize = true; + this.cbShowScriptErrors.Location = new System.Drawing.Point(6, 280); + this.cbShowScriptErrors.Name = "cbShowScriptErrors"; + this.cbShowScriptErrors.Size = new System.Drawing.Size(110, 17); + this.cbShowScriptErrors.TabIndex = 17; + this.cbShowScriptErrors.Text = "Show Script Erros"; + this.cbShowScriptErrors.UseVisualStyleBackColor = true; + // // frmSettings // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1041,6 +1053,7 @@ namespace Radegast public System.Windows.Forms.Label lblLSLUUID; public System.Windows.Forms.TextBox tbLSLAllowedOwner; private System.Windows.Forms.Label label3; + public System.Windows.Forms.CheckBox cbShowScriptErrors; } diff --git a/Radegast/GUI/Dialogs/Settings.cs b/Radegast/GUI/Dialogs/Settings.cs index e7587c0..2d8fde4 100644 --- a/Radegast/GUI/Dialogs/Settings.cs +++ b/Radegast/GUI/Dialogs/Settings.cs @@ -309,6 +309,11 @@ namespace Radegast s["disable_http_inventory"] = cbDisableHTTPInventory.Checked; }; + cbShowScriptErrors.Checked = s["show_script_errors"]; + cbShowScriptErrors.CheckedChanged += (sender, e) => + { + s["show_script_errors"] = cbShowScriptErrors.Checked; + }; autoSitPrefsUpdate(); pseudoHomePrefsUpdated();