From: titer Date: Thu, 16 Feb 2006 15:03:11 +0000 (+0000) Subject: Missing strings X-Git-Tag: 0.7.1~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=340068111b89d7f84755eb2ff89c35eff01f5a71;p=handbrake Missing strings git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@26 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/macosx/English.lproj/Portable.nib/classes.nib b/macosx/English.lproj/Portable.nib/classes.nib index 95131eb04..c9525762f 100644 --- a/macosx/English.lproj/Portable.nib/classes.nib +++ b/macosx/English.lproj/Portable.nib/classes.nib @@ -83,6 +83,7 @@ fOpenIndicator = NSProgressIndicator; fOpenMatrix = NSMatrix; fOpenPopUp = NSPopUpButton; + fOpenProgressField = NSTextField; fOpenView = NSView; fWindow = NSWindow; }; diff --git a/macosx/English.lproj/Portable.nib/info.nib b/macosx/English.lproj/Portable.nib/info.nib index ca8a98874..ff2bd783c 100644 --- a/macosx/English.lproj/Portable.nib/info.nib +++ b/macosx/English.lproj/Portable.nib/info.nib @@ -7,9 +7,9 @@ IBEditorPositions 248 - 417 394 408 321 0 0 1280 832 + 483 424 408 321 0 0 1440 878 259 - 417 300 408 508 0 0 1280 832 + 484 331 408 508 0 0 1440 878 29 33 298 338 44 0 0 1280 832 303 @@ -22,6 +22,6 @@ 259 IBSystem Version - 8H14 + 8F1111g diff --git a/macosx/English.lproj/Portable.nib/keyedobjects.nib b/macosx/English.lproj/Portable.nib/keyedobjects.nib index 39a4124bd..cdb138437 100644 Binary files a/macosx/English.lproj/Portable.nib/keyedobjects.nib and b/macosx/English.lproj/Portable.nib/keyedobjects.nib differ diff --git a/macosx/PortableController.h b/macosx/PortableController.h index 3ba3c34ae..6ebcfa8b6 100644 --- a/macosx/PortableController.h +++ b/macosx/PortableController.h @@ -17,6 +17,7 @@ IBOutlet NSPopUpButton * fOpenPopUp; IBOutlet NSTextField * fOpenFolderField; IBOutlet NSButton * fOpenBrowseButton; + IBOutlet NSTextField * fOpenProgressField; IBOutlet NSProgressIndicator * fOpenIndicator; IBOutlet NSButton * fOpenGoButton; NSString * fOpenFolderString; diff --git a/macosx/PortableController.m b/macosx/PortableController.m index dc3450d0a..a807753a9 100644 --- a/macosx/PortableController.m +++ b/macosx/PortableController.m @@ -65,14 +65,40 @@ - (id) tableView:(NSTableView *) t objectValueForTableColumn: (NSTableColumn *) col row: (int) row { - if( [[col identifier] isEqualToString: @"Title"] ) + if( [[col identifier] isEqualToString: @"Check"] ) { - hb_title_t * title = hb_list_item( fList, row ); - return [@"Title " stringByAppendingFormat: @"%d", title->index]; + return [fConvertCheckArray objectAtIndex: row]; } - else if( [[col identifier] isEqualToString: @"Check"] ) + else { - return [fConvertCheckArray objectAtIndex: row]; + hb_title_t * title = hb_list_item( fList, row ); + if( [[col identifier] isEqualToString: @"Title"] ) + { + return [@"Title " stringByAppendingFormat: @"%d", + title->index]; + } + else if( [[col identifier] isEqualToString: @"Length"] ) + { + if( title->hours > 0 ) + { + return [NSString stringWithFormat: + @"%d hour%s %d min%s", title->hours, + title->hours > 1 ? "s" : "", title->minutes, + title->minutes > 1 ? "s": ""]; + } + else if( title->minutes > 0 ) + { + return [NSString stringWithFormat: + @"%d min%s %d sec%s", title->minutes, + title->minutes > 1 ? "s" : "", title->seconds, + title->seconds > 1 ? "s": ""]; + } + else + { + return [NSString stringWithFormat: @"%d seconds", + title->seconds]; + } + } } return nil; } @@ -169,8 +195,8 @@ job->vcodec = HB_VCODEC_X264; job->h264_13 = 1; job->file = strdup( [[NSString stringWithFormat: - @"%@/%p - Title %d.mp4", fConvertFolderString, self, i] - UTF8String] ); + @"%@/%p - Title %d.mp4", fConvertFolderString, self, + title->index] UTF8String] ); hb_add( fHandle, job ); } @@ -234,6 +260,9 @@ [fOpenIndicator setIndeterminate: NO]; [fOpenIndicator setDoubleValue: 100.0 * ( (float) p.title_cur - 0.5 ) / p.title_count]; + [fOpenProgressField setStringValue: [NSString + stringWithFormat: @"Scanning title %d of %d...", + p.title_cur, p.title_count]]; break; #undef p