1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

another attempt of fixing the dock badge on quit on tiger

This commit is contained in:
Mitchell Livingston 2007-12-20 02:09:44 +00:00
parent 21d3614f7c
commit b079df809c
2 changed files with 17 additions and 6 deletions

View file

@ -34,6 +34,8 @@
NSDictionary * fAttributes;
int fCompleted, fCompletedBadged;
BOOL fSpeedBadge;
BOOL fQuittingTiger;
}
- (id) initWithLib: (tr_handle *) lib;

View file

@ -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];
}
}