[osx] Fix logs not being updated when notifications are turned off
This commit is contained in:
parent
f602f8d10b
commit
f2832690e0
|
@ -55,7 +55,6 @@ namespace SparkleShare {
|
||||||
public static SparkleIntro Intro;
|
public static SparkleIntro Intro;
|
||||||
public static NSFont Font;
|
public static NSFont Font;
|
||||||
|
|
||||||
private SparkleAbout About;
|
|
||||||
private NSAlert Alert;
|
private NSAlert Alert;
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,18 +90,22 @@ namespace SparkleShare {
|
||||||
|
|
||||||
InvokeOnMainThread (delegate {
|
InvokeOnMainThread (delegate {
|
||||||
|
|
||||||
|
foreach (SparkleLog log in SparkleUI.OpenLogs)
|
||||||
|
log.UpdateEventLog ();
|
||||||
|
|
||||||
|
if (SparkleShare.Controller.NotificationsEnabled) {
|
||||||
|
|
||||||
if (NSApplication.SharedApplication.DockTile.BadgeLabel == null)
|
if (NSApplication.SharedApplication.DockTile.BadgeLabel == null)
|
||||||
NSApplication.SharedApplication.DockTile.BadgeLabel = "1";
|
NSApplication.SharedApplication.DockTile.BadgeLabel = "1";
|
||||||
else
|
else
|
||||||
NSApplication.SharedApplication.DockTile.BadgeLabel =
|
NSApplication.SharedApplication.DockTile.BadgeLabel =
|
||||||
(int.Parse (NSApplication.SharedApplication.DockTile.BadgeLabel) + 1).ToString ();
|
(int.Parse (NSApplication.SharedApplication.DockTile.BadgeLabel) + 1).ToString ();
|
||||||
|
|
||||||
foreach (SparkleLog log in SparkleUI.OpenLogs)
|
|
||||||
log.UpdateEventLog ();
|
|
||||||
|
|
||||||
NSApplication.SharedApplication.RequestUserAttention
|
NSApplication.SharedApplication.RequestUserAttention
|
||||||
(NSRequestUserAttentionType.InformationalRequest);
|
(NSRequestUserAttentionType.InformationalRequest);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -516,7 +516,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
repo.NewCommit += delegate (SparkleCommit commit, string repository_path) {
|
repo.NewCommit += delegate (SparkleCommit commit, string repository_path) {
|
||||||
|
|
||||||
if (NotificationsEnabled && NotificationRaised != null)
|
if (NotificationRaised != null)
|
||||||
NotificationRaised (commit, repository_path);
|
NotificationRaised (commit, repository_path);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue