diff options
author | ritsuka <[email protected]> | 2008-08-08 08:22:53 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2008-08-08 08:22:53 +0000 |
commit | 8a130d0d89db739f22bcddeef1aaa3a5201b4524 (patch) | |
tree | 2e4cd0148b4ce9bf3bc56e4b9aa6feb570208ed5 /macosx/HBPreferencesController.m | |
parent | f8eb63aed0df0e9c99b5d652728ccb01a2d4eb68 (diff) |
MacGui: Use fast numerators in HBPreferencesController, remove an hard tab and replace float with CGFloat.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1617 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreferencesController.m')
-rw-r--r-- | macosx/HBPreferencesController.m | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m index 8b49d5cfa..7cba07e47 100644 --- a/macosx/HBPreferencesController.m +++ b/macosx/HBPreferencesController.m @@ -47,7 +47,7 @@ desktopDirectory, @"LastSourceDirectory", @"NO", @"DefaultAutoNaming", @"NO", @"DisableDvdAutoDetect", - @"Alert Window", @"AlertWhenDone", + @"Alert Window", @"AlertWhenDone", @"4:10:15:9:10:35:9", @"DecombCustomString", nil]]; } @@ -146,24 +146,24 @@ - (void) setPrefView: (id) sender { NSView * view = fGeneralView; - if (sender) + if( sender ) { NSString * identifier = [sender itemIdentifier]; - if ([identifier isEqualToString: TOOLBAR_PICTURE]) + if( [identifier isEqualToString: TOOLBAR_PICTURE] ) view = fPictureView; - else if ([identifier isEqualToString: TOOLBAR_AUDIO]) + else if( [identifier isEqualToString: TOOLBAR_AUDIO] ) view = fAudioView; - else if ([identifier isEqualToString: TOOLBAR_ADVANCED]) + else if( [identifier isEqualToString: TOOLBAR_ADVANCED] ) view = fAdvancedView; else; } NSWindow * window = [self window]; - if ([window contentView] == view) + if( [window contentView] == view ) return; NSRect windowRect = [window frame]; - float difference = ([view frame].size.height - [[window contentView] frame].size.height) * [window userSpaceScaleFactor]; + CGFloat difference = ( [view frame].size.height - [[window contentView] frame].size.height ) * [window userSpaceScaleFactor]; windowRect.origin.y -= difference; windowRect.size.height += difference; @@ -173,16 +173,14 @@ [view setHidden: NO]; //set title label - if (sender) + if( sender ) [window setTitle: [sender label]]; else { NSToolbar * toolbar = [window toolbar]; NSString * itemIdentifier = [toolbar selectedItemIdentifier]; - NSEnumerator * enumerator = [[toolbar items] objectEnumerator]; - NSToolbarItem * item; - while ((item = [enumerator nextObject])) - if ([[item itemIdentifier] isEqualToString: itemIdentifier]) + for( NSToolbarItem * item in [toolbar items] ) + if( [[item itemIdentifier] isEqualToString: itemIdentifier] ) { [window setTitle: [item label]]; break; |