mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
another attempt of fixing the dock badge on quit on tiger
This commit is contained in:
parent
21d3614f7c
commit
b079df809c
2 changed files with 17 additions and 6 deletions
|
@ -27,13 +27,15 @@
|
|||
|
||||
@interface Badger : NSObject
|
||||
{
|
||||
tr_handle * fLib;
|
||||
tr_handle * fLib;
|
||||
|
||||
NSImage * fDockIcon, * fBadge;
|
||||
NSImage * fDockIcon, * fBadge;
|
||||
|
||||
NSDictionary * fAttributes;
|
||||
int fCompleted, fCompletedBadged;
|
||||
BOOL fSpeedBadge;
|
||||
NSDictionary * fAttributes;
|
||||
int fCompleted, fCompletedBadged;
|
||||
BOOL fSpeedBadge;
|
||||
|
||||
BOOL fQuittingTiger;
|
||||
}
|
||||
|
||||
- (id) initWithLib: (tr_handle *) lib;
|
||||
|
|
|
@ -56,6 +56,8 @@
|
|||
[[NSApp dockTile] setContentView: view];
|
||||
[view release];
|
||||
}
|
||||
else
|
||||
fQuittingTiger = NO;
|
||||
|
||||
//change that just impacts the dock badge
|
||||
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(updateBadge) name: @"DockBadgeChange" object: nil];
|
||||
|
@ -81,6 +83,11 @@
|
|||
[[NSApp dockTile] display];
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fQuittingTiger)
|
||||
return;
|
||||
}
|
||||
|
||||
//set completed badge to top right
|
||||
BOOL completedChange = fCompleted != fCompletedBadged;
|
||||
|
@ -227,10 +234,12 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
fQuittingTiger = YES;
|
||||
|
||||
fSpeedBadge = NO;
|
||||
fCompleted = 0;
|
||||
fCompletedBadged = 0;
|
||||
[NSApp setApplicationIconImage: @"NSApplicationIcon"];
|
||||
[NSApp setApplicationIconImage: nil];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue