diff --git a/MacPass/IconSelection.xib b/MacPass/IconSelection.xib
index c663fbbf..6c098adf 100644
--- a/MacPass/IconSelection.xib
+++ b/MacPass/IconSelection.xib
@@ -12,6 +12,8 @@
IBNSLayoutConstraint
+ NSButton
+ NSButtonCell
NSCollectionView
NSCollectionViewItem
NSCustomObject
@@ -42,6 +44,35 @@
268
+
268
@@ -53,7 +84,7 @@
274
- {220, 258}
+ {243, 238}
@@ -63,13 +94,13 @@
0
0
-
+
6
System
- controlBackgroundColor
-
+ windowBackgroundColor
+
3
- MC42NjY2NjY2NjY3AA
+ MC41AA
@@ -77,7 +108,7 @@
0
- {{1, 1}, {220, 258}}
+ {{1, 1}, {243, 238}}
@@ -86,10 +117,13 @@
6
System
- controlColor
-
+ controlBackgroundColor
+
+ 3
+ MC42NjY2NjY2NjY3AA
+
- 4
+ 2
@@ -111,6 +145,7 @@
{{1, 144}, {233, 15}}
+
_NS:91
NO
1
@@ -119,7 +154,7 @@
0.63157892227172852
- {{8, 6}, {222, 260}}
+ {{20, 50}, {245, 240}}
@@ -133,10 +168,10 @@
1
- {237, 274}
+ {285, 310}
-
+
NSView
@@ -154,6 +189,7 @@
{48, 48}
+
_NS:9
YES
@@ -161,7 +197,7 @@
33554432
_NS:9
0
- 0
+ 3
2
NO
@@ -179,6 +215,14 @@
56
+
+
+ iconCollectionView
+
+
+
+ 77
+
itemPrototype
@@ -203,6 +247,22 @@
74
+
+
+ value: representedObject
+
+
+
+
+
+ value: representedObject
+ value
+ representedObject
+ 2
+
+
+ 82
+
@@ -235,70 +295,103 @@
-
-
- 6
- 0
-
- 6
- 1
-
- 7
-
- 1000
-
- 3
- 9
- 3
-
-
-
- 4
+
+
+ 3
0
4
1
-
- 6
-
- 1000
-
- 3
- 9
- 3
-
-
-
- 3
- 0
-
- 3
- 1
-
+
8
1000
- 3
- 9
+ 6
+ 24
3
-
+
+
+ 6
+ 0
+
+ 6
+ 1
+
+ 20
+
+ 1000
+
+ 8
+ 29
+ 3
+
+
+
+ 4
+ 0
+
+ 4
+ 1
+
+ 20
+
+ 1000
+
+ 8
+ 29
+ 3
+
+
5
0
5
1
-
- 8
+
+ 20
1000
- 3
- 9
+ 8
+ 29
3
+
+
+ 6
+ 0
+
+ 6
+ 1
+
+ 20
+
+ 1000
+
+ 8
+ 29
+ 3
+
+
+
+ 3
+ 0
+
+ 3
+ 1
+
+ 20
+
+ 1000
+
+ 8
+ 29
+ 3
+
+
@@ -332,26 +425,6 @@
-
- 65
-
-
-
-
- 68
-
-
-
-
- 69
-
-
-
-
- 70
-
-
-
71
@@ -365,6 +438,49 @@
+
+ 88
+
+
+
+
+ 101
+
+
+
+
+
+
+
+ 102
+
+
+
+
+ 107
+
+
+
+
+ 108
+
+
+
+
+ 110
+
+
+
+
+ 111
+
+
+
+
+ 112
+
+
+
@@ -372,36 +488,55 @@
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
-
-
-
-
+
+
+
+
+
+
com.apple.InterfaceBuilder.CocoaPlugin
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
- 74
+ 112
MPIconSelectViewController
MPViewController
+
+ iconCollectionView
+ NSCollectionView
+
+
+ iconCollectionView
+
+ iconCollectionView
+ NSCollectionView
+
+
IBProjectSource
./Classes/MPIconSelectViewController.h
diff --git a/MacPass/MPIconHelper.h b/MacPass/MPIconHelper.h
index ac52aa27..05088f95 100644
--- a/MacPass/MPIconHelper.h
+++ b/MacPass/MPIconHelper.h
@@ -33,7 +33,9 @@ typedef enum {
Available Icons, Use the MPDatabaseIconType to access a individual icon;
@returns all availble Icons
*/
-+ (NSDictionary *)availableIcons;
++ (NSDictionary *)availableIconNames;
+
++ (NSArray *)availableIcons;
/*
@returns a random Icon image
diff --git a/MacPass/MPIconHelper.m b/MacPass/MPIconHelper.m
index 253247ab..5a2f3eaa 100644
--- a/MacPass/MPIconHelper.m
+++ b/MacPass/MPIconHelper.m
@@ -11,7 +11,7 @@
@implementation MPIconHelper
+ (NSImage *)icon:(MPIconType)type {
- NSDictionary *icons = [MPIconHelper availableIcons];
+ NSDictionary *icons = [MPIconHelper availableIconNames];
if(type >= [icons count]) {
return [NSImage imageNamed:NSImageNameActionTemplate];
}
@@ -19,7 +19,17 @@
return [[NSBundle mainBundle] imageForResource:imageName];
}
-+ (NSDictionary *)availableIcons {
++ (NSArray *)availableIcons {
+ NSDictionary *imageNames = [MPIconHelper availableIconNames];
+ NSMutableArray *icons = [[NSMutableArray alloc] initWithCapacity:[imageNames count]];
+ for(NSNumber *iconNumber in [imageNames allKeys]) {
+ MPIconType iconType = (MPIconType)[iconNumber integerValue];
+ [icons addObject:[MPIconHelper icon:iconType]];
+ }
+ return icons;
+}
+
++ (NSDictionary *)availableIconNames {
NSDictionary *imageNames = @{ @(MPIconKlipper): @"04_KlipperTemplate",
@(MPIconLanguages): @"05_LanguagesTemplate",
@(MPIconPackageNetwork): @"01_PackageNetworkTemplate",
@@ -41,7 +51,7 @@
srandom([[NSDate date] timeIntervalSince1970]);
});
- NSArray *types = [[MPIconHelper availableIcons] allKeys];
+ NSArray *types = [[MPIconHelper availableIconNames] allKeys];
NSUInteger randomIndex = random() % [types count];
return [MPIconHelper icon:(MPIconType)randomIndex];
}
diff --git a/MacPass/MPIconSelectViewController.h b/MacPass/MPIconSelectViewController.h
index 3585ab32..25d2d54a 100644
--- a/MacPass/MPIconSelectViewController.h
+++ b/MacPass/MPIconSelectViewController.h
@@ -9,5 +9,6 @@
#import "MPViewController.h"
@interface MPIconSelectViewController : MPViewController
+@property (assign) IBOutlet NSCollectionView *iconCollectionView;
@end
diff --git a/MacPass/MPIconSelectViewController.m b/MacPass/MPIconSelectViewController.m
index ee67a7f6..0940bae1 100644
--- a/MacPass/MPIconSelectViewController.m
+++ b/MacPass/MPIconSelectViewController.m
@@ -7,6 +7,7 @@
//
#import "MPIconSelectViewController.h"
+#import "MPIconHelper.h"
@interface MPIconSelectViewController ()
@@ -23,10 +24,13 @@
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
-
+
}
-
return self;
}
+- (void)didLoadView {
+ [self.iconCollectionView setContent:[MPIconHelper availableIcons]];
+}
+
@end
diff --git a/MacPass/MacPass-Info.plist b/MacPass/MacPass-Info.plist
index 8458b52b..532a602b 100644
--- a/MacPass/MacPass-Info.plist
+++ b/MacPass/MacPass-Info.plist
@@ -21,7 +21,7 @@
CFBundleSignature
????
CFBundleVersion
- 550
+ 55B
LSMinimumSystemVersion
${MACOSX_DEPLOYMENT_TARGET}
NSHumanReadableCopyright
diff --git a/MacPass/PasswordInputView.xib b/MacPass/PasswordInputView.xib
index 40f5ede8..08eeb72c 100644
--- a/MacPass/PasswordInputView.xib
+++ b/MacPass/PasswordInputView.xib
@@ -260,7 +260,6 @@
{{267, 151}, {74, 32}}
-
_NS:9
{250, 250}
YES
@@ -625,22 +624,6 @@
24
2
-
-
- 5
- 1
-
- 5
- 1
-
- 20
-
- 1000
-
- 9
- 40
- 3
-
9
@@ -673,6 +656,22 @@
40
3
+
+
+ 5
+ 1
+
+ 5
+ 1
+
+ 20
+
+ 1000
+
+ 9
+ 40
+ 3
+
3
@@ -1014,9 +1013,9 @@
+
-