diff options
author | dynaflash <[email protected]> | 2007-03-25 05:23:05 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2007-03-25 05:23:05 +0000 |
commit | 1512d6ecf7a80ebbf22a6d050006876b6751fc28 (patch) | |
tree | 17d4a0c0e3699b91fd6326e8b7c2e058893dac1f | |
parent | 72508e88b7f4d09b42f3341546d2e838787bf510 (diff) |
MacGui: Re-enable custom user presets.
- were previously disabled in svn rev 441
- Fixed the hang in the add preset window caused by a bad sortselector
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@448 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | macosx/Controller.h | 2 | ||||
-rw-r--r-- | macosx/Controller.mm | 17 |
2 files changed, 10 insertions, 9 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h index c4abf29bd..ea35ac295 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -205,7 +205,7 @@ - (void) savePreset; - (IBAction)AddFactoryPresets:(id)sender; - (IBAction)AddUserPreset:(id)sender; -- (IBAction)AddPreset:(id)sender; +- (void)AddPreset; - (IBAction)InsertPreset:(id)sender; - (IBAction)DeletePreset:(id)sender; - (IBAction)tableViewSelected:(id)sender; diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 0de001cdb..98254baad 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -1475,13 +1475,13 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow { /* Show the panel */ /* Temporarily disable until window hang bug is fixed */ - /* + [NSApp beginSheet: fAddPresetPanel modalForWindow: fWindow modalDelegate: NULL didEndSelector: NULL contextInfo: NULL]; [NSApp runModalForWindow: fAddPresetPanel]; [NSApp endSheet: fAddPresetPanel]; - [fAddPresetPanel orderOut: self] - */ + [fAddPresetPanel orderOut: self]; + } - (IBAction) CloseAddPresetPanel: (id) sender { @@ -1493,21 +1493,22 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow /* Here we create each shipped preset */ [UserPresets addObject:[self CreateIpodPreset]]; [UserPresets addObject:[self CreateAppleTVPreset]]; - [self AddPreset: sender]; + [self AddPreset]; } - (IBAction)AddUserPreset:(id)sender { /* Here we create a custom user preset */ [UserPresets addObject:[self CreatePreset]]; - [self AddPreset: sender]; + [self AddPreset]; + } -- (IBAction)AddPreset:(id)sender +- (void)AddPreset { /* We Sort the Presets By Factory or Custom */ NSSortDescriptor * presetTypeDescriptor=[[[NSSortDescriptor alloc] initWithKey:@"Type" - ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease]; + ascending:YES] autorelease]; /* We Sort the Presets Alphabetically by name */ NSSortDescriptor * presetNameDescriptor=[[[NSSortDescriptor alloc] initWithKey:@"PresetName" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease]; @@ -1516,7 +1517,7 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow [UserPresets setArray:sortedArray]; /* We stop the modal window for the new preset */ - [fPresetNewName setStringValue: @""]; + [fPresetNewName setStringValue: @""]; [NSApp stopModal]; /* We Reload the New Table data for presets */ [tableView reloadData]; |