Removed unloading code as it seems to be unsafe

Signed-off-by: michael starke <michael.starke@hicknhack-software.com>
This commit is contained in:
michael starke
2015-11-20 16:34:14 +01:00
parent c7a0cfabd1
commit 8babca8b8d
2 changed files with 1 additions and 58 deletions

View File

@@ -24,33 +24,6 @@ NSString *const _kMPPluginTableNameColumn = @"Name";
@implementation MPPluginSettingsController
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if(self) {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(_didChangePlugins:)
name:MPPluginManagerWillLoadPlugin
object:[MPPluginManager sharedManager]];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(_didChangePlugins:)
name:MPPluginManagerDidLoadPlugin
object:[MPPluginManager sharedManager]];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(_didChangePlugins:)
name:MPPluginManagerWillUnloadPlugin
object:[MPPluginManager sharedManager]];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(_didChangePlugins:)
name:MPPluginManagerDidUnloadPlugin
object:[MPPluginManager sharedManager]];
}
return self;
}
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (NSString *)nibName {
return @"PluginSettings";
}
@@ -121,11 +94,4 @@ NSString *const _kMPPluginTableNameColumn = @"Name";
[self showSettingsForPlugin:[self pluginForRow:table.selectedRow]];
}
- (void)_didChangePlugins:(NSNotification *)notification {
/* better way? */
[self.pluginTableView deselectAll:self];
[self.pluginTableView reloadData];
}
@end