statusicon: disable Open Recent Events item when there are no projects

This commit is contained in:
Hylke Bons 2011-12-18 17:08:38 +01:00
parent 15c44e8925
commit 99c148883e
2 changed files with 3 additions and 4 deletions

View file

@ -242,7 +242,7 @@ namespace SparkleShare {
RecentEventsMenuItem = new NSMenuItem () {
Title = "Open Recent Events",
Enabled = true
Enabled = (Controller.Folders.Length > 0)
};
if (Controller.Folders.Length > 0) {

View file

@ -261,9 +261,8 @@ namespace SparkleShare {
Menu.Add (new SeparatorMenuItem ());
MenuItem recent_events_item = new MenuItem (_("Open Recent Events"));
if (Program.Controller.Folders.Count < 1)
recent_events_item.Sensitive = false;
recent_events_item.Sensitive = (Controller.Folders.Length > 0);
recent_events_item.Activated += delegate {
Application.Invoke (delegate {