Extracted Help URL key to constants, added plugin repository key

This commit is contained in:
Michael Starke
2017-12-04 15:00:04 +01:00
parent f9e761649f
commit fc496189b6
6 changed files with 20 additions and 4 deletions

View File

@@ -23,6 +23,7 @@
#import "MPAppDelegate.h"
#import "MPAutotypeDaemon.h"
#import "MPConstants.h"
#import "MPContextMenuHelper.h"
#import "MPDockTileHelper.h"
#import "MPDocument.h"
@@ -45,7 +46,7 @@
#import <Sparkle/Sparkle.h>
NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDidChangeStoredKeyFilesSettings";
NSString *const MPHelpURLKey = @"MPHelpURL";
@interface MPAppDelegate () {
@private
MPDockTileHelper *_dockTileHelper;
@@ -241,7 +242,7 @@ NSString *const MPHelpURLKey = @"MPHelpURL";
}
- (void)showHelp:(id)sender {
NSString *urlString = [[NSBundle mainBundle] infoDictionary][MPHelpURLKey];
NSString *urlString = NSBundle.mainBundle.infoDictionary[MPBundleHelpURLKey];
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:urlString]];
}

View File

@@ -25,10 +25,18 @@
#import <Foundation/Foundation.h>
/**
Common UTIs
*/
FOUNDATION_EXPORT NSString *const MPPasteBoardType;
FOUNDATION_EXPORT NSString *const MPKdbDocumentUTI;
FOUNDATION_EXPORT NSString *const MPKdbxDocumentUTI;
FOUNDATION_EXPORT NSString *const MPPluginUTI;
/**
Bundle keys
*/
FOUNDATION_EXPORT NSString *const MPBundleHelpURLKey; // MPHelpURL
FOUNDATION_EXPORT NSString *const MPBundlePluginRepositoryURLKey; // MPPluginRepositoryURL
#endif

View File

@@ -26,3 +26,7 @@ NSString *const MPPasteBoardType = @"com.hicknhack.macpass.pasteboard";
NSString *const MPKdbDocumentUTI = @"com.hicknhack.macpass.kdb";
NSString *const MPKdbxDocumentUTI = @"com.hicknhack.macpass.kdbx";
NSString *const MPPluginUTI = @"com.hicknhack.macpass.plugin";
NSString *const MPBundleHelpURLKey = @"MPHelpURL";
NSString *const MPBundlePluginRepositoryURLKey = @"MPPluginRepositoryURL"

View File

@@ -22,9 +22,11 @@
#import <Foundation/Foundation.h>
/* Notifications for loading plugins */
FOUNDATION_EXPORT NSString *const MPPluginHostWillLoadPlugin;
FOUNDATION_EXPORT NSString *const MPPluginHostDidLoadPlugin;
/* Keys used in info dictionary on notifications */
FOUNDATION_EXPORT NSString *const MPPluginHostPluginBundleIdentifiyerKey;
@class MPPlugin;

View File

@@ -38,7 +38,6 @@ NSString *const MPPluginHostDidLoadPlugin = @"comt.hicknhack.macpass.MPPluginHos
NSString *const MPPluginHostPluginBundleIdentifiyerKey = @"MPPluginHostPluginBundleIdentifiyerKey";
@interface MPPluginHost ()
@property (strong) NSMutableArray<MPPlugin __kindof *> *mutablePlugins;
@property (nonatomic) BOOL loadUnsecurePlugins;

View File

@@ -67,6 +67,8 @@
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>MPHelpURL</key>
<string>https://github.com/mstarke/MacPass</string>
<key>MPPluginRepositoryURL</key>
<string>file:///Users/michael/Projekte/GitHub/MacPassPlugins/plugins.json</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012-2017 HicknHack Software GmbH. All rights reserved.</string>
<key>NSMainNibFile</key>