Fixed broken display of custom icons

This commit is contained in:
michael starke
2016-03-08 19:15:28 +01:00
parent d408c925bf
commit 223a368cce
5 changed files with 11 additions and 9 deletions

View File

@@ -1,3 +1,3 @@
github "sparkle-project/Sparkle" ~> 1.13.1 github "sparkle-project/Sparkle" ~> 1.13.1
github "mstarke/KeePassKit" "d8710185ff3c4f21c12f4c10eb68d570179c54ee" github "mstarke/KeePassKit" "4406caed2050c0b5be911d66589647c205660f32"
github "mstarke/HNHUi" ~> 1.0 github "mstarke/HNHUi" ~> 1.0

View File

@@ -1,3 +1,3 @@
github "mstarke/HNHUi" "1.0.1" github "mstarke/HNHUi" "1.0.1"
github "mstarke/KeePassKit" "d8710185ff3c4f21c12f4c10eb68d570179c54ee" github "mstarke/KeePassKit" "4406caed2050c0b5be911d66589647c205660f32"
github "sparkle-project/Sparkle" "1.13.1" github "sparkle-project/Sparkle" "1.13.1"

View File

@@ -32,12 +32,8 @@
const BOOL isGroup = [self isKindOfClass:[KPKGroup class]]; const BOOL isGroup = [self isKindOfClass:[KPKGroup class]];
return [MPIconHelper icon:(isGroup ? MPIconExpiredGroup : MPIconExpiredEntry)]; return [MPIconHelper icon:(isGroup ? MPIconExpiredGroup : MPIconExpiredEntry)];
} }
if(self.icon) {
if(self.iconUUID) { return self.icon.image;
KPKIcon *icon;// = [self.tree.metaData findIcon:self.iconUUID];
if(icon && icon.image) {
return icon.image;
}
} }
return [MPIconHelper icon:(MPIconType)self.iconId]; return [MPIconHelper icon:(MPIconType)self.iconId];
} }

View File

@@ -26,10 +26,12 @@
} }
- (void)forwardInvocation:(NSInvocation *)invocation { - (void)forwardInvocation:(NSInvocation *)invocation {
NSLog(@"forwardInvocation: %@", NSStringFromSelector(invocation.selector));
[invocation invokeWithTarget:self.entry]; [invocation invokeWithTarget:self.entry];
} }
- (NSMethodSignature *)methodSignatureForSelector:(SEL)sel { - (NSMethodSignature *)methodSignatureForSelector:(SEL)sel {
NSLog(@"methodSignatureForSelector %@", NSStringFromSelector(sel));
return [self.entry methodSignatureForSelector:sel]; return [self.entry methodSignatureForSelector:sel];
} }

View File

@@ -39,8 +39,12 @@
- (void)testMethodForwarding { - (void)testMethodForwarding {
NSString *newPassword = @"new password"; NSString *newPassword = @"new password";
NSString *newKeystrokes = @"{ENTER 3}";
[((id)self.proxy) setPassword:newPassword]; [((id)self.proxy) setPassword:newPassword];
XCTAssertEqualObjects(self.entry.password, newPassword, @"Proxy has forwared password setting to KPKEntry!"); XCTAssertEqualObjects(self.entry.password, newPassword, @"Proxy sets password on entry!");
[((id)self.proxy) autotype].defaultKeystrokeSequence= newKeystrokes;
XCTAssertEqualObjects(self.entry.autotype.defaultKeystrokeSequence, newKeystrokes, @"Proxy sets default keystroke sequence on entry autotype!");
} }
@end @end