From 287356d93e58e1b6ffcb7165c858bca50b7d6f11 Mon Sep 17 00:00:00 2001 From: michael starke Date: Tue, 21 Nov 2017 17:24:16 +0100 Subject: [PATCH] fixed build warnings --- MacPass.xcodeproj/project.pbxproj | 2 ++ MacPass/Base.lproj/PluginSettings.xib | 14 +++++++------- MacPass/MPDocument+Search.m | 6 +++--- MacPass/MPDocument.m | 6 +++--- MacPass/MPEntrySearchContext.h | 9 ++++----- MacPass/nl.lproj/PluginSettings.strings | 24 ++++++++++++++++++++++++ 6 files changed, 43 insertions(+), 18 deletions(-) create mode 100644 MacPass/nl.lproj/PluginSettings.strings diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index a6a411f7..4753fbd3 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -643,6 +643,7 @@ 4C89F523182FB4740069C73C /* MPAutotypeCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAutotypeCommand.m; sourceTree = ""; }; 4C8B36A917A6ED4B005E1FF1 /* MPOutlineContextMenuDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineContextMenuDelegate.h; sourceTree = ""; }; 4C8B36AA17A6ED4B005E1FF1 /* MPOutlineContextMenuDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPOutlineContextMenuDelegate.m; sourceTree = ""; }; + 4C8C10061FC489D8003DDD5E /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/PluginSettings.strings; sourceTree = ""; }; 4C8DEAA11C314D2C00D24C32 /* MPTestAutotypeDelay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTestAutotypeDelay.m; sourceTree = ""; }; 4C8FB9FA1FC2D0EF003691AA /* MPPlugin_Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPPlugin_Private.h; sourceTree = ""; }; 4C93C5701FBDFEF700F36855 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/AutotypeCandidateSelectionView.strings; sourceTree = ""; }; @@ -1941,6 +1942,7 @@ 4C4161081F50333B003BC0AF /* es */, 4CA182761F96512800DD4A4A /* de */, 4C79B6411FB0562D008250D8 /* en */, + 4C8C10061FC489D8003DDD5E /* nl */, ); name = PluginSettings.xib; sourceTree = ""; diff --git a/MacPass/Base.lproj/PluginSettings.xib b/MacPass/Base.lproj/PluginSettings.xib index 3f05dd77..902177f3 100644 --- a/MacPass/Base.lproj/PluginSettings.xib +++ b/MacPass/Base.lproj/PluginSettings.xib @@ -32,7 +32,7 @@ - + @@ -103,17 +103,17 @@ - + - + - + - + @@ -144,7 +144,7 @@ - + @@ -198,7 +198,7 @@ - + diff --git a/MacPass/MPDocument+Search.m b/MacPass/MPDocument+Search.m index 7810d785..a9d71c60 100644 --- a/MacPass/MPDocument+Search.m +++ b/MacPass/MPDocument+Search.m @@ -42,9 +42,9 @@ NSString *const kMPDocumentSearchResultsKey = @"kMPDocumentSearchResul - (void)enterSearchWithContext:(MPEntrySearchContext *)context { /* the search context is loaded via defaults */ self.searchContext = context; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateSearch:) name:NSUndoManagerDidRedoChangeNotification object:self.undoManager]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateSearch:) name:NSUndoManagerDidUndoChangeNotification object:self.undoManager]; - [[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidEnterSearchNotification object:self]; + [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(updateSearch:) name:NSUndoManagerDidRedoChangeNotification object:self.undoManager]; + [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(updateSearch:) name:NSUndoManagerDidUndoChangeNotification object:self.undoManager]; + [NSNotificationCenter.defaultCenter postNotificationName:MPDocumentDidEnterSearchNotification object:self]; [self updateSearch:self]; } diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index fe11d10b..f7a4c022 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -638,7 +638,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou [self.undoManager enableUndoRegistration]; } [newEntry addToGroup:parent]; - [newEntry.undoManager setActionName:NSLocalizedString(@"NEW_ENTRY", "")]; + [newEntry.undoManager setActionName:NSLocalizedString(@"NEW_ENTRY", "Action name for a newly created entry")]; [NSNotificationCenter.defaultCenter postNotificationName:MPDocumentDidAddEntryNotification object:self userInfo:@{ MPDocumentEntryKey: newEntry }]; @@ -663,7 +663,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou [self.undoManager enableUndoRegistration]; } [newGroup addToGroup:parent]; - [newGroup.undoManager setActionName:NSLocalizedString(@"NEW_GROUP", "")]; + [newGroup.undoManager setActionName:NSLocalizedString(@"NEW_GROUP", "Action name for a newly created group")]; [NSNotificationCenter.defaultCenter postNotificationName:MPDocumentDidAddGroupNotification object:self userInfo:@{ MPDocumentGroupKey : newGroup }]; @@ -701,7 +701,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou [self.undoManager setActionName:permanent ? NSLocalizedString(@"DELETE_GROUP", "Delete Group") : NSLocalizedString(@"TRASH_GROUP", "Move Group to Trash")]; } else if(node.asEntry) { - [self.undoManager setActionName:permanent ? NSLocalizedString(@"DELETE_ENTRY", "") : NSLocalizedString(@"TRASH_ENTRY", "Move Entry to Trash")]; + [self.undoManager setActionName:permanent ? NSLocalizedString(@"DELETE_ENTRY", "Delete Entry") : NSLocalizedString(@"TRASH_ENTRY", "Move Entry to Trash")]; } } diff --git a/MacPass/MPEntrySearchContext.h b/MacPass/MPEntrySearchContext.h index ee72df69..cf327cda 100644 --- a/MacPass/MPEntrySearchContext.h +++ b/MacPass/MPEntrySearchContext.h @@ -49,23 +49,22 @@ typedef NS_OPTIONS(NSUInteger, MPEntrySearchFlags) { /* Wrap search criteria to be able to store them */ @interface MPEntrySearchContext : NSObject - /** * Returns a default search context initialized with sane values. * * @return The default search context */ -+ (instancetype)defaultContext; +@property (readonly, class) MPEntrySearchContext *defaultContext; /** * Returns the search context using the users preferences. If none are found, a default context is created * * @return Search context configured to the users data. If nothing is configures, defaultContext is used */ -+ (instancetype)userContext; - -- (instancetype)initWithString:(NSString *)searchString flags:(MPEntrySearchFlags)flags; +@property (readonly, class) MPEntrySearchContext *userContext; @property (nonatomic, assign) NSInteger searchFlags; @property (nonatomic, copy) NSString *searchString; +- (instancetype)initWithString:(NSString *)searchString flags:(MPEntrySearchFlags)flags; + @end diff --git a/MacPass/nl.lproj/PluginSettings.strings b/MacPass/nl.lproj/PluginSettings.strings new file mode 100644 index 00000000..3d95770d --- /dev/null +++ b/MacPass/nl.lproj/PluginSettings.strings @@ -0,0 +1,24 @@ + +/* Class = "NSTextFieldCell"; title = "If enabled, only properly signed Plugins will be loaded. Keep in mind, that Plugins have full access to your data! Changes take affect on restart."; ObjectID = "2bX-8S-9XM"; */ +"2bX-8S-9XM.title" = "If enabled, only properly signed Plugins will be loaded. Keep in mind, that Plugins have full access to your data! Changes take affect on restart."; + +/* Class = "NSButtonCell"; title = "Load unsecure Plugins"; ObjectID = "C4B-6z-ZqX"; */ +"C4B-6z-ZqX.title" = "Load unsecure Plugins"; + +/* Class = "NSTextFieldCell"; title = "Plugin Settings Info"; ObjectID = "OOr-SW-jZb"; */ +"OOr-SW-jZb.title" = "Plugin Settings Info"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "STt-PQ-Szr"; */ +"STt-PQ-Szr.title" = "Text Cell"; + +/* Class = "NSTextFieldCell"; title = "Table View Cell"; ObjectID = "fug-79-n9g"; */ +"fug-79-n9g.title" = "Table View Cell"; + +/* Class = "NSButtonCell"; title = "Browse Plugins…"; ObjectID = "sqO-8H-n1y"; */ +"sqO-8H-n1y.title" = "Browse Plugins…"; + +/* Class = "NSBox"; title = "Box"; ObjectID = "vBs-Ga-aq0"; */ +"vBs-Ga-aq0.title" = "Box"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "yuK-qH-jxx"; */ +"yuK-qH-jxx.title" = "Label";