mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 01:59:24 +00:00
Extended plugin settings
Plugins can be installed via drag and drop Plugins can be uninstalled via the remove button
This commit is contained in:
@@ -48,10 +48,16 @@ NSString *const kMPPluginFileExtension = @"mpplugin";
|
||||
|
||||
- (NSString *)version {
|
||||
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
|
||||
NSString *version;
|
||||
if(bundle) {
|
||||
version = bundle.infoDictionary[(NSString *)kCFBundleVersionKey];
|
||||
if(version) {
|
||||
NSString *humanVersion = bundle.infoDictionary[@"CFBundleShortVersionString"];
|
||||
NSString *version = bundle.infoDictionary[(NSString *)kCFBundleVersionKey];
|
||||
if(humanVersion && version) {
|
||||
return [NSString stringWithFormat:@"%@ (%@)", humanVersion, version];
|
||||
}
|
||||
else if(humanVersion) {
|
||||
return humanVersion;
|
||||
}
|
||||
else if(version) {
|
||||
return version;
|
||||
}
|
||||
}
|
||||
@@ -71,7 +77,7 @@ NSString *const kMPPluginFileExtension = @"mpplugin";
|
||||
NSLog(@"Deprecated initalizer. Use initWithPluginHost: instead!");
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wnonnull"
|
||||
self = [self initWithPluginHost:nil];
|
||||
self = [self initWithPluginHost:manager];
|
||||
#pragma cland diagnostic pop
|
||||
return self;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user