From b8e0155f25d888a3466c1f43894de20f9c82514f Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sat, 17 Mar 2012 21:51:00 +0000 Subject: [PATCH] Revert "mac statusicon: sync with Windows menu. Closes #640" This reverts commit 8d67a0183c831f2a09b623c0eaf742db41ed8c1f. --- SparkleShare/Mac/SparkleStatusIcon.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/SparkleShare/Mac/SparkleStatusIcon.cs b/SparkleShare/Mac/SparkleStatusIcon.cs index 6e1284b5..9d7ccba6 100755 --- a/SparkleShare/Mac/SparkleStatusIcon.cs +++ b/SparkleShare/Mac/SparkleStatusIcon.cs @@ -253,6 +253,7 @@ namespace SparkleShare { Menu.AddItem (SyncMenuItem); + Menu.AddItem (NSMenuItem.SeparatorItem); RecentEventsMenuItem = new NSMenuItem () { Title = "View Recent Changes…", @@ -266,21 +267,25 @@ namespace SparkleShare { } Menu.AddItem (RecentEventsMenuItem); - Menu.AddItem (NSMenuItem.SeparatorItem); NotificationsMenuItem = new NSMenuItem () { - Enabled = true, - Title = "Notifications" + Enabled = true }; if (Program.Controller.NotificationsEnabled) - NotificationsMenuItem.State = NSCellStateValue.On; + NotificationsMenuItem.Title = "Turn Notifications Off"; else - NotificationsMenuItem.State = NSCellStateValue.Off; + NotificationsMenuItem.Title = "Turn Notifications On"; NotificationsMenuItem.Activated += delegate { Program.Controller.ToggleNotifications (); - CreateMenu (); + + InvokeOnMainThread (delegate { + if (Program.Controller.NotificationsEnabled) + NotificationsMenuItem.Title = "Turn Notifications Off"; + else + NotificationsMenuItem.Title = "Turn Notifications On"; + }); }; Menu.AddItem (NotificationsMenuItem);