From 40adbd9c9ea191a7ae69dd93822090c4616855ee Mon Sep 17 00:00:00 2001 From: dynaflash Date: Thu, 12 Feb 2009 21:08:41 +0000 Subject: MacGui: Queue -Stop animating currently encoding job icon when paused, restart animation upon resume. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2151 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/HBQueueController.mm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'macosx/HBQueueController.mm') diff --git a/macosx/HBQueueController.mm b/macosx/HBQueueController.mm index 822c3124f..aa5e55a8c 100644 --- a/macosx/HBQueueController.mm +++ b/macosx/HBQueueController.mm @@ -582,14 +582,20 @@ static NSString* HBQueuePauseResumeToolbarIdentifier = @"HBQueuePauseRe - (IBAction)togglePauseResume: (id)sender { if (!fQueueEncodeLibhb) return; - + hb_state_t s; hb_get_state2 (fQueueEncodeLibhb, &s); - + if (s.state == HB_STATE_PAUSED) + { hb_resume (fQueueEncodeLibhb); + [self startAnimatingCurrentWorkingEncodeInQueue]; + } else if ((s.state == HB_STATE_WORKING) || (s.state == HB_STATE_MUXING)) + { hb_pause (fQueueEncodeLibhb); + [self stopAnimatingCurrentJobGroupInQueue]; + } } #pragma mark - -- cgit v1.2.3