summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.m
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2013-03-01 10:14:00 +0000
committerjstebbins <[email protected]>2013-03-01 10:14:00 +0000
commit6039fc23819d1e9e8b5b7440ce6a156a6c46094d (patch)
tree1d6e2d36af8b8229f98bef66006186ecf58ce100 /macosx/Controller.m
parenta1a0e0e715d31badf58e3a43c02906b994587c90 (diff)
Improve scan progress granularity
We were only updating progress after completely processing each title. Now progress is updated as we generate previews as well. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5276 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.m')
-rw-r--r--macosx/Controller.m41
1 files changed, 30 insertions, 11 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m
index 3f5f73288..5fd371a9e 100644
--- a/macosx/Controller.m
+++ b/macosx/Controller.m
@@ -861,12 +861,22 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
#define p s.param.scanning
case HB_STATE_SCANNING:
{
- [fSrcDVD2Field setStringValue: [NSString stringWithFormat:
- NSLocalizedString( @"Scanning title %d of %d…", @"" ),
- p.title_cur, p.title_count]];
+ if( p.preview_cur )
+ {
+ [fSrcDVD2Field setStringValue: [NSString stringWithFormat:
+ NSLocalizedString( @"Scanning title %d of %d, preview %d…", @"" ),
+ p.title_cur, p.title_count,
+ p.preview_cur]];
+ }
+ else
+ {
+ [fSrcDVD2Field setStringValue: [NSString stringWithFormat:
+ NSLocalizedString( @"Scanning title %d of %d…", @"" ),
+ p.title_cur, p.title_count]];
+ }
[fScanIndicator setHidden: NO];
[fScanHorizontalLine setHidden: YES];
- [fScanIndicator setDoubleValue: 100.0 * ((double)( p.title_cur - 1 ) / p.title_count)];
+ [fScanIndicator setDoubleValue: 100.0 * p.progress];
break;
}
#undef p
@@ -935,14 +945,23 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
#define p s.param.scanning
case HB_STATE_SCANNING:
{
- [fStatusField setStringValue: [NSString stringWithFormat:
- NSLocalizedString( @"Queue Scanning title %d of %d…", @"" ),
- p.title_cur, p.title_count]];
+ NSString *scan_status;
+ if( p.preview_cur )
+ {
+ scan_status = [NSString stringWithFormat:
+ NSLocalizedString( @"Queue Scanning title %d of %d, preview %d…", @"" ),
+ p.title_cur, p.title_count, p.preview_cur];
+ }
+ else
+ {
+ scan_status = [NSString stringWithFormat:
+ NSLocalizedString( @"Queue Scanning title %d of %d…", @"" ),
+ p.title_cur, p.title_count];
+ }
+ [fStatusField setStringValue: scan_status];
- /* Set the status string in fQueueController as well */
- [fQueueController setQueueStatusString: [NSString stringWithFormat:
- NSLocalizedString( @"Queue Scanning title %d of %d…", @"" ),
- p.title_cur, p.title_count]];
+ /* Set the status string in fQueueController as well */
+ [fQueueController setQueueStatusString: scan_status];
break;
}
#undef p