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 ();
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -92,18 +92,23 @@ namespace SparkleShare {
|
|||
Menu.Delegate = new SparkleStatusIconMenuDelegate ();
|
||||
}
|
||||
|
||||
|
||||
Controller.UpdateQuitItemEvent += delegate (bool quit_item_enabled) {
|
||||
InvokeOnMainThread (delegate {
|
||||
if (QuitMenuItem != null) {
|
||||
QuitMenuItem.Enabled = quit_item_enabled;
|
||||
StatusItem.Menu.Update ();
|
||||
}
|
||||
});
|
||||
using (var a = new NSAutoreleasePool ())
|
||||
{
|
||||
InvokeOnMainThread (delegate {
|
||||
if (QuitMenuItem != null) {
|
||||
QuitMenuItem.Enabled = quit_item_enabled;
|
||||
StatusItem.Menu.Update ();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Controller.UpdateMenuEvent += delegate (IconState state) {
|
||||
InvokeOnMainThread (delegate {
|
||||
using (var a = new NSAutoreleasePool ()) {
|
||||
using (var a = new NSAutoreleasePool ())
|
||||
{
|
||||
InvokeOnMainThread (delegate {
|
||||
switch (state) {
|
||||
case IconState.Idle:
|
||||
|
||||
|
@ -149,8 +154,8 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
StatusItem.Menu.Update ();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -81,9 +81,9 @@ namespace SparkleShare {
|
|||
{
|
||||
string folder_icon_path = Path.Combine (NSBundle.MainBundle.ResourcePath,
|
||||
"sparkleshare-mac.icns");
|
||||
|
||||
|
||||
NSImage folder_icon = new NSImage (folder_icon_path);
|
||||
|
||||
|
||||
NSWorkspace.SharedWorkspace.SetIconforFile (folder_icon,
|
||||
Program.Controller.SparklePath, 0);
|
||||
}
|
||||
|
@ -117,10 +117,7 @@ namespace SparkleShare {
|
|||
|
||||
private void ShowDockIcon ()
|
||||
{
|
||||
using (var a = new NSAutoreleasePool ())
|
||||
{
|
||||
NSApplication.SharedApplication.ActivationPolicy = NSApplicationActivationPolicy.Regular;
|
||||
}
|
||||
NSApplication.SharedApplication.ActivationPolicy = NSApplicationActivationPolicy.Regular;
|
||||
}
|
||||
|
||||
|
||||
|
@ -137,7 +134,10 @@ namespace SparkleShare {
|
|||
|
||||
public override void WillBecomeActive (NSNotification notification)
|
||||
{
|
||||
NSApplication.SharedApplication.DockTile.BadgeLabel = null;
|
||||
if (NSApplication.SharedApplication.DockTile.BadgeLabel != null) {
|
||||
Program.Controller.ShowEventLogWindow ();
|
||||
NSApplication.SharedApplication.DockTile.BadgeLabel = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue