statusicon mac: only enable Show Recent Events when there are folders
This commit is contained in:
parent
3f6a28f3e6
commit
a7eef99be2
|
@ -239,17 +239,19 @@ namespace SparkleShare {
|
|||
Title = "Show Recent Events"
|
||||
};
|
||||
|
||||
RecentEventsMenuItem.Activated +=delegate {
|
||||
InvokeOnMainThread (delegate {
|
||||
NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
|
||||
|
||||
if (SparkleUI.EventLog == null)
|
||||
SparkleUI.EventLog = new SparkleEventLog ();
|
||||
|
||||
SparkleUI.EventLog.OrderFrontRegardless ();
|
||||
SparkleUI.EventLog.MakeKeyAndOrderFront (this);
|
||||
});
|
||||
};
|
||||
if (SparkleShare.Controller.Folders.Count > 0) {
|
||||
RecentEventsMenuItem.Activated +=delegate {
|
||||
InvokeOnMainThread (delegate {
|
||||
NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
|
||||
|
||||
if (SparkleUI.EventLog == null)
|
||||
SparkleUI.EventLog = new SparkleEventLog ();
|
||||
|
||||
SparkleUI.EventLog.OrderFrontRegardless ();
|
||||
SparkleUI.EventLog.MakeKeyAndOrderFront (this);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Menu.AddItem (RecentEventsMenuItem);
|
||||
|
||||
|
|
Loading…
Reference in a new issue