[osx] Fix logs not being updated when notifications are turned off

This commit is contained in:
Hylke Bons 2011-03-13 17:45:23 +00:00
parent f602f8d10b
commit f2832690e0
2 changed files with 17 additions and 14 deletions

View file

@ -55,7 +55,6 @@ namespace SparkleShare {
public static SparkleIntro Intro;
public static NSFont Font;
private SparkleAbout About;
private NSAlert Alert;
@ -91,18 +90,22 @@ namespace SparkleShare {
InvokeOnMainThread (delegate {
if (NSApplication.SharedApplication.DockTile.BadgeLabel == null)
NSApplication.SharedApplication.DockTile.BadgeLabel = "1";
else
NSApplication.SharedApplication.DockTile.BadgeLabel =
(int.Parse (NSApplication.SharedApplication.DockTile.BadgeLabel) + 1).ToString ();
foreach (SparkleLog log in SparkleUI.OpenLogs)
log.UpdateEventLog ();
NSApplication.SharedApplication.RequestUserAttention
(NSRequestUserAttentionType.InformationalRequest);
foreach (SparkleLog log in SparkleUI.OpenLogs)
log.UpdateEventLog ();
if (SparkleShare.Controller.NotificationsEnabled) {
if (NSApplication.SharedApplication.DockTile.BadgeLabel == null)
NSApplication.SharedApplication.DockTile.BadgeLabel = "1";
else
NSApplication.SharedApplication.DockTile.BadgeLabel =
(int.Parse (NSApplication.SharedApplication.DockTile.BadgeLabel) + 1).ToString ();
NSApplication.SharedApplication.RequestUserAttention
(NSRequestUserAttentionType.InformationalRequest);
}
});
};

View file

@ -516,7 +516,7 @@ namespace SparkleShare {
repo.NewCommit += delegate (SparkleCommit commit, string repository_path) {
if (NotificationsEnabled && NotificationRaised != null)
if (NotificationRaised != null)
NotificationRaised (commit, repository_path);
};