mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +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
|
@ -34,6 +34,8 @@
|
||||||
NSDictionary * fAttributes;
|
NSDictionary * fAttributes;
|
||||||
int fCompleted, fCompletedBadged;
|
int fCompleted, fCompletedBadged;
|
||||||
BOOL fSpeedBadge;
|
BOOL fSpeedBadge;
|
||||||
|
|
||||||
|
BOOL fQuittingTiger;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithLib: (tr_handle *) lib;
|
- (id) initWithLib: (tr_handle *) lib;
|
||||||
|
|
|
@ -56,6 +56,8 @@
|
||||||
[[NSApp dockTile] setContentView: view];
|
[[NSApp dockTile] setContentView: view];
|
||||||
[view release];
|
[view release];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
fQuittingTiger = NO;
|
||||||
|
|
||||||
//change that just impacts the dock badge
|
//change that just impacts the dock badge
|
||||||
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(updateBadge) name: @"DockBadgeChange" object: nil];
|
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(updateBadge) name: @"DockBadgeChange" object: nil];
|
||||||
|
@ -81,6 +83,11 @@
|
||||||
[[NSApp dockTile] display];
|
[[NSApp dockTile] display];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (fQuittingTiger)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//set completed badge to top right
|
//set completed badge to top right
|
||||||
BOOL completedChange = fCompleted != fCompletedBadged;
|
BOOL completedChange = fCompleted != fCompletedBadged;
|
||||||
|
@ -227,10 +234,12 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
fQuittingTiger = YES;
|
||||||
|
|
||||||
fSpeedBadge = NO;
|
fSpeedBadge = NO;
|
||||||
fCompleted = 0;
|
fCompleted = 0;
|
||||||
fCompletedBadged = 0;
|
fCompletedBadged = 0;
|
||||||
[NSApp setApplicationIconImage: @"NSApplicationIcon"];
|
[NSApp setApplicationIconImage: nil];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue