Skip to content

Commit

Permalink
Minor UI changes
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@48 b64f7644-9d1e-0410-96f1-a4d463321fa5
  • Loading branch information
titer committed Mar 24, 2006
1 parent 730315e commit 82485cc
Showing 1 changed file with 27 additions and 16 deletions.
43 changes: 27 additions & 16 deletions macosx/ExpressController.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ - (void) applicationWillTerminate: (NSNotification *) n
}

/***********************************************************************
* Tableview delegate methods
* Tableview datasource methods
**********************************************************************/
- (int) numberOfRowsInTableView: (NSTableView *) t
{
Expand Down Expand Up @@ -147,6 +147,10 @@ - (void) openShow: (id) sender
- (void) openMatrixChanged: (id) sender
{
[self openEnable: YES];
if( [fOpenMatrix selectedRow] )
{
[self openBrowse: self];
}
}

- (void) openBrowse: (id) sender
Expand Down Expand Up @@ -385,22 +389,29 @@ - (void) convertTimer: (NSTimer *) timer
case HB_STATE_WORKING:
{
NSMutableString * string = [NSMutableString
stringWithFormat: @"Converting: %.1f %%, %.1f fps",
100.0 * p.progress, p.rate_avg];
if( p.hours > 0 )
{
[string appendFormat: @" (%d hours %d mins left)",
p.hours, p.minutes];
}
else if( p.minutes > 0 )
{
[string appendFormat: @" (%d mins %d secs left)",
p.minutes, p.seconds];
}
else if( p.seconds > -1 )
stringWithFormat: @"Converting: %.1f %%",
100.0 * p.progress];
if( p.seconds > -1 )
{
[string appendFormat: @" (%d seconds left)",
p.seconds];
[string appendFormat: @" (%.1f fps, ", p.rate_avg];
if( p.hours > 0 )
{
[string appendFormat: @"%d hour%s %d min%s",
p.hours, p.hours == 1 ? "" : "s",
p.minutes, p.minutes == 1 ? "" : "s"];
}
else if( p.minutes > 0 )
{
[string appendFormat: @"%d min%s %d sec%s",
p.minutes, p.minutes == 1 ? "" : "s",
p.seconds, p.seconds == 1 ? "" : "s"];
}
else
{
[string appendFormat: @"%d second%s",
p.seconds, p.seconds == 1 ? "" : "s"];
}
[string appendString: @" left)"];
}
[fConvertInfoString setStringValue: string];
[fConvertIndicator setIndeterminate: NO];
Expand Down

0 comments on commit 82485cc

Please sign in to comment.