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 ()
|
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,13 +444,11 @@ 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.");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.repositories.Add (repo);
|
this.repositories.Add (repo);
|
||||||
|
|
|
@ -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