]> granicus.if.org Git - handbrake/commitdiff
Minor UI changes
authortiter <eric@lapsus.org>
Fri, 24 Mar 2006 16:04:21 +0000 (16:04 +0000)
committertiter <eric@lapsus.org>
Fri, 24 Mar 2006 16:04:21 +0000 (16:04 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@48 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/ExpressController.m

index 0336cd8099b957cbb8c3500f82f1c0f01bdb8a05..b78bdf8b541bdff2cf84fe172d4ceccff2e9d669 100644 (file)
@@ -65,7 +65,7 @@
 }
 
 /***********************************************************************
- * Tableview delegate methods
+ * Tableview datasource methods
  **********************************************************************/
 - (int) numberOfRowsInTableView: (NSTableView *) t
 {
 - (void) openMatrixChanged: (id) sender
 {
     [self openEnable: YES];
+    if( [fOpenMatrix selectedRow] )
+    {
+        [self openBrowse: self];
+    }
 }
 
 - (void) openBrowse: (id) sender
         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];