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