]> granicus.if.org Git - transmission/commitdiff
#5090 Include seeding-complete transfers in badged count on Dock icon
authorMitchell Livingston <livings124@transmissionbt.com>
Mon, 15 Oct 2012 02:12:44 +0000 (02:12 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Mon, 15 Oct 2012 02:12:44 +0000 (02:12 +0000)
macosx/Badger.m
macosx/Controller.m

index fb32d06b2bb7247db941b3b1177325b68ef77baf..e6359f169ff39874d5c24cba6ffdcbc076290db8 100644 (file)
@@ -65,6 +65,8 @@
 
 - (void) addCompletedTorrent: (Torrent *) torrent
 {
+    NSParameterAssert(torrent != nil);
+    
     [fHashes addObject: [torrent hashString]];
     [[NSApp dockTile] setBadgeLabel: [NSString formattedUInteger: [fHashes count]]];
 }
index 59ee04b91eaa638fd6a4c3c9815b4fd8b8978a78..dd47c8f3cdfa1c87fb58e23748841cad1eab261f 100644 (file)
@@ -2087,7 +2087,10 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
                                 description: [torrent name] notificationName: GROWL_SEEDING_COMPLETE
                                    iconData: nil priority: 0 isSticky: NO clickContext: clickContext];
     
-    //removing for the list calls fullUpdateUI
+    if (![fWindow isMainWindow])
+        [fBadger addCompletedTorrent: torrent];
+    
+    //removing from the list calls fullUpdateUI
     if ([torrent removeWhenFinishSeeding])
         [self confirmRemoveTorrents: [[NSArray arrayWithObject: torrent] retain] deleteData: NO];
     else