From d7f6bcc6c31cf6446d0e0b0beb40fdad4a66977d Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Wed, 25 Mar 2020 21:03:28 +0100 Subject: [PATCH 1/2] Tags are now search case insensitive (fixes #1048) The issue was that the tags string array was not correctly searched case insensitive via the predicate CONTAINS --- MacPass.xcodeproj/project.pbxproj | 18 ++++++--- .../AutotypeCandidateSelectionView.xib | 38 ++++++++++++------- MacPass/Base.lproj/PluginPreferences.xib | 16 ++++---- MacPass/KPKEntry+MPTags.h | 22 +++++++++++ MacPass/KPKEntry+MPTags.m | 24 ++++++++++++ ...AutotypeCandidateSelectionViewController.m | 9 ++--- MacPass/MPDocument+Search.m | 12 +++--- ...elCellView.h => MPExtendedTableCellView.h} | 2 +- ...elCellView.m => MPExtendedTableCellView.m} | 4 +- MacPass/MPPluginPreferencesController.m | 4 +- MacPass/NSRunningApplication+MPAdditions.m | 18 ++++++++- 11 files changed, 123 insertions(+), 44 deletions(-) create mode 100644 MacPass/KPKEntry+MPTags.h create mode 100644 MacPass/KPKEntry+MPTags.m rename MacPass/{MPPluginTabelCellView.h => MPExtendedTableCellView.h} (94%) rename MacPass/{MPPluginTabelCellView.m => MPExtendedTableCellView.m} (94%) diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index 48534071d..b0775cdad 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -115,6 +115,7 @@ 4C45FB30178E0CE20010007D /* MPTestDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C45FB2F178E0CE20010007D /* MPTestDocument.m */; }; 4C46B88517063A070046109A /* NSString+MPPasswordCreation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C46B88417063A070046109A /* NSString+MPPasswordCreation.m */; }; 4C473A8718AFD85B0073FD2E /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C473A8518AFD7250073FD2E /* XCTest.framework */; }; + 4C49CFD624252389004092E7 /* KPKEntry+MPTags.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C49CFD524252389004092E7 /* KPKEntry+MPTags.m */; }; 4C4A100F176286FD00BBF2CA /* MPTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4A100E176286FD00BBF2CA /* MPTableView.m */; }; 4C4B728518E4B9B400A1A5D5 /* MPDockTileHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4B728418E4B9B400A1A5D5 /* MPDockTileHelper.m */; }; 4C4B7EE917A45EC6000234C7 /* MPDatePickingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4B7EE717A45EC5000234C7 /* MPDatePickingViewController.m */; }; @@ -277,7 +278,7 @@ 4CF29BF417879D0000851B60 /* 26_FileSaveTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CF29BF317879D0000851B60 /* 26_FileSaveTemplate.pdf */; }; 4CF5BE6D1BF33E3000048505 /* NSApplication+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CF5BE6C1BF33E3000048505 /* NSApplication+MPAdditions.m */; }; 4CF6653820E67A140008A25C /* PluginDataView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CF6653A20E67A140008A25C /* PluginDataView.xib */; }; - 4CF6C3021FBF39BF0055AD03 /* MPPluginTabelCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CF6C3011FBF39BF0055AD03 /* MPPluginTabelCellView.m */; }; + 4CF6C3021FBF39BF0055AD03 /* MPExtendedTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CF6C3011FBF39BF0055AD03 /* MPExtendedTableCellView.m */; }; 4CF6C711176F4533007A811D /* MPStringLengthValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CF6C710176F4533007A811D /* MPStringLengthValueTransformer.m */; }; 4CF78064176E75AD0032EE71 /* MPIntegrationPreferencesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CF78063176E75AD0032EE71 /* MPIntegrationPreferencesController.m */; }; 4CFB18E418A17FA20097A34B /* MPUpdatePreferencesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFB18E318A17FA20097A34B /* MPUpdatePreferencesController.m */; }; @@ -528,6 +529,8 @@ 4C46B88317063A070046109A /* NSString+MPPasswordCreation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+MPPasswordCreation.h"; sourceTree = ""; }; 4C46B88417063A070046109A /* NSString+MPPasswordCreation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+MPPasswordCreation.m"; sourceTree = ""; }; 4C473A8518AFD7250073FD2E /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 4C49CFD424252389004092E7 /* KPKEntry+MPTags.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "KPKEntry+MPTags.h"; sourceTree = ""; }; + 4C49CFD524252389004092E7 /* KPKEntry+MPTags.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "KPKEntry+MPTags.m"; sourceTree = ""; }; 4C4A100D176286FD00BBF2CA /* MPTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTableView.h; sourceTree = ""; }; 4C4A100E176286FD00BBF2CA /* MPTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTableView.m; sourceTree = ""; }; 4C4B2ED122D8CA6100EB6BFD /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/PluginRepositoryBrowserView.strings; sourceTree = ""; }; @@ -854,8 +857,8 @@ 4CF5BE6C1BF33E3000048505 /* NSApplication+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSApplication+MPAdditions.m"; sourceTree = ""; }; 4CF6653920E67A140008A25C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/PluginDataView.xib; sourceTree = ""; }; 4CF6653E20E67A1A0008A25C /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/PluginDataView.strings; sourceTree = ""; }; - 4CF6C3001FBF39BF0055AD03 /* MPPluginTabelCellView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPPluginTabelCellView.h; sourceTree = ""; }; - 4CF6C3011FBF39BF0055AD03 /* MPPluginTabelCellView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPPluginTabelCellView.m; sourceTree = ""; }; + 4CF6C3001FBF39BF0055AD03 /* MPExtendedTableCellView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPExtendedTableCellView.h; sourceTree = ""; }; + 4CF6C3011FBF39BF0055AD03 /* MPExtendedTableCellView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPExtendedTableCellView.m; sourceTree = ""; }; 4CF6C70F176F4533007A811D /* MPStringLengthValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStringLengthValueTransformer.h; sourceTree = ""; }; 4CF6C710176F4533007A811D /* MPStringLengthValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPStringLengthValueTransformer.m; sourceTree = ""; }; 4CF78062176E75AD0032EE71 /* MPIntegrationPreferencesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPIntegrationPreferencesController.h; sourceTree = ""; }; @@ -1095,8 +1098,8 @@ 4CCEDE29179F203B008402BE /* MPOutlineView.m */, 4CE082C11F6FCD2A0034FF56 /* MPCollectionView.h */, 4CE082C21F6FCD2A0034FF56 /* MPCollectionView.m */, - 4CF6C3001FBF39BF0055AD03 /* MPPluginTabelCellView.h */, - 4CF6C3011FBF39BF0055AD03 /* MPPluginTabelCellView.m */, + 4CF6C3001FBF39BF0055AD03 /* MPExtendedTableCellView.h */, + 4CF6C3011FBF39BF0055AD03 /* MPExtendedTableCellView.m */, 4C0F043E2147A6FA000B8568 /* MPCustomFieldTableView.h */, 4C0F043F2147A6FA000B8568 /* MPCustomFieldTableView.m */, 4C370EFC215B76CB00703AAE /* MPOutlineTableCellView.h */, @@ -1142,6 +1145,8 @@ 3C0CDECE21CFEDD200B2A10B /* NSTextView+MPTouchBarExtension.m */, 4C2057F523CF3E9A00C731EC /* NSRunningApplication+MPAdditions.h */, 4C2057F623CF3E9A00C731EC /* NSRunningApplication+MPAdditions.m */, + 4C49CFD424252389004092E7 /* KPKEntry+MPTags.h */, + 4C49CFD524252389004092E7 /* KPKEntry+MPTags.m */, ); name = Categories; sourceTree = ""; @@ -2040,6 +2045,7 @@ 4C735FC02035FCBF00708D53 /* MPPluginEntryActionContext.m in Sources */, 4C61EA0316D2FD0800AC519E /* MPOutlineViewController.m in Sources */, 4C65C79C16DD283900E32CFF /* MPToolbarButton.m in Sources */, + 4C49CFD624252389004092E7 /* KPKEntry+MPTags.m in Sources */, 4C431BCD16E2A82800700A81 /* MPPasteBoardController.m in Sources */, 4C6AEEF91A043E2B00CA2420 /* MPDocumentController.m in Sources */, 4C370EFE215B76CB00703AAE /* MPOutlineTableCellView.m in Sources */, @@ -2097,7 +2103,7 @@ 4C5FE9AE17843CE20001D5A8 /* MPSelectedAttachmentTableCellView.m in Sources */, 4CC59C2721AF0893005E8D6B /* MPPathControl.m in Sources */, 4C3666411787327E00B249F1 /* MPDocument+Attachments.m in Sources */, - 4CF6C3021FBF39BF0055AD03 /* MPPluginTabelCellView.m in Sources */, + 4CF6C3021FBF39BF0055AD03 /* MPExtendedTableCellView.m in Sources */, 4C10412C178CDD44001B5239 /* NSDate+Humanized.m in Sources */, 4C58A4A32192EC1600B13370 /* NSIndexPath+MPAdditions.m in Sources */, 4C2F17A21FD69BCA0097418D /* MPUserNotificationCenterDelegate.m in Sources */, diff --git a/MacPass/Base.lproj/AutotypeCandidateSelectionView.xib b/MacPass/Base.lproj/AutotypeCandidateSelectionView.xib index 116456d7d..f45c411bd 100644 --- a/MacPass/Base.lproj/AutotypeCandidateSelectionView.xib +++ b/MacPass/Base.lproj/AutotypeCandidateSelectionView.xib @@ -1,8 +1,8 @@ - + - + @@ -20,13 +20,13 @@ - + - + - - + + @@ -45,12 +45,12 @@ - + - + @@ -58,8 +58,16 @@ - - + + + + + + + + + + @@ -67,14 +75,18 @@ - + + + + + @@ -100,7 +112,7 @@ - + @@ -148,7 +160,7 @@ DQ - + diff --git a/MacPass/Base.lproj/PluginPreferences.xib b/MacPass/Base.lproj/PluginPreferences.xib index 768ca2cad..701231daf 100644 --- a/MacPass/Base.lproj/PluginPreferences.xib +++ b/MacPass/Base.lproj/PluginPreferences.xib @@ -1,8 +1,8 @@ - + - + @@ -34,7 +34,7 @@ - + @@ -80,7 +80,7 @@ - + @@ -100,12 +100,12 @@ - + - + @@ -155,7 +155,7 @@ - + @@ -168,7 +168,7 @@