From 7df0dc9adb91b3617de9c588b2900c3aa0bf99a7 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Tue, 17 Nov 2015 13:14:27 +0100 Subject: [PATCH] Add the current working item to the dock icon count. --- Classes/SBQueueController.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Classes/SBQueueController.m b/Classes/SBQueueController.m index d622c13..8ceb491 100755 --- a/Classes/SBQueueController.m +++ b/Classes/SBQueueController.m @@ -457,12 +457,14 @@ static void *SBQueueContex = &SBQueueContex; * Updates the count on the app dock icon. */ - (void)updateDockTile { - NSUInteger count = [self.queue readyCount]; + NSUInteger count = [self.queue readyCount] + ((self.queue.status == SBQueueStatusWorking) ? 1 : 0); - if (count) + if (count) { [[NSApp dockTile] setBadgeLabel:[NSString stringWithFormat:@"%lu", (unsigned long)count]]; - else + } + else { [[NSApp dockTile] setBadgeLabel:nil]; + } } - (void)updateUI {