mac: remove badge label feature now that there's a notification center

This commit is contained in:
Hylke Bons 2012-10-22 14:05:44 +01:00
parent c7eefd9d4e
commit df25a6c2a3
3 changed files with 1 additions and 27 deletions

View file

@ -33,14 +33,6 @@ namespace SparkleShare {
{
Controller.ShowBubbleEvent += delegate (string title, string subtext, string image_path) {
InvokeOnMainThread (delegate {
if (NSApplication.SharedApplication.DockTile.BadgeLabel == null) {
NSApplication.SharedApplication.DockTile.BadgeLabel = "1";
} else {
int events = int.Parse (NSApplication.SharedApplication.DockTile.BadgeLabel);
NSApplication.SharedApplication.DockTile.BadgeLabel = (events + 1).ToString ();
}
if (image_path != null) {
NSData image_data = NSData.FromFile (image_path);
GrowlApplicationBridge.Notify (title, subtext, "Event", image_data, 0, false, new NSString (""));
@ -59,7 +51,6 @@ namespace SparkleShare {
[Export("growlNotificationWasClicked")]
public override void GrowlNotificationWasClicked (NSObject o)
{
NSApplication.SharedApplication.DockTile.BadgeLabel = null;
Program.UI.Bubbles.Controller.BubbleClicked ();
}

View file

@ -377,13 +377,5 @@ namespace SparkleShare {
public override void MenuWillHighlightItem (NSMenu menu, NSMenuItem item)
{
}
public override void MenuWillOpen (NSMenu menu)
{
InvokeOnMainThread (() => {
NSApplication.SharedApplication.DockTile.BadgeLabel = null;
});
}
}
}

View file

@ -103,16 +103,7 @@ namespace SparkleShare {
public partial class AppDelegate : NSApplicationDelegate {
public override void WillBecomeActive (NSNotification notification)
{
if (NSApplication.SharedApplication.DockTile.BadgeLabel != null) {
Program.Controller.ShowEventLogWindow ();
NSApplication.SharedApplication.DockTile.BadgeLabel = null;
}
}
public override void WillTerminate (NSNotification notification)
{
Program.Controller.Quit ();