mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-24 18:29:29 +00:00
Added Icon supplied by Iiro Jäppinen
Added more KeePass Icon replacements
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
MacPass/Icons/12_RemoteTemplate.pdf
Normal file
BIN
MacPass/Icons/12_RemoteTemplate.pdf
Normal file
Binary file not shown.
Binary file not shown.
BIN
MacPass/Icons/48_FolderTemplate.pdf
Normal file
BIN
MacPass/Icons/48_FolderTemplate.pdf
Normal file
Binary file not shown.
BIN
MacPass/Icons/99_AddFolderTemplate.pdf
Normal file
BIN
MacPass/Icons/99_AddFolderTemplate.pdf
Normal file
Binary file not shown.
Binary file not shown.
@@ -11,5 +11,6 @@
|
||||
@interface Kdb4Tree (NewTree)
|
||||
|
||||
+(Kdb4Tree *)templateTree;
|
||||
+(Kdb4Tree *)demoTree;
|
||||
|
||||
@end
|
||||
|
||||
@@ -74,4 +74,50 @@
|
||||
return tree;
|
||||
}
|
||||
|
||||
+ (Kdb4Tree *)demoTree {
|
||||
NSDate *currentTime = [NSDate date];
|
||||
|
||||
Kdb4Tree *tree = [[Kdb4Tree alloc] init];
|
||||
tree.generator = @"MacPass";
|
||||
tree.databaseName = @"Icon Demonstation";
|
||||
tree.databaseNameChanged = currentTime;
|
||||
tree.databaseDescription = @"This database just has all default icons as groups in the tree";
|
||||
tree.databaseDescriptionChanged = currentTime;
|
||||
tree.defaultUserName = @"";
|
||||
tree.defaultUserNameChanged = currentTime;
|
||||
tree.maintenanceHistoryDays = 365;
|
||||
tree.color = @"";
|
||||
tree.masterKeyChanged = currentTime;
|
||||
tree.masterKeyChangeRec = -1;
|
||||
tree.masterKeyChangeForce = -1;
|
||||
tree.protectTitle = NO;
|
||||
tree.protectUserName = NO;
|
||||
tree.protectPassword = YES;
|
||||
tree.protectUrl = NO;
|
||||
tree.protectNotes = NO;
|
||||
tree.recycleBinEnabled = YES;
|
||||
tree.recycleBinUuid = [UUID nullUuid];
|
||||
tree.recycleBinChanged = currentTime;
|
||||
tree.entryTemplatesGroup = [UUID nullUuid];
|
||||
tree.entryTemplatesGroupChanged = currentTime;
|
||||
tree.historyMaxItems = 10;
|
||||
tree.historyMaxSize = 6 * 1024 * 1024; // 6 MB
|
||||
tree.lastSelectedGroup = [UUID nullUuid];
|
||||
tree.lastTopVisibleGroup = [UUID nullUuid];
|
||||
|
||||
KdbGroup *parentGroup = [tree createGroup:nil];
|
||||
parentGroup.name = @"General";
|
||||
parentGroup.image = 48;
|
||||
tree.root = parentGroup;
|
||||
|
||||
for(NSUInteger iImageIndex = 0; iImageIndex < 69; iImageIndex++) {
|
||||
KdbGroup *group = [tree createGroup:parentGroup];
|
||||
group.name = [NSString stringWithFormat:@"Group %ld", iImageIndex];
|
||||
group.image = iImageIndex;
|
||||
[parentGroup addGroup:group];
|
||||
}
|
||||
|
||||
return tree;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -83,6 +83,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
|
||||
break;
|
||||
case MPDatabaseVersion4:
|
||||
self.tree = [Kdb4Tree templateTree];
|
||||
//self.tree = [Kdb4Tree demoTree];
|
||||
break;
|
||||
default:
|
||||
self = nil;
|
||||
@@ -117,6 +118,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
|
||||
}
|
||||
|
||||
- (BOOL)readFromURL:(NSURL *)url ofType:(NSString *)typeName error:(NSError **)outError {
|
||||
/* FIXME: Logfile handling
|
||||
self.lockFileURL = [url URLByAppendingPathExtension:@"lock"];
|
||||
if([[NSFileManager defaultManager] fileExistsAtPath:[_lockFileURL path]]) {
|
||||
self.readOnly = YES;
|
||||
@@ -126,6 +128,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
|
||||
_didLockFile = YES;
|
||||
self.readOnly = NO;
|
||||
}
|
||||
*/
|
||||
self.decrypted = NO;
|
||||
return YES;
|
||||
}
|
||||
@@ -301,6 +304,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
|
||||
}
|
||||
KdbGroup *newGroup = [self.tree createGroup:parent];
|
||||
newGroup.name = NSLocalizedString(@"DEFAULT_GROUP_NAME", @"Title for a newly created group");
|
||||
newGroup.image = MPIconFolder;
|
||||
[self group:parent addGroup:newGroup atIndex:[parent.groups count]];
|
||||
NSDictionary *userInfo = @{ MPDocumentGroupKey : newGroup };
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidAddGroupNotification object:self userInfo:userInfo];
|
||||
|
||||
@@ -20,8 +20,12 @@ typedef NS_ENUM(NSUInteger, MPIconType) {
|
||||
MPIconIdentity,
|
||||
MPIconContact,
|
||||
MPIconCamera,
|
||||
MPIconTrash,
|
||||
MPIconInfo
|
||||
MPIconRemote,
|
||||
MPIconTrash = 43,
|
||||
MPIconFolder = 48,
|
||||
/* Custom Icons not used in Database */
|
||||
MPIconInfo = 1000,
|
||||
MPIconAddFolder
|
||||
};
|
||||
|
||||
@interface MPIconHelper : NSObject
|
||||
|
||||
@@ -10,13 +10,17 @@
|
||||
|
||||
@implementation MPIconHelper
|
||||
|
||||
static NSDictionary *icons;
|
||||
|
||||
+ (NSImage *)icon:(MPIconType)type {
|
||||
NSDictionary *icons = [MPIconHelper availableIconNames];
|
||||
if(type >= [icons count]) {
|
||||
return [NSImage imageNamed:NSImageNameActionTemplate];
|
||||
if(!icons) {
|
||||
icons = [MPIconHelper availableIconNames];
|
||||
}
|
||||
NSString *imageName = icons[@(type)];
|
||||
return [[NSBundle mainBundle] imageForResource:imageName];
|
||||
if([[icons allKeys] containsObject:@(type)]) {
|
||||
NSString *imageName = icons[@(type)];
|
||||
return [[NSBundle mainBundle] imageForResource:imageName];
|
||||
}
|
||||
return [NSImage imageNamed:NSImageNameActionTemplate];
|
||||
}
|
||||
|
||||
+ (NSArray *)availableIcons {
|
||||
@@ -30,20 +34,26 @@
|
||||
}
|
||||
|
||||
+ (NSDictionary *)availableIconNames {
|
||||
NSDictionary *imageNames = @{ @(MPIconKlipper): @"04_KlipperTemplate",
|
||||
@(MPIconLanguages): @"05_LanguagesTemplate",
|
||||
@(MPIconPackageNetwork): @"01_PackageNetworkTemplate",
|
||||
@(MPIconPassword): @"00_PasswordTemplate",
|
||||
@(MPIconServer): @"03_ServerTemplate",
|
||||
@(MPIconWarning): @"02_MessageBoxWarningTemplate",
|
||||
@(MPIconCamera): @"11_CameraTemplate",
|
||||
@(MPIconContact): @"10_ContactTemplate",
|
||||
@(MPIconIdentity): @"09_IdentityTemplate",
|
||||
@(MPIconNotepad): @"07_NotepadTemplate",
|
||||
@(MPIconSocket): @"08_SocketTemplate",
|
||||
@(MPIconTrash): @"43_TrashTemplate",
|
||||
@(MPIconInfo): @"99_InfoTemplate"
|
||||
};
|
||||
NSDictionary *imageNames = @{
|
||||
@(MPIconPassword): @"00_PasswordTemplate",
|
||||
@(MPIconPackageNetwork): @"01_PackageNetworkTemplate",
|
||||
@(MPIconWarning): @"02_MessageBoxWarningTemplate",
|
||||
@(MPIconServer): @"03_ServerTemplate",
|
||||
@(MPIconKlipper): @"04_KlipperTemplate",
|
||||
@(MPIconLanguages): @"05_LanguagesTemplate",
|
||||
|
||||
@(MPIconNotepad): @"07_NotepadTemplate",
|
||||
@(MPIconSocket): @"08_SocketTemplate",
|
||||
@(MPIconIdentity): @"09_IdentityTemplate",
|
||||
@(MPIconContact): @"10_ContactTemplate",
|
||||
@(MPIconCamera): @"11_CameraTemplate",
|
||||
@(MPIconRemote): @"12_RemoteTemplate",
|
||||
|
||||
@(MPIconTrash): @"43_TrashTemplate",
|
||||
@(MPIconFolder): @"48_FolderTemplate",
|
||||
@(MPIconInfo): @"99_InfoTemplate",
|
||||
@(MPIconAddFolder): @"99_AddFolderTemplate"
|
||||
};
|
||||
return imageNames;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ NSString *const MPToolbarItemInspector = @"TOOLBAR_INSPECTOR";
|
||||
- (NSDictionary *)createToolbarImages{
|
||||
NSDictionary *imageDict = @{ MPToolbarItemLock: [NSImage imageNamed:NSImageNameLockUnlockedTemplate],
|
||||
MPToolbarItemAddEntry: [MPIconHelper icon:MPIconPassword],
|
||||
MPToolbarItemAddGroup: [MPIconHelper icon:MPIconPassword],
|
||||
MPToolbarItemAddGroup: [MPIconHelper icon:MPIconAddFolder],
|
||||
MPToolbarItemDelete: [MPIconHelper icon:MPIconTrash],
|
||||
MPToolbarItemAction: [NSImage imageNamed:NSImageNameActionTemplate],
|
||||
MPToolbarItemInspector: [MPIconHelper icon:MPIconInfo],
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<string>MacPass</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.hicknhacksoftware.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
@@ -44,11 +44,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.2</string>
|
||||
<string>0.2.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1883</string>
|
||||
<string>1906</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
<string key="NSFrame">{{7, 5}, {32, 19}}</string>
|
||||
<reference key="NSSuperview" ref="789399035"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="573415016">
|
||||
@@ -156,7 +157,7 @@
|
||||
<int key="NSfFlags">1044</int>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="920491699"/>
|
||||
<object class="NSColor" key="NSBackgroundColor" id="501306061">
|
||||
<object class="NSColor" key="NSBackgroundColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">controlBackgroundColor</string>
|
||||
@@ -224,7 +225,6 @@
|
||||
<reference key="NSNextKeyView" ref="920491699"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:11</string>
|
||||
<reference key="NSDocView" ref="920491699"/>
|
||||
<reference key="NSBGColor" ref="501306061"/>
|
||||
<int key="NScvFlags">4</int>
|
||||
</object>
|
||||
<object class="NSScroller" id="1009004098">
|
||||
@@ -370,6 +370,7 @@
|
||||
<object class="NSImageView" id="273100869">
|
||||
<reference key="NSNextResponder" ref="980203382"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<array class="NSMutableArray" key="NSSubviews"/>
|
||||
<set class="NSMutableSet" key="NSDragTypes">
|
||||
<string>Apple PDF pasteboard type</string>
|
||||
<string>Apple PICT pasteboard type</string>
|
||||
@@ -392,7 +393,7 @@
|
||||
</object>
|
||||
<string key="NSCellIdentifier">_NS:71</string>
|
||||
<int key="NSAlign">0</int>
|
||||
<int key="NSScale">0</int>
|
||||
<int key="NSScale">2</int>
|
||||
<int key="NSStyle">0</int>
|
||||
<bool key="NSAnimates">NO</bool>
|
||||
</object>
|
||||
|
||||
@@ -26,6 +26,11 @@ You should have received a copy of the GNU General Public License along with thi
|
||||
\
|
||||
|
||||
\b Credits:\
|
||||
\
|
||||
|
||||
\b0 MacPass Icon von {\field{\*\fldinst{HYPERLINK "http://iiro.jappinen.me"}}{\fldrslt Iiro J\'e4ppinen}}
|
||||
\b \
|
||||
\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/robbiehanson/KissXML"}}{\fldrslt
|
||||
\b0 \cf2 KissXML}}
|
||||
\b0 \cf3 \
|
||||
@@ -44,4 +49,4 @@ Copyright \'a9 2011, Alex Rozanski. Alle Rechte vorbehalten.\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
|
||||
{\field{\*\fldinst{HYPERLINK "http://stackoverflow.com/questions/11386876/how-to-encode-and-decode-files-as-base64-in-cocoa-objective-c"}}{\fldrslt \cf3 Base64 Encoding Category}}\
|
||||
Copyright @2013, {\field{\*\fldinst{HYPERLINK "http://stackoverflow.com/users/200321/denis2342"}}{\fldrslt \cf3 denis2342}}}
|
||||
Copyright @2013, {\field{\*\fldinst{HYPERLINK "http://stackoverflow.com/users/200321/denis2342"}}{\fldrslt denis2342}}}
|
||||
@@ -1,7 +1,7 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390
|
||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;\red52\green110\blue183;\red38\green38\blue38;}
|
||||
\paperw11900\paperh16840\vieww27740\viewh14060\viewkind0
|
||||
\paperw11900\paperh16840\vieww25780\viewh19380\viewkind0
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
|
||||
|
||||
\f0\b\fs24 \cf0 Project Website:\
|
||||
@@ -23,14 +23,22 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\
|
||||
\
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see {\field{\*\fldinst{HYPERLINK "http://www.gnu.org/licenses/"}}{\fldrslt http://www.gnu.org/licenses/}}.\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
|
||||
\cf0 \kerning1\expnd0\expndtw3
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
|
||||
|
||||
\b Credits:\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/robbiehanson/KissXML"}}{\fldrslt
|
||||
\b0 \cf2 KissXML}}
|
||||
\b0 \cf3 \
|
||||
\b \cf0 \kerning1\expnd0\expndtw0 Credits:\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
|
||||
|
||||
\b0 \cf2 \
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
|
||||
\cf0 MacPass\kerning1\expnd0\expndtw3
|
||||
\kerning1\expnd0\expndtw0 Icon by {\field{\*\fldinst{HYPERLINK "http://iiro.jappinen.me"}}{\fldrslt Iiro J\'e4ppinen}}\cf2 \
|
||||
\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/robbiehanson/KissXML"}}{\fldrslt \cf2 KissXML}}\cf3 \
|
||||
Copyright \'a9 2012 Robbie Hanson. All rights reserved.\
|
||||
\
|
||||
\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/MiniKeePass/MiniKeePass"}}{\fldrslt \cf2 MiniKeePass}}\
|
||||
Copyright \'a9 2011 Jason Rush and John Flanagan. All rights reserved.\
|
||||
\
|
||||
@@ -44,4 +52,4 @@ Copyright \'a9 2011, Alex Rozanski. All rights reserved.\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
|
||||
{\field{\*\fldinst{HYPERLINK "http://stackoverflow.com/questions/11386876/how-to-encode-and-decode-files-as-base64-in-cocoa-objective-c"}}{\fldrslt \cf3 Base64 Encoding Category}}\
|
||||
Copyright @2013, {\field{\*\fldinst{HYPERLINK "http://stackoverflow.com/users/200321/denis2342"}}{\fldrslt \cf3 denis2342}}}
|
||||
Copyright @2013, {\field{\*\fldinst{HYPERLINK "http://stackoverflow.com/users/200321/denis2342"}}{\fldrslt denis2342}}}
|
||||
Reference in New Issue
Block a user