diff --git a/README b/README index 5b424141..edf7ff2a 100644 --- a/README +++ b/README @@ -93,6 +93,7 @@ Build on OSX: ============= Get the Mono Framework, Monodevelop, and MacPorts. + Install git-core, automake and intltool using 'port install'. Make sure that git or a symbolic link to git is in /usr/bin. diff --git a/SparkleShare/Mac/SparkleShare/SparkleLog.cs b/SparkleShare/Mac/SparkleShare/SparkleLog.cs index a0ad2d99..2de73e0e 100644 --- a/SparkleShare/Mac/SparkleShare/SparkleLog.cs +++ b/SparkleShare/Mac/SparkleShare/SparkleLog.cs @@ -152,4 +152,4 @@ namespace SparkleShare { } -} +} \ No newline at end of file diff --git a/SparkleShare/Mac/SparkleShare/SparkleStatusIcon.cs b/SparkleShare/Mac/SparkleShare/SparkleStatusIcon.cs index b1907cab..dde6fcb6 100644 --- a/SparkleShare/Mac/SparkleShare/SparkleStatusIcon.cs +++ b/SparkleShare/Mac/SparkleShare/SparkleStatusIcon.cs @@ -380,13 +380,14 @@ namespace SparkleShare { public override void MenuWillOpen (NSMenu menu) { - - Console.WriteLine ("OPENED"); - + InvokeOnMainThread (delegate { foreach (SparkleLog log in SparkleUI.OpenLogs) log.OrderFrontRegardless (); + + SparkleUI.NewEvents = 0; + NSApplication.SharedApplication.DockTile.BadgeLabel = null; }); diff --git a/SparkleShare/Mac/SparkleShare/SparkleUI.cs b/SparkleShare/Mac/SparkleShare/SparkleUI.cs index 68171528..0a452b91 100644 --- a/SparkleShare/Mac/SparkleShare/SparkleUI.cs +++ b/SparkleShare/Mac/SparkleShare/SparkleUI.cs @@ -36,9 +36,9 @@ namespace SparkleShare { public static SparkleStatusIcon StatusIcon; public static List OpenLogs; + public static int NewEvents; - public SparkleUI () { @@ -49,9 +49,22 @@ namespace SparkleShare { OpenLogs = new List (); StatusIcon = new SparkleStatusIcon (); + + NewEvents = 0; + + SparkleShare.Controller.NotificationRaised += delegate { + + InvokeOnMainThread (delegate { + + NewEvents++; + NSApplication.SharedApplication.DockTile.BadgeLabel = NewEvents.ToString (); + + }); + + }; } - + public void Run () {