From f61456b4c9da125b586d7a401b6695132c3bc63e Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Tue, 8 Feb 2011 02:55:13 +0000 Subject: [PATCH] [ui] remove badge from dock icon when application regains focus --- SparkleShare/Mac/SparkleShare/SparkleUI.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/SparkleShare/Mac/SparkleShare/SparkleUI.cs b/SparkleShare/Mac/SparkleShare/SparkleUI.cs index 0e906321..5efaf3a2 100644 --- a/SparkleShare/Mac/SparkleShare/SparkleUI.cs +++ b/SparkleShare/Mac/SparkleShare/SparkleUI.cs @@ -28,7 +28,15 @@ using MonoMac.WebKit; namespace SparkleShare { public partial class AppDelegate : NSApplicationDelegate { - // Workaround to be able to work with SparkleUI as the main class + + public override void WillBecomeActive (NSNotification notification) + { + + SparkleUI.NewEvents = 0; + NSApplication.SharedApplication.DockTile.BadgeLabel = null; + + } + } @@ -42,7 +50,7 @@ namespace SparkleShare { public SparkleUI () { - + NSApplication.Init (); SetSparkleIcon ();