[statusicon] Make notification toggling the same as on Mac
This commit is contained in:
parent
49e2ab6e86
commit
e7b7e551dc
|
@ -191,7 +191,7 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opens the wizard to add a new remote folder
|
// Opens the wizard to add a new remote folder
|
||||||
MenuItem sync_item = new MenuItem (_("Sync Remote Folder…"));
|
MenuItem sync_item = new MenuItem (_("Add Remote Folder…"));
|
||||||
|
|
||||||
if (SparkleShare.Controller.FirstRun)
|
if (SparkleShare.Controller.FirstRun)
|
||||||
sync_item.Sensitive = false;
|
sync_item.Sensitive = false;
|
||||||
|
@ -208,14 +208,18 @@ namespace SparkleShare {
|
||||||
Menu.Add (sync_item);
|
Menu.Add (sync_item);
|
||||||
Menu.Add (new SeparatorMenuItem ());
|
Menu.Add (new SeparatorMenuItem ());
|
||||||
|
|
||||||
// A checkbutton to toggle whether or not to show notifications
|
MenuItem notify_item;
|
||||||
CheckMenuItem notify_item = new CheckMenuItem (_("Show Notifications"));
|
|
||||||
|
|
||||||
if (SparkleShare.Controller.NotificationsEnabled)
|
if (SparkleShare.Controller.NotificationsEnabled)
|
||||||
notify_item.Active = true;
|
notify_item = new MenuItem (_("Turn Notifications Off"));
|
||||||
|
else
|
||||||
|
notify_item = new MenuItem (_("Turn Notifications On"));
|
||||||
|
|
||||||
|
notify_item.Activated += delegate {
|
||||||
|
|
||||||
notify_item.Toggled += delegate {
|
|
||||||
SparkleShare.Controller.ToggleNotifications ();
|
SparkleShare.Controller.ToggleNotifications ();
|
||||||
|
CreateMenu ();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Menu.Add (notify_item);
|
Menu.Add (notify_item);
|
||||||
|
|
Loading…
Reference in a new issue