mac: remove badge label feature now that there's a notification center
This commit is contained in:
parent
aa16571907
commit
c69445939c
|
@ -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 ();
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 ();
|
||||
|
|
Loading…
Reference in a new issue