diff options
author | dynaflash <[email protected]> | 2007-03-30 18:29:27 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2007-03-30 18:29:27 +0000 |
commit | 18cd105e9a40beccc264178dba69b8b89926a121 (patch) | |
tree | f3e332a46dd435df69dfdbcb1ffeaa9c259ef078 /macosx | |
parent | 8fec20a54998df78804fca118b36c61b7544890a (diff) |
MacGui: Presets
- Show Built In Presets in a blue font and custom user presets in black to differentiate them.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@468 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.h | 5 | ||||
-rw-r--r-- | macosx/Controller.mm | 27 | ||||
-rw-r--r-- | macosx/English.lproj/MainMenu.nib/info.nib | 6 | ||||
-rw-r--r-- | macosx/English.lproj/MainMenu.nib/keyedobjects.nib | bin | 97693 -> 97772 bytes |
4 files changed, 28 insertions, 10 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h index 448e258c6..4fd0f272e 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -223,7 +223,10 @@ setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex; - +// To determine user presets cell display properties +- (void)tableView:(NSTableView *)aTableView + willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; @end diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 1cb44631f..a8b25bab6 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -1735,7 +1735,7 @@ the user is using "Custom" settings by determining the sender*/ NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; /* Get the New Preset Name from the field in the AddPresetPanel */ [preset setObject:@"HB-AppleTV" forKey:@"PresetName"]; - /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/ + /*Set whether or not this is a user preset where 0 is factory, 1 is user*/ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"]; /*Set whether or not this is default, at creation set to 0*/ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"]; @@ -1939,18 +1939,33 @@ the user is using "Custom" settings by determining the sender*/ return [UserPresets count]; } +/* we use this to determine display characteristics for +each table cell based on content currently only used to +show the built in presets in a blue font. */ +- (void)tableView:(NSTableView *)aTableView + willDisplayCell:(id)aCell + forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex +{ + NSDictionary *userPresetDict = [UserPresets objectAtIndex:rowIndex]; + if ([[userPresetDict objectForKey:@"Type"] intValue] == 0) + { + [aCell setTextColor:[NSColor blueColor]]; + } + else + { + [aCell setTextColor:[NSColor blackColor]]; + } + +} + - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex { - - - - id theRecord, theValue; +id theRecord, theValue; theRecord = [UserPresets objectAtIndex:rowIndex]; theValue = [theRecord objectForKey:[aTableColumn identifier]]; - return theValue; } diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib index 892e94617..035e42b5d 100644 --- a/macosx/English.lproj/MainMenu.nib/info.nib +++ b/macosx/English.lproj/MainMenu.nib/info.nib @@ -7,7 +7,7 @@ <key>IBEditorPositions</key> <dict> <key>1843</key> - <string>1970 386 220 592 1440 0 1280 1024 </string> + <string>1791 35 220 592 1440 0 1280 1024 </string> <key>29</key> <string>102 834 300 44 0 0 1440 878 </string> </dict> @@ -19,9 +19,9 @@ </array> <key>IBOpenObjects</key> <array> - <integer>21</integer> <integer>29</integer> - <integer>1438</integer> + <integer>1843</integer> + <integer>21</integer> </array> <key>IBSystem Version</key> <string>8P2137</string> diff --git a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib Binary files differindex 578d27876..f1c390d96 100644 --- a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib +++ b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib |