diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index e2c864b8..bc14c36f 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -178,6 +178,7 @@ 4C6FDD2117BC4F4C004AEEC8 /* KPKTestPlaceholder.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C6FDD2017BC4F4C004AEEC8 /* KPKTestPlaceholder.m */; }; 4C701CBC178618A000581B88 /* 12_RemoteTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C701CBB178618A000581B88 /* 12_RemoteTemplate.pdf */; }; 4C70D100179092F200652EE9 /* KPKCompositeKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C70D0FF179092F200652EE9 /* KPKCompositeKey.m */; }; + 4C7155D81A10DB6D00979307 /* IconSelection.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C7155DA1A10DB6D00979307 /* IconSelection.xib */; }; 4C74DD07177BD1640034A9DB /* MPCustomFieldView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C74DD06177BD1640034A9DB /* MPCustomFieldView.m */; }; 4C76155C1764C04C0015A1A6 /* GeneralSettings.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C76155E1764C04C0015A1A6 /* GeneralSettings.xib */; }; 4C7615681764C0C40015A1A6 /* PasswordInputView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C76156A1764C0C40015A1A6 /* PasswordInputView.xib */; }; @@ -281,7 +282,6 @@ 4CE296191842A166005F01CE /* MPAutotypePaste.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE296181842A166005F01CE /* MPAutotypePaste.m */; }; 4CE298EB1795FC2A00DF7BDB /* MPEntryContextMenuDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE298EA1795FC2A00DF7BDB /* MPEntryContextMenuDelegate.m */; }; 4CE39ABF16ECE34A000FE29D /* MPIconSelectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE39ABE16ECE34A000FE29D /* MPIconSelectViewController.m */; }; - 4CE39AC116ECE359000FE29D /* IconSelection.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CE39AC016ECE359000FE29D /* IconSelection.xib */; }; 4CE39AC416ECE4F7000FE29D /* MPPopupImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE39AC316ECE4F7000FE29D /* MPPopupImageView.m */; }; 4CE3E62617AB0D2D00D9E4B4 /* MPAttachmentTableDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE3E62517AB0D2D00D9E4B4 /* MPAttachmentTableDataSource.m */; }; 4CE5B54B173AFBA700207B39 /* MPDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE5B549173AFBA700207B39 /* MPDocument.m */; }; @@ -693,6 +693,12 @@ 4C701CBB178618A000581B88 /* 12_RemoteTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 12_RemoteTemplate.pdf; sourceTree = ""; }; 4C70D0FE179092F200652EE9 /* KPKCompositeKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKCompositeKey.h; sourceTree = ""; }; 4C70D0FF179092F200652EE9 /* KPKCompositeKey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = KPKCompositeKey.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 4C7155D91A10DB6D00979307 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/IconSelection.xib; sourceTree = ""; }; + 4C7155E41A10DB7500979307 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/IconSelection.strings; sourceTree = ""; }; + 4C7155E61A10DB7600979307 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/IconSelection.strings"; sourceTree = ""; }; + 4C7155E81A10DB7700979307 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/IconSelection.strings; sourceTree = ""; }; + 4C7155EA1A10DB7800979307 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/IconSelection.strings; sourceTree = ""; }; + 4C7155EC1A10DB7900979307 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/IconSelection.strings; sourceTree = ""; }; 4C725F3F19EEF4FC00191B01 /* MJGAvailability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MJGAvailability.h; sourceTree = ""; }; 4C74DD05177BD1640034A9DB /* MPCustomFieldView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCustomFieldView.h; sourceTree = ""; }; 4C74DD06177BD1640034A9DB /* MPCustomFieldView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCustomFieldView.m; sourceTree = ""; }; @@ -881,7 +887,6 @@ 4CE298EA1795FC2A00DF7BDB /* MPEntryContextMenuDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPEntryContextMenuDelegate.m; sourceTree = ""; }; 4CE39ABD16ECE34A000FE29D /* MPIconSelectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPIconSelectViewController.h; sourceTree = ""; }; 4CE39ABE16ECE34A000FE29D /* MPIconSelectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPIconSelectViewController.m; sourceTree = ""; }; - 4CE39AC016ECE359000FE29D /* IconSelection.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IconSelection.xib; sourceTree = ""; }; 4CE39AC216ECE4F7000FE29D /* MPPopupImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPopupImageView.h; sourceTree = ""; }; 4CE39AC316ECE4F7000FE29D /* MPPopupImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPPopupImageView.m; sourceTree = ""; }; 4CE3E62417AB0D2D00D9E4B4 /* MPAttachmentTableDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAttachmentTableDataSource.h; sourceTree = ""; }; @@ -1073,7 +1078,7 @@ 4C61EA0416D2FFE200AC519E /* OutlineView.xib */, 4CF78061176E752E0032EE71 /* PasswordInputs */, 4C4B7EF517A46815000234C7 /* Inspector */, - 4CE39AC016ECE359000FE29D /* IconSelection.xib */, + 4C7155DA1A10DB6D00979307 /* IconSelection.xib */, 4C2C8B331787500E009649F3 /* UnprotectedWarningView.xib */, 6021FE7918E15FF300C3BC51 /* DatePickingView.xib */, 4C26C34A18D8D5A300CF1A1C /* PreviewView.xib */, @@ -2226,7 +2231,7 @@ 4C17F105184E630200E85625 /* 14_BatteryTemplate.pdf in Resources */, 4C76156D1764C0E20015A1A6 /* InspectorView.xib in Resources */, 4C888C9016EB6C91003D34A1 /* Localizable.strings in Resources */, - 4CE39AC116ECE359000FE29D /* IconSelection.xib in Resources */, + 4C7155D81A10DB6D00979307 /* IconSelection.xib in Resources */, 6021FE8D18E1617300C3BC51 /* PasswordCreatorView.xib in Resources */, 4C1DDCDD1711ECEB00C98DA3 /* PasswordCreatorWindow.xib in Resources */, 4C7714AA176C998F00549F2A /* 43_TrashTemplate.pdf in Resources */, @@ -2550,6 +2555,19 @@ name = KPKLocalizable.strings; sourceTree = ""; }; + 4C7155DA1A10DB6D00979307 /* IconSelection.xib */ = { + isa = PBXVariantGroup; + children = ( + 4C7155D91A10DB6D00979307 /* Base */, + 4C7155E41A10DB7500979307 /* nl */, + 4C7155E61A10DB7600979307 /* zh-Hans */, + 4C7155E81A10DB7700979307 /* fr */, + 4C7155EA1A10DB7800979307 /* de */, + 4C7155EC1A10DB7900979307 /* en */, + ); + name = IconSelection.xib; + sourceTree = ""; + }; 4C76155E1764C04C0015A1A6 /* GeneralSettings.xib */ = { isa = PBXVariantGroup; children = ( diff --git a/MacPass/IconSelection.xib b/MacPass/Base.lproj/IconSelection.xib similarity index 99% rename from MacPass/IconSelection.xib rename to MacPass/Base.lproj/IconSelection.xib index f8f84a86..af43cfc1 100644 --- a/MacPass/IconSelection.xib +++ b/MacPass/Base.lproj/IconSelection.xib @@ -72,6 +72,7 @@ + diff --git a/MacPass/Base.lproj/WelcomeWindow.xib b/MacPass/Base.lproj/WelcomeWindow.xib index ae6fd685..81f02ebc 100644 --- a/MacPass/Base.lproj/WelcomeWindow.xib +++ b/MacPass/Base.lproj/WelcomeWindow.xib @@ -15,7 +15,7 @@ - + diff --git a/MacPass/MPIconSelectViewController.h b/MacPass/MPIconSelectViewController.h index a3d3b230..603e7486 100644 --- a/MacPass/MPIconSelectViewController.h +++ b/MacPass/MPIconSelectViewController.h @@ -15,11 +15,9 @@ FOUNDATION_EXTERN NSInteger const kMPDefaultIcon; /** * Is the selected Icon, kMPDefaultIcon if the default icons was selected */ -@property (nonatomic, assign) NSInteger selectedIcon; -@property (nonatomic, assign) BOOL didCancel; +@property (nonatomic, readonly, assign) NSInteger selectedIcon; +@property (nonatomic, readonly, assign) BOOL didCancel; -@property (weak) IBOutlet NSCollectionView *iconCollectionView; -@property (weak) IBOutlet NSButton *imageButton; @property (weak) NSPopover *popover; - (void)reset; diff --git a/MacPass/MPIconSelectViewController.m b/MacPass/MPIconSelectViewController.m index c96554c1..e28372b1 100644 --- a/MacPass/MPIconSelectViewController.m +++ b/MacPass/MPIconSelectViewController.m @@ -14,6 +14,14 @@ NSInteger const kMPDefaultIcon = -1; @interface MPIconSelectViewController () + +@property (nonatomic, assign) NSInteger selectedIcon; +@property (nonatomic, assign) BOOL didCancel; + +/* UI properties */ +@property (weak) IBOutlet NSCollectionView *iconCollectionView; +@property (weak) IBOutlet NSButton *imageButton; + @end @implementation MPIconSelectViewController @@ -26,6 +34,7 @@ NSInteger const kMPDefaultIcon = -1; self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { _didCancel = YES; + _selectedIcon = kMPDefaultIcon; } return self; } diff --git a/MacPass/de.lproj/IconSelection.strings b/MacPass/de.lproj/IconSelection.strings new file mode 100644 index 00000000..121a04ae --- /dev/null +++ b/MacPass/de.lproj/IconSelection.strings @@ -0,0 +1,6 @@ + +/* Class = "NSButtonCell"; title = "Use Default Icon"; ObjectID = "102"; */ +"102.title" = "Standardicon verwenden"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "1kM-cI-P1o"; */ +"1kM-cI-P1o.title" = "Abbrechen"; diff --git a/MacPass/en.lproj/IconSelection.strings b/MacPass/en.lproj/IconSelection.strings new file mode 100644 index 00000000..42b0eae2 --- /dev/null +++ b/MacPass/en.lproj/IconSelection.strings @@ -0,0 +1,6 @@ + +/* Class = "NSButtonCell"; title = "Use Default Icon"; ObjectID = "102"; */ +"102.title" = "Use Default Icon"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "1kM-cI-P1o"; */ +"1kM-cI-P1o.title" = "Cancel"; diff --git a/MacPass/fr.lproj/IconSelection.strings b/MacPass/fr.lproj/IconSelection.strings new file mode 100644 index 00000000..42b0eae2 --- /dev/null +++ b/MacPass/fr.lproj/IconSelection.strings @@ -0,0 +1,6 @@ + +/* Class = "NSButtonCell"; title = "Use Default Icon"; ObjectID = "102"; */ +"102.title" = "Use Default Icon"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "1kM-cI-P1o"; */ +"1kM-cI-P1o.title" = "Cancel"; diff --git a/MacPass/nl.lproj/IconSelection.strings b/MacPass/nl.lproj/IconSelection.strings new file mode 100644 index 00000000..42b0eae2 --- /dev/null +++ b/MacPass/nl.lproj/IconSelection.strings @@ -0,0 +1,6 @@ + +/* Class = "NSButtonCell"; title = "Use Default Icon"; ObjectID = "102"; */ +"102.title" = "Use Default Icon"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "1kM-cI-P1o"; */ +"1kM-cI-P1o.title" = "Cancel"; diff --git a/MacPass/zh-Hans.lproj/IconSelection.strings b/MacPass/zh-Hans.lproj/IconSelection.strings new file mode 100644 index 00000000..42b0eae2 --- /dev/null +++ b/MacPass/zh-Hans.lproj/IconSelection.strings @@ -0,0 +1,6 @@ + +/* Class = "NSButtonCell"; title = "Use Default Icon"; ObjectID = "102"; */ +"102.title" = "Use Default Icon"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "1kM-cI-P1o"; */ +"1kM-cI-P1o.title" = "Cancel";