mac: open event log when dock icon with badge is clicked
This commit is contained in:
parent
84413d2c53
commit
f2d6daeda2
|
@ -68,6 +68,7 @@ namespace SparkleShare {
|
|||
[Export("growlNotificationWasClicked")]
|
||||
public override void GrowlNotificationWasClicked (NSObject o)
|
||||
{
|
||||
NSApplication.SharedApplication.DockTile.BadgeLabel = null;
|
||||
SparkleUI.Bubbles.Controller.BubbleClicked ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,6 +78,8 @@ namespace SparkleShare {
|
|||
};
|
||||
|
||||
Controller.ChangePageEvent += delegate (PageType type, string [] warnings) {
|
||||
using (var a = new NSAutoreleasePool ())
|
||||
{
|
||||
InvokeOnMainThread (delegate {
|
||||
Reset ();
|
||||
|
||||
|
@ -770,6 +772,7 @@ namespace SparkleShare {
|
|||
|
||||
ShowAll ();
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,18 +92,23 @@ namespace SparkleShare {
|
|||
Menu.Delegate = new SparkleStatusIconMenuDelegate ();
|
||||
}
|
||||
|
||||
|
||||
Controller.UpdateQuitItemEvent += delegate (bool quit_item_enabled) {
|
||||
using (var a = new NSAutoreleasePool ())
|
||||
{
|
||||
InvokeOnMainThread (delegate {
|
||||
if (QuitMenuItem != null) {
|
||||
QuitMenuItem.Enabled = quit_item_enabled;
|
||||
StatusItem.Menu.Update ();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Controller.UpdateMenuEvent += delegate (IconState state) {
|
||||
using (var a = new NSAutoreleasePool ())
|
||||
{
|
||||
InvokeOnMainThread (delegate {
|
||||
using (var a = new NSAutoreleasePool ()) {
|
||||
switch (state) {
|
||||
case IconState.Idle:
|
||||
|
||||
|
@ -149,8 +154,8 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
StatusItem.Menu.Update ();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -116,12 +116,9 @@ namespace SparkleShare {
|
|||
|
||||
|
||||
private void ShowDockIcon ()
|
||||
{
|
||||
using (var a = new NSAutoreleasePool ())
|
||||
{
|
||||
NSApplication.SharedApplication.ActivationPolicy = NSApplicationActivationPolicy.Regular;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Export("registrationDictionaryForGrowl")]
|
||||
|
@ -137,8 +134,11 @@ namespace SparkleShare {
|
|||
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue