only update the dock badging when there's a change

This commit is contained in:
Mitchell Livingston
2007-05-17 21:04:04 +00:00
parent 0fde32ead5
commit 12b3df53ef
3 changed files with 80 additions and 47 deletions

View File

@@ -166,7 +166,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
fInfoController = [[InfoWindowController alloc] initWithWindowNibName: @"InfoWindow"];
fPrefsController = [[PrefsController alloc] initWithWindowNibName: @"PrefsWindow" handle: fLib];
fBadger = [[Badger alloc] init];
fBadger = [[Badger alloc] initWithLib: fLib];
[GrowlApplicationBridge setGrowlDelegate: self];
@@ -1321,7 +1321,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
[fInfoController updateInfoStats];
//badge dock
[fBadger updateBadgeWithCompleted: fCompleted uploadRate: uploadRate downloadRate: downloadRate];
[fBadger updateBadgeWithCompleted: fCompleted];
}
- (void) updateTorrentsInQueue
@@ -2839,10 +2839,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
- (void) resetDockBadge: (NSNotification *) notification
{
float downloadRate, uploadRate;
tr_torrentRates(fLib, & downloadRate, & uploadRate);
[fBadger updateBadgeWithCompleted: fCompleted uploadRate: uploadRate downloadRate: downloadRate];
[fBadger updateBadgeWithCompleted: fCompleted];
}
- (NSRect) windowWillUseStandardFrame: (NSWindow *) window defaultFrame: (NSRect) defaultFrame