OSDN Git Service

Added an option to control taskbar highlighting on incoming messages.
authorLatif Khalifa <latifer@streamgrid.net>
Sun, 14 Aug 2011 00:24:14 +0000 (00:24 +0000)
committerLatif Khalifa <latifer@streamgrid.net>
Sun, 14 Aug 2011 00:24:14 +0000 (00:24 +0000)
Requested by Dahlia :)

git-svn-id: https://radegast.googlecode.com/svn/trunk@1090 f7a694da-4d33-11de-9ad6-1127a62b9fcd

Radegast/Core/Tabs/RadegastTab.cs
Radegast/GUI/Dialogs/Settings.Designer.cs
Radegast/GUI/Dialogs/Settings.cs

index a12ee05..7eea96f 100644 (file)
@@ -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;
index 1c26270..55cb923 100644 (file)
@@ -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;
 
 
     }
index 86afe35..de2bfc4 100644 (file)
@@ -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)