diff options
author | notaz | 2010-11-16 18:39:07 +0200 |
---|---|---|
committer | notaz | 2010-11-17 00:58:09 +0200 |
commit | aa1fc44b4532dc68be2482730a275f8a3ba8a039 (patch) | |
tree | 95f1ec936aa776158f8b76e805eb0c1eafe473b0 /macosx/PluginController.m | |
parent | ef79bbde537d6b9c745a7d86cb9df1d04c35590d (diff) | |
download | pcsx_rearmed-aa1fc44b4532dc68be2482730a275f8a3ba8a039.tar.gz pcsx_rearmed-aa1fc44b4532dc68be2482730a275f8a3ba8a039.tar.bz2 pcsx_rearmed-aa1fc44b4532dc68be2482730a275f8a3ba8a039.zip |
remove stuff we won't need
this makes the source tree more pleasant to work with.
Diffstat (limited to 'macosx/PluginController.m')
-rw-r--r-- | macosx/PluginController.m | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/macosx/PluginController.m b/macosx/PluginController.m deleted file mode 100644 index 007e619..0000000 --- a/macosx/PluginController.m +++ /dev/null @@ -1,81 +0,0 @@ -#import "PluginController.h" -#import "PcsxPlugin.h" -#import "PcsxController.h" - -@implementation PluginController - -- (IBAction)doAbout:(id)sender -{ - PcsxPlugin *plugin = [plugins objectAtIndex:[pluginMenu indexOfSelectedItem]]; - [plugin aboutAs:pluginType]; -} - -- (IBAction)doConfigure:(id)sender -{ - PcsxPlugin *plugin = [plugins objectAtIndex:[pluginMenu indexOfSelectedItem]]; - - [plugin configureAs:pluginType]; -} - -- (IBAction)selectPlugin:(id)sender -{ - if (sender==pluginMenu) { - int index = [pluginMenu indexOfSelectedItem]; - if (index != -1) { - PcsxPlugin *plugin = [plugins objectAtIndex:index]; - - if (![[PluginList list] setActivePlugin:plugin forType:pluginType]) { - /* plugin won't initialize */ - } - - // write selection to defaults - [[NSUserDefaults standardUserDefaults] setObject:[plugin path] forKey:defaultKey]; - - // set button states - [aboutButton setEnabled:[plugin hasAboutAs:pluginType]]; - [configureButton setEnabled:[plugin hasConfigureAs:pluginType]]; - } else { - // set button states - [aboutButton setEnabled:NO]; - [configureButton setEnabled:NO]; - } - } -} - -// must be called before anything else -- (void)setPluginsTo:(NSArray *)list withType:(int)type -{ - NSString *sel; - int i; - - // remember the list - pluginType = type; - plugins = [list retain]; - defaultKey = [[PcsxPlugin getDefaultKeyForType:pluginType] retain]; - - // clear the previous menu items - [pluginMenu removeAllItems]; - - // load the currently selected plugin - sel = [[NSUserDefaults standardUserDefaults] stringForKey:defaultKey]; - - // add the menu entries - for (i = 0; i < [plugins count]; i++) { - [pluginMenu addItemWithTitle:[[plugins objectAtIndex:i] description]]; - - // make sure the currently selected is set as such - if ([sel isEqualToString:[[plugins objectAtIndex:i] path]]) { - [pluginMenu selectItemAtIndex:i]; - } - } - - [self selectPlugin:pluginMenu]; -} - -- (void)dealloc -{ - if (plugins) [plugins release]; - if (defaultKey) [defaultKey release]; -} - -@end |