From: Latif Khalifa Date: Sun, 14 Aug 2011 00:24:14 +0000 (+0000) Subject: Added an option to control taskbar highlighting on incoming messages. X-Git-Tag: 2.8~282 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ac6cad65732da98a178801bcea9ac206c419380d;p=radegast%2Fradegast.git Added an option to control taskbar highlighting on incoming messages. Requested by Dahlia :) git-svn-id: https://radegast.googlecode.com/svn/trunk@1090 f7a694da-4d33-11de-9ad6-1127a62b9fcd --- diff --git a/Radegast/Core/Tabs/RadegastTab.cs b/Radegast/Core/Tabs/RadegastTab.cs index a12ee05..7eea96f 100644 --- a/Radegast/Core/Tabs/RadegastTab.cs +++ b/Radegast/Core/Tabs/RadegastTab.cs @@ -179,8 +179,10 @@ namespace Radegast public void Highlight() { if (selected) return; - FormFlash.StartFlash(control.FindForm()); - + if (instance.GlobalSettings["taskbar_highlight"]) + { + FormFlash.StartFlash(control.FindForm()); + } if (!detached) { button.Image = Properties.Resources.arrow_forward_16; diff --git a/Radegast/GUI/Dialogs/Settings.Designer.cs b/Radegast/GUI/Dialogs/Settings.Designer.cs index 1c26270..55cb923 100644 --- a/Radegast/GUI/Dialogs/Settings.Designer.cs +++ b/Radegast/GUI/Dialogs/Settings.Designer.cs @@ -89,6 +89,7 @@ namespace Radegast this.rbAutoAlways = new System.Windows.Forms.RadioButton(); this.rbAutoNonFriend = new System.Windows.Forms.RadioButton(); this.rbAutobusy = new System.Windows.Forms.RadioButton(); + this.cbTaskBarHighLight = new System.Windows.Forms.CheckBox(); this.tabControl1.SuspendLayout(); this.tbpGeneral.SuspendLayout(); this.gbDisplayNames.SuspendLayout(); @@ -113,6 +114,7 @@ namespace Radegast this.tbpGeneral.Controls.Add(this.txtReconnectTime); this.tbpGeneral.Controls.Add(this.label2); this.tbpGeneral.Controls.Add(this.gbDisplayNames); + this.tbpGeneral.Controls.Add(this.cbTaskBarHighLight); this.tbpGeneral.Controls.Add(this.cbSyntaxHighlight); this.tbpGeneral.Controls.Add(this.label1); this.tbpGeneral.Controls.Add(this.cbFontSize); @@ -453,6 +455,16 @@ namespace Radegast this.rbAutobusy.UseVisualStyleBackColor = true; this.rbAutobusy.CheckedChanged += new System.EventHandler(this.rbAutobusy_CheckedChanged); // + // cbTaskBarHighLight + // + this.cbTaskBarHighLight.AutoSize = true; + this.cbTaskBarHighLight.Location = new System.Drawing.Point(270, 212); + this.cbTaskBarHighLight.Name = "cbTaskBarHighLight"; + this.cbTaskBarHighLight.Size = new System.Drawing.Size(155, 17); + this.cbTaskBarHighLight.TabIndex = 17; + this.cbTaskBarHighLight.Text = "Highlight in taskbar on chat"; + this.cbTaskBarHighLight.UseVisualStyleBackColor = true; + // // frmSettings // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -507,6 +519,7 @@ namespace Radegast public System.Windows.Forms.RadioButton rbDNDandUsernme; public System.Windows.Forms.RadioButton rbDNSmart; public System.Windows.Forms.RadioButton rbDNOff; + public System.Windows.Forms.CheckBox cbTaskBarHighLight; } diff --git a/Radegast/GUI/Dialogs/Settings.cs b/Radegast/GUI/Dialogs/Settings.cs index 86afe35..de2bfc4 100644 --- a/Radegast/GUI/Dialogs/Settings.cs +++ b/Radegast/GUI/Dialogs/Settings.cs @@ -105,6 +105,8 @@ namespace Radegast if (!s.ContainsKey("scene_window_docked")) s["scene_window_docked"] = true; + if (!s.ContainsKey("taskbar_highlight")) s["taskbar_highlight"] = true; + } public frmSettings(RadegastInstance instance) @@ -204,6 +206,12 @@ namespace Radegast } txtReconnectTime.Text = s["reconnect_time"].AsInteger().ToString(); + + cbTaskBarHighLight.Checked = s["taskbar_highlight"]; + cbTaskBarHighLight.CheckedChanged += (sender, e) => + { + s["taskbar_highlight"] = cbTaskBarHighLight.Checked; + }; } void cbHideLoginGraphics_CheckedChanged(object sender, EventArgs e)