diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-09-13 21:31:56 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-09-13 21:31:56 +0000 |
| commit | de50d760fd03a7eed9a614a3d4a701f2097c88d9 (patch) | |
| tree | abd27fe9c76372b7b819670dd15ec859de94e164 /macosx/PluginController.m | |
| parent | 56d5b481986072f06ac516f43b68ec1d5b3aac1b (diff) | |
| download | pcsxr-de50d760fd03a7eed9a614a3d4a701f2097c88d9.tar.gz | |
Changing a few Objective C classes to have their ivars hidden.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87167 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PluginController.m')
| -rwxr-xr-x | macosx/PluginController.m | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/macosx/PluginController.m b/macosx/PluginController.m index 0a47b04a..2d9b26c9 100755 --- a/macosx/PluginController.m +++ b/macosx/PluginController.m @@ -5,22 +5,24 @@ @interface PluginController () @property (strong) NSArray *plugins; @property (strong) NSString *defaultKey; +@property int pluginType; @end @implementation PluginController -@synthesize defaultKey; -@synthesize plugins; +@synthesize aboutButton; +@synthesize configureButton; +@synthesize pluginMenu; - (IBAction)doAbout:(id)sender { - PcsxrPlugin *plugin = plugins[[pluginMenu indexOfSelectedItem]]; - [plugin aboutAs:pluginType]; + PcsxrPlugin *plugin = (self.plugins)[[pluginMenu indexOfSelectedItem]]; + [plugin aboutAs:self.pluginType]; } - (IBAction)doConfigure:(id)sender { - PcsxrPlugin *plugin = plugins[[pluginMenu indexOfSelectedItem]]; - [plugin configureAs:pluginType]; + PcsxrPlugin *plugin = (self.plugins)[[pluginMenu indexOfSelectedItem]]; + [plugin configureAs:self.pluginType]; } - (IBAction)selectPlugin:(id)sender @@ -28,18 +30,18 @@ if (sender == pluginMenu) { NSInteger index = [pluginMenu indexOfSelectedItem]; if (index != -1) { - PcsxrPlugin *plugin = plugins[index]; + PcsxrPlugin *plugin = (self.plugins)[index]; - if (![[PluginList list] setActivePlugin:plugin forType:pluginType]) { + if (![[PluginList list] setActivePlugin:plugin forType:self.pluginType]) { /* plugin won't initialize */ } // write selection to defaults - [[NSUserDefaults standardUserDefaults] setObject:[plugin path] forKey:defaultKey]; + [[NSUserDefaults standardUserDefaults] setObject:[plugin path] forKey:self.defaultKey]; // set button states - [aboutButton setEnabled:[plugin hasAboutAs:pluginType]]; - [configureButton setEnabled:[plugin hasConfigureAs:pluginType]]; + [aboutButton setEnabled:[plugin hasAboutAs:self.pluginType]]; + [configureButton setEnabled:[plugin hasConfigureAs:self.pluginType]]; } else { // set button states [aboutButton setEnabled:NO]; @@ -54,18 +56,18 @@ NSString *sel; // remember the list - pluginType = type; + self.pluginType = type; self.plugins = list; - self.defaultKey = [PcsxrPlugin defaultKeyForType:pluginType]; + self.defaultKey = [PcsxrPlugin defaultKeyForType:self.pluginType]; // clear the previous menu items [pluginMenu removeAllItems]; // load the currently selected plugin - sel = [[NSUserDefaults standardUserDefaults] stringForKey:defaultKey]; + sel = [[NSUserDefaults standardUserDefaults] stringForKey:self.defaultKey]; // add the menu entries - for (PcsxrPlugin *plug in plugins) { + for (PcsxrPlugin *plug in self.plugins) { NSString *description = [plug description]; [pluginMenu addItemWithTitle:description]; |
