From 8a2880789bf1e57f8abcee0ded36aad7c3aaa4ed Mon Sep 17 00:00:00 2001 From: michael starke Date: Wed, 2 Dec 2015 19:02:24 +0100 Subject: [PATCH] Using current Version of HNHUi Signed-off-by: michael starke --- Cartfile | 2 +- Cartfile.resolved | 2 +- MacPass.xcodeproj/project.pbxproj | 16 +++------ MacPass/MPDatabaseSettingsWindowController.h | 4 +-- MacPass/MPPasswordEditWindowController.h | 5 +-- MacPass/MPPluginHost.m | 4 +-- MacPass/MPSheetWindowController.h | 33 ------------------ MacPass/MPSheetWindowController.m | 36 -------------------- 8 files changed, 13 insertions(+), 89 deletions(-) delete mode 100644 MacPass/MPSheetWindowController.h delete mode 100644 MacPass/MPSheetWindowController.m diff --git a/Cartfile b/Cartfile index 2fabf84c..bd9bc7f1 100644 --- a/Cartfile +++ b/Cartfile @@ -1,3 +1,3 @@ github "sparkle-project/Sparkle" "1.12.0b1" github "mstarke/KeePassKit" ~> 1.0 -github "mstarke/HNHUi" "a0606740ad2db9099c691ad9364ff3da67959b8e" \ No newline at end of file +github "mstarke/HNHUi" ~> 1.0 \ No newline at end of file diff --git a/Cartfile.resolved b/Cartfile.resolved index 2da4da1f..39fcb6d9 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,3 +1,3 @@ -github "mstarke/HNHUi" "a0606740ad2db9099c691ad9364ff3da67959b8e" +github "mstarke/HNHUi" "1.0.1" github "mstarke/KeePassKit" "1.0" github "sparkle-project/Sparkle" "1.12.0b1" diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index b9a4a847..7a6880ba 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -18,7 +18,6 @@ 4C0C59F118B17F10009C7B76 /* DDHotKeyUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C0C59EF18B17F10009C7B76 /* DDHotKeyUtilities.m */; }; 4C0DBEF51BF508DE00F9B287 /* PluginSettings.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C0DBEF71BF508DE00F9B287 /* PluginSettings.xib */; }; 4C0DD6C618B2A44700FCB193 /* AutotypeCandidateSelectionWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C0DD6C518B2A44700FCB193 /* AutotypeCandidateSelectionWindow.xib */; }; - 4C0F647817B6B65E00D9522A /* MPSheetWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C0F647717B6B65E00D9522A /* MPSheetWindowController.m */; }; 4C0F647B17B6BC9C00D9522A /* MPSavePanelAccessoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C0F647A17B6BC9C00D9522A /* MPSavePanelAccessoryViewController.m */; }; 4C10207F1B750E2F00BFCD59 /* MPTestAutotype.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C10207E1B750E2F00BFCD59 /* MPTestAutotype.m */; }; 4C10412C178CDD44001B5239 /* NSDate+Humanized.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C10412B178CDD44001B5239 /* NSDate+Humanized.m */; }; @@ -163,10 +162,8 @@ 4C7B63751C0CB51F00D7038C /* TTTImageTransformers.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C7B636C1C0CB51F00D7038C /* TTTImageTransformers.m */; }; 4C7B63761C0CB51F00D7038C /* TTTJSONTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C7B636E1C0CB51F00D7038C /* TTTJSONTransformer.m */; }; 4C7B63771C0CB51F00D7038C /* TTTStringTransformers.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C7B63701C0CB51F00D7038C /* TTTStringTransformers.m */; }; - 4C7B637B1C0CB55600D7038C /* HNHUi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7B63781C0CB55600D7038C /* HNHUi.framework */; }; 4C7B637C1C0CB55600D7038C /* KeePassKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7B63791C0CB55600D7038C /* KeePassKit.framework */; }; 4C7B637D1C0CB55600D7038C /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7B637A1C0CB55600D7038C /* Sparkle.framework */; }; - 4C7B637E1C0CB57300D7038C /* HNHUi.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C7B63781C0CB55600D7038C /* HNHUi.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 4C7B637F1C0CB57300D7038C /* KeePassKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C7B63791C0CB55600D7038C /* KeePassKit.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 4C7B63801C0CB57300D7038C /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C7B637A1C0CB55600D7038C /* Sparkle.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 4C7BD07619FE94C900C7AA5C /* MacPassImages.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4C7BD07519FE94C900C7AA5C /* MacPassImages.xcassets */; }; @@ -199,6 +196,7 @@ 4CBA2ABA17074C07006D8139 /* MPSettingsHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CBA2AB917074C07006D8139 /* MPSettingsHelper.m */; }; 4CC0D2CE17974A47000B4BDA /* MPCustomFieldTableViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC0D2CD17974A47000B4BDA /* MPCustomFieldTableViewDelegate.m */; }; 4CC0D2D117974A5A000B4BDA /* MPAttachmentTableViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC0D2D017974A5A000B4BDA /* MPAttachmentTableViewDelegate.m */; }; + 4CC281891C0F675B00B9174D /* HNHUi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC281881C0F675B00B9174D /* HNHUi.framework */; }; 4CC6DB7A17D23719002C6091 /* KPKNode+IconImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6DB7917D23719002C6091 /* KPKNode+IconImage.m */; }; 4CCA8E9B18D91ED9001A6754 /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CCA8E9A18D91ED9001A6754 /* Quartz.framework */; }; 4CCEDE2A179F203B008402BE /* MPOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCEDE29179F203B008402BE /* MPOutlineView.m */; }; @@ -257,7 +255,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 4C7B637E1C0CB57300D7038C /* HNHUi.framework in CopyFiles */, 4C7B637F1C0CB57300D7038C /* KeePassKit.framework in CopyFiles */, 4C7B63801C0CB57300D7038C /* Sparkle.framework in CopyFiles */, ); @@ -283,8 +280,6 @@ 4C0C59F018B17F10009C7B76 /* DDHotKeyUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = DDHotKeyUtilities.h; path = DDHotKey/DDHotKeyUtilities.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 4C0DBEF61BF508DE00F9B287 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/PluginSettings.xib; sourceTree = ""; }; 4C0DD6C518B2A44700FCB193 /* AutotypeCandidateSelectionWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AutotypeCandidateSelectionWindow.xib; sourceTree = ""; }; - 4C0F647617B6B65E00D9522A /* MPSheetWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSheetWindowController.h; sourceTree = ""; }; - 4C0F647717B6B65E00D9522A /* MPSheetWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSheetWindowController.m; sourceTree = ""; }; 4C0F647917B6BC9C00D9522A /* MPSavePanelAccessoryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSavePanelAccessoryViewController.h; sourceTree = ""; }; 4C0F647A17B6BC9C00D9522A /* MPSavePanelAccessoryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSavePanelAccessoryViewController.m; sourceTree = ""; }; 4C10207E1B750E2F00BFCD59 /* MPTestAutotype.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTestAutotype.m; sourceTree = ""; }; @@ -511,7 +506,6 @@ 4C7B636E1C0CB51F00D7038C /* TTTJSONTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTTJSONTransformer.m; sourceTree = ""; }; 4C7B636F1C0CB51F00D7038C /* TTTStringTransformers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTTStringTransformers.h; sourceTree = ""; }; 4C7B63701C0CB51F00D7038C /* TTTStringTransformers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTTStringTransformers.m; sourceTree = ""; }; - 4C7B63781C0CB55600D7038C /* HNHUi.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HNHUi.framework; path = Carthage/Build/Mac/HNHUi.framework; sourceTree = ""; }; 4C7B63791C0CB55600D7038C /* KeePassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = KeePassKit.framework; path = Carthage/Build/Mac/KeePassKit.framework; sourceTree = ""; }; 4C7B637A1C0CB55600D7038C /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Carthage/Build/Mac/Sparkle.framework; sourceTree = ""; }; 4C7BD07519FE94C900C7AA5C /* MacPassImages.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = MacPassImages.xcassets; sourceTree = ""; }; @@ -570,6 +564,7 @@ 4CC0D2CD17974A47000B4BDA /* MPCustomFieldTableViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCustomFieldTableViewDelegate.m; sourceTree = ""; }; 4CC0D2CF17974A5A000B4BDA /* MPAttachmentTableViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAttachmentTableViewDelegate.h; sourceTree = ""; }; 4CC0D2D017974A5A000B4BDA /* MPAttachmentTableViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAttachmentTableViewDelegate.m; sourceTree = ""; }; + 4CC281881C0F675B00B9174D /* HNHUi.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HNHUi.framework; path = Carthage/Build/Mac/HNHUi.framework; sourceTree = ""; }; 4CC6DB7817D23719002C6091 /* KPKNode+IconImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KPKNode+IconImage.h"; sourceTree = ""; }; 4CC6DB7917D23719002C6091 /* KPKNode+IconImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KPKNode+IconImage.m"; sourceTree = ""; }; 4CCA7EEC1797866F00B0B55E /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/GeneralSettings.strings; sourceTree = ""; }; @@ -734,11 +729,11 @@ 4CCA8E9B18D91ED9001A6754 /* Quartz.framework in Frameworks */, 4C00E33B17D8FAC100F37192 /* Carbon.framework in Frameworks */, 4CAD748E15B88AC100104512 /* libz.dylib in Frameworks */, - 4C7B637B1C0CB55600D7038C /* HNHUi.framework in Frameworks */, 4C7B637C1C0CB55600D7038C /* KeePassKit.framework in Frameworks */, 4CAD748C15B889B700104512 /* Security.framework in Frameworks */, 4C77E36715B84A240093A587 /* Cocoa.framework in Frameworks */, 4C7B637D1C0CB55600D7038C /* Sparkle.framework in Frameworks */, + 4CC281891C0F675B00B9174D /* HNHUi.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1057,7 +1052,7 @@ 4C77E35715B84A240093A587 = { isa = PBXGroup; children = ( - 4C7B63781C0CB55600D7038C /* HNHUi.framework */, + 4CC281881C0F675B00B9174D /* HNHUi.framework */, 4C7B63791C0CB55600D7038C /* KeePassKit.framework */, 4C7B637A1C0CB55600D7038C /* Sparkle.framework */, 4C7B63611C0CB51F00D7038C /* TransformerKit */, @@ -1272,8 +1267,6 @@ 4CE8247016E2E96500573141 /* Window Controller */ = { isa = PBXGroup; children = ( - 4C0F647617B6B65E00D9522A /* MPSheetWindowController.h */, - 4C0F647717B6B65E00D9522A /* MPSheetWindowController.m */, 4CA0B2FA15BCAF8600654E32 /* MPSettingsWindowController.h */, 4CA0B2FB15BCAF8600654E32 /* MPSettingsWindowController.m */, 4C83814015BF4677001AE468 /* MPDocumentWindowController.h */, @@ -1708,7 +1701,6 @@ 4CA08DA017A831B200A6544B /* MPAddEntryContextMenuDelegate.m in Sources */, 4CE3E62617AB0D2D00D9E4B4 /* MPAttachmentTableDataSource.m in Sources */, 4C0728BD17B5B7F7005A7DD9 /* MPPasswordEditWindowController.m in Sources */, - 4C0F647817B6B65E00D9522A /* MPSheetWindowController.m in Sources */, 4C0F647B17B6BC9C00D9522A /* MPSavePanelAccessoryViewController.m in Sources */, 4C57AE1417BA422B00CA4F34 /* MPSegmentedContextCell.m in Sources */, 4CE2961518429AA5005F01CE /* MPAutotypeKeyPress.m in Sources */, diff --git a/MacPass/MPDatabaseSettingsWindowController.h b/MacPass/MPDatabaseSettingsWindowController.h index 6ad5ad40..ac6af623 100644 --- a/MacPass/MPDatabaseSettingsWindowController.h +++ b/MacPass/MPDatabaseSettingsWindowController.h @@ -7,7 +7,7 @@ // #import -#import "MPSheetWindowController.h" +#import typedef NS_ENUM(NSUInteger, MPDatabaseSettingsTab) { MPDatabaseSettingsTabGeneral, @@ -18,7 +18,7 @@ typedef NS_ENUM(NSUInteger, MPDatabaseSettingsTab) { @class MPDocument; @class HNHRoundedTextField; -@interface MPDatabaseSettingsWindowController : MPSheetWindowController +@interface MPDatabaseSettingsWindowController : HNHUISheetWindowController @property (weak) IBOutlet NSTabView *sectionTabView; diff --git a/MacPass/MPPasswordEditWindowController.h b/MacPass/MPPasswordEditWindowController.h index 84764f53..a4d1ac17 100644 --- a/MacPass/MPPasswordEditWindowController.h +++ b/MacPass/MPPasswordEditWindowController.h @@ -7,7 +7,8 @@ // #import -#import "MPSheetWindowController.h" +#import + @class MPDocument; @class HNHUIRoundedSecureTextField; @@ -22,7 +23,7 @@ @end -@interface MPPasswordEditWindowController : MPSheetWindowController +@interface MPPasswordEditWindowController : HNHUISheetWindowController @property (weak) IBOutlet HNHUIRoundedSecureTextField *passwordTextField; @property (weak) IBOutlet HNHUIRoundedSecureTextField *passwordRepeatTextField; diff --git a/MacPass/MPPluginHost.m b/MacPass/MPPluginHost.m index 9abb7b80..c3a7684a 100644 --- a/MacPass/MPPluginHost.m +++ b/MacPass/MPPluginHost.m @@ -32,7 +32,7 @@ static MPPluginHost *_instance; return self; } -- (NSArray *)filteredEntriesUsingBlock:(NodeMatchBlock)matchBlock { +- (NSArray *)filteredEntriesUsingBlock:(NodeMatchBlock)matchBlock { NSArray *currentDocuments = [[NSDocumentController sharedDocumentController] documents]; NSMutableArray *entries = [[NSMutableArray alloc] initWithCapacity:200]; for(MPDocument *document in currentDocuments) { @@ -44,7 +44,7 @@ static MPPluginHost *_instance; return [[NSArray alloc] initWithArray:[entries filteredArrayUsingPredicate:predicate] copyItems:YES]; } -- (NSArray *)filteredGroupsUsingBlock:(NodeMatchBlock)matchBlock { +- (NSArray *)filteredGroupsUsingBlock:(NodeMatchBlock)matchBlock { NSAssert(NO, @"Not implemented"); return nil; } diff --git a/MacPass/MPSheetWindowController.h b/MacPass/MPSheetWindowController.h deleted file mode 100644 index 2f13e568..00000000 --- a/MacPass/MPSheetWindowController.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// MPSheetWindowController.h -// MacPass -// -// Created by Michael Starke on 10.08.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// -// Based on -// DESSheetController by Peter Nix (pnix@digitalenginesoftware.com) -// - -#import -/** - * Generic Windowcontroller to be used for sheets - * Subclasses are able to initialize their views within updateView - * and thus are able to reset themselves before being displayed as sheets - */ -@interface MPSheetWindowController : NSWindowController -/** - * Flag to indicate that the view might need resetting. - * The default implementation of dismiss sheet and the - * designate initializer both set the value to YES - */ -@property (nonatomic, assign) BOOL isDirty; -/** - * This method is a entry point to ensure updated ui before being presented - * The method is called every time the window message is sent to the controller - */ -- (void)updateView; - -- (void)dismissSheet:(NSInteger)returnCode; - -@end diff --git a/MacPass/MPSheetWindowController.m b/MacPass/MPSheetWindowController.m deleted file mode 100644 index 67322f4b..00000000 --- a/MacPass/MPSheetWindowController.m +++ /dev/null @@ -1,36 +0,0 @@ -// -// MPSheetWindowController.m -// MacPass -// -// Created by Michael Starke on 10.08.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "MPSheetWindowController.h" - -@implementation MPSheetWindowController - -- (id)initWithWindow:(NSWindow *)window { - self = [super initWithWindow:window]; - if(self) { - _isDirty = YES; - } - return self; -} - -- (NSWindow *)window { - NSWindow *window = super.window; - [self updateView]; - return window; -} - -- (void)updateView { - // do nothing -} - -- (void)dismissSheet:(NSInteger)returnCode { - self.isDirty = YES; - [[super window] orderOut:self]; - [NSApp endSheet:[super window] returnCode:returnCode]; -} -@end