bubbles: move logic for when to display notifications. fixes invisible toggling on mac.
This commit is contained in:
parent
aa9e56b60a
commit
226a2bfe04
|
@ -30,6 +30,9 @@ namespace SparkleShare {
|
|||
public SparkleBubbles ()
|
||||
{
|
||||
Controller.ShowBubbleEvent += delegate (string title, string subtext, string image_path) {
|
||||
if (!Program.UI.Controller.NotificationsEnabled)
|
||||
return;
|
||||
|
||||
try {
|
||||
Notification notification = new Notification () {
|
||||
Summary = title,
|
||||
|
|
|
@ -444,12 +444,10 @@ namespace SparkleShare {
|
|||
};
|
||||
|
||||
repo.NewChangeSet += delegate (SparkleChangeSet change_set) {
|
||||
if (NotificationsEnabled)
|
||||
NotificationRaised (change_set);
|
||||
};
|
||||
|
||||
repo.ConflictResolved += delegate {
|
||||
if (NotificationsEnabled)
|
||||
AlertNotificationRaised ("Conflict happened", "Don't worry, we've made a copy of each conflicting file.");
|
||||
};
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@ namespace SparkleShare {
|
|||
public SparkleBubbles ()
|
||||
{
|
||||
Controller.ShowBubbleEvent += delegate (string title, string subtext, string image_path) {
|
||||
if (!Program.UI.Controller.NotificationsEnabled)
|
||||
return;
|
||||
|
||||
Program.UI.StatusIcon.ShowBalloon (title, subtext, image_path);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue