Merge branch 'develop' into develop

This commit is contained in:
Chester Liu
2017-04-14 23:26:01 +08:00
committed by GitHub
24 changed files with 76 additions and 56 deletions

View File

@@ -1,3 +1,3 @@
github "sparkle-project/Sparkle" ~> 1.15.1
github "mstarke/KeePassKit" "752150afc789813892eea81c3633f6eec77b41c5"
github "sparkle-project/Sparkle" ~> 1.17.0
github "mstarke/KeePassKit" "d24bde60a1d73ab2483277f1b424d30d75210150"
github "mstarke/HNHUi" ~> 1.1

View File

@@ -1,3 +1,3 @@
github "mstarke/HNHUi" "1.1"
github "mstarke/KeePassKit" "752150afc789813892eea81c3633f6eec77b41c5"
github "sparkle-project/Sparkle" "1.15.1"
github "mstarke/KeePassKit" "d24bde60a1d73ab2483277f1b424d30d75210150"
github "sparkle-project/Sparkle" "1.17.0"

View File

@@ -1490,7 +1490,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = MP;
LastUpgradeCheck = 0820;
LastUpgradeCheck = 0830;
ORGANIZATIONNAME = "HicknHack Software GmbH";
TargetAttributes = {
4C77E36115B84A240093A587 = {

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12118"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -37,7 +37,7 @@
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1" customClass="HNHUIGradientView">
<rect key="frame" x="0.0" y="0.0" width="576" height="30"/>
<subviews>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6">
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6">
<rect key="frame" x="6" y="8" width="47" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Search:" id="7">
<font key="font" metaFont="smallSystemBold"/>
@@ -184,7 +184,7 @@
<customView translatesAutoresizingMaskIntoConstraints="NO" id="S8L-rB-h0h" customClass="HNHUIGradientView">
<rect key="frame" x="0.0" y="0.0" width="576" height="30"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gGR-f0-dcr">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gGR-f0-dcr">
<rect key="frame" x="18" y="6" width="37" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="8LU-cT-rsU">
<font key="font" metaFont="system"/>
@@ -224,7 +224,7 @@
</connections>
</tabViewItem>
</tabViewItems>
<point key="canvasLocation" x="157" y="476"/>
<point key="canvasLocation" x="104" y="293"/>
</tabView>
</objects>
</document>

View File

@@ -37,8 +37,8 @@
@(MPActionExportXML): NSStringFromSelector(@selector(exportAsXML:)),
@(MPActionImportXML): NSStringFromSelector(@selector(importFromXML:)),
@(MPActionToggleQuicklook): NSStringFromSelector(@selector(toggleQuicklookPreview:)),
@(MPActionShowEntryHistory): NSStringFromSelector(@selector(showHistoryForEntry:)),
@(MPActionHideEntryHistory): NSStringFromSelector(@selector(hideHistoryForEntry:)),
@(MPActionShowEntryHistory): NSStringFromSelector(@selector(showEntryHistory:)),
@(MPActionHideEntryHistory): NSStringFromSelector(@selector(hideEntryHistory:)),
@(MPActionPerformAutotypeForSelectedEntry): NSStringFromSelector(@selector(performAutotypeForEntry:))
};
});

View File

@@ -69,7 +69,7 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
//self.emptyTrashButton.textColor = [NSColor whiteColor];
}
[[self view] bind:NSSelectedIndexBinding toObject:self withKeyPath:@"activeTab" options:nil];
[self.view bind:NSSelectedIndexBinding toObject:self withKeyPath:NSStringFromSelector(@selector(activeTab)) options:nil];
/* Setup Filter Bar buttons and menu */
NSInteger tags[] = { MPEntrySearchTitles, MPEntrySearchUsernames, MPEntrySearchPasswords, MPEntrySearchNotes, MPEntrySearchUrls };
@@ -87,7 +87,7 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
[[specialMenu itemAtIndex:0] setAction:@selector(toggleSearchFlags:)];
for(NSInteger iIndex = 0; iIndex < (sizeof(specialTags)/sizeof(NSInteger)); iIndex++) {
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:titles[iIndex] action:@selector(toggleSearchFlags:) keyEquivalent:@""];
[item setTag:specialTags[iIndex]];
item.tag = specialTags[iIndex];
[specialMenu addItem:item];
}
[self.specialFilterPopUpButton setMenu:specialMenu];

View File

@@ -346,6 +346,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
return;
}
self.tree = nil;
self.compositeKey = nil;
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidLockDatabaseNotification object:self];
}
@@ -666,11 +667,11 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
}
- (void)duplicateEntry:(id)sender {
/*
KPKEntry *duplicate = [self.selectedEntry copyWithTitle:nil options:kKPKCopyOptionNone];
[duplicate addToGroup:self.selectedEntry.parent];
[self.undoManager setActionName:NSLocalizedString(@"DUPLICATE_ENTRY", "")];
*/
for(KPKEntry *entry in self.selectedEntries) {
KPKEntry *duplicate = [entry copyWithTitle:nil options:kKPKCopyOptionNone];
[duplicate addToGroup:entry.parent];
}
[self.undoManager setActionName:NSLocalizedString(@"DUPLICATE_ENTRY", "")];
}
- (void)duplicateEntryWithOptions:(id)sender {

View File

@@ -53,8 +53,8 @@
- (IBAction)pickExpiryDate:(id)sender;
- (IBAction)performAutotypeForEntry:(id)sender;
- (IBAction)showHistoryForEntry:(id)sender;
- (IBAction)hideHistoryForEntry:(id)sender;
- (IBAction)showEntryHistory:(id)sender;
- (IBAction)hideEntryHistory:(id)sender;
#pragma mark Helper
- (IBAction)fixAutotype:(id)sender;

View File

@@ -495,11 +495,11 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
[contentView layoutSubtreeIfNeeded];
}
- (IBAction)showHistoryForEntry:(id)sender {
[self.document showHistoryForEntry:nil];
- (void)showEntryHistory:(id)sender {
}
- (IBAction)hideHistoryForEntry:(id)sender {
- (void)hideEntryHistory:(id)sender {
}

View File

@@ -55,8 +55,6 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
@property (strong) NSPopover *activePopover;
@property (nonatomic, readonly) KPKEntry *representedEntry;
//@property (nonatomic, weak) KPKEntry *entry;
@property (strong) MPTemporaryFileStorage *quicklookStorage;
@end

View File

@@ -252,6 +252,8 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
NSTableCellView *view = nil;
if(isTitleColumn || isGroupColumn) {
view = [tableView makeViewWithIdentifier:_MPTableImageCellView owner:self];
[view.textField unbind:NSValueBinding];
[view.imageView unbind:NSValueBinding];
if( isTitleColumn ) {
NSString *titleKeyPath = [NSString stringWithFormat:@"%@.%@",
NSStringFromSelector(@selector(objectValue)),

View File

@@ -43,6 +43,7 @@ NSString *const MPToolbarItemInspector = @"TOOLBAR_INSPECTOR";
NSString *const MPToolbarItemSearch = @"TOOLBAR_SEARCH";
NSString *const MPToolbarItemCopyUsername = @"TOOLBAR_COPY_USERNAME";
NSString *const MPToolbarItemCopyPassword = @"TOOLBAR_COPY_PASSWORD";
NSString *const MPToolbarItemHistory = @"TOOLBAR_HISTORY";
@interface MPToolbarDelegate() {
MPAddEntryContextMenuDelegate *_entryMenuDelegate;
@@ -75,7 +76,8 @@ NSString *const MPToolbarItemCopyPassword = @"TOOLBAR_COPY_PASSWORD";
NSToolbarFlexibleSpaceItemIdentifier,
MPToolbarItemSearch,
MPToolbarItemLock,
MPToolbarItemInspector ];
MPToolbarItemInspector,
MPToolbarItemHistory ];
_defaultToolbarIdentifiers = @[ MPToolbarItemAddEntry,
MPToolbarItemDelete,
MPToolbarItemAddGroup,
@@ -211,6 +213,7 @@ NSString *const MPToolbarItemCopyPassword = @"TOOLBAR_COPY_PASSWORD";
MPToolbarItemDelete: [MPIconHelper icon:MPIconTrash],
MPToolbarItemAction: [NSImage imageNamed:NSImageNameActionTemplate],
MPToolbarItemInspector: [MPIconHelper icon:MPIconInfo],
MPToolbarItemHistory: [MPIconHelper icon:MPIconHistory]
};
return imageDict;
}
@@ -233,7 +236,8 @@ NSString *const MPToolbarItemCopyPassword = @"TOOLBAR_COPY_PASSWORD";
MPToolbarItemCopyUsername: NSLocalizedString(@"COPY_USERNAME", @""),
MPToolbarItemDelete: NSLocalizedString(@"DELETE", @""),
MPToolbarItemInspector: NSLocalizedString(@"INSPECTOR", @""),
MPToolbarItemSearch: NSLocalizedString(@"SEARCH", @"")
MPToolbarItemSearch: NSLocalizedString(@"SEARCH", @""),
MPToolbarItemHistory: NSLocalizedString(@"SHOW_HISTORY", @""),
};
});
return labelDict[identifier];
@@ -249,7 +253,8 @@ NSString *const MPToolbarItemCopyPassword = @"TOOLBAR_COPY_PASSWORD";
MPToolbarItemDelete: @(MPActionDelete),
MPToolbarItemCopyPassword: @(MPActionCopyPassword),
MPToolbarItemCopyUsername: @(MPActionCopyUsername),
MPToolbarItemInspector: @(MPActionToggleInspector)
MPToolbarItemInspector: @(MPActionToggleInspector),
MPToolbarItemHistory: @(MPActionShowEntryHistory),
};
});
MPActionType actionType = (MPActionType)[actionDict[identifier] integerValue];

View File

@@ -14,7 +14,7 @@
<key>CFBundleTypeIconFile</key>
<string>FileTypeIcon</string>
<key>CFBundleTypeName</key>
<string>kdbxFileType</string>
<string>KDBX Database</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
@@ -34,7 +34,7 @@
<key>CFBundleTypeIconFile</key>
<string>FileTypeIcon</string>
<key>CFBundleTypeName</key>
<string>kdbFileType</string>
<string>KDB Database</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
@@ -83,7 +83,7 @@
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>Keepass 2 Database</string>
<string>KDBX Database</string>
<key>UTTypeIdentifier</key>
<string>com.hicknhack.macpass.kdbx</string>
<key>UTTypeTagSpecification</key>
@@ -100,7 +100,7 @@
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>Keepass Database</string>
<string>KDB Database</string>
<key>UTTypeIdentifier</key>
<string>com.hicknhack.macpass.kdb</string>
<key>UTTypeTagSpecification</key>
@@ -131,5 +131,16 @@
</dict>
</dict>
</array>
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeDescription</key>
<string>XML</string>
<key>UTTypeIdentifier</key>
<string>public.xml</string>
<key>UTTypeTagSpecification</key>
<dict/>
</dict>
</array>
</dict>
</plist>

View File

@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6250" systemVersion="13F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6250"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="MPSavePanelAccessoryViewController">
@@ -19,7 +20,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2">
<rect key="frame" x="183" y="53" width="142" height="26"/>
<rect key="frame" x="180" y="53" width="148" height="26"/>
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="3">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
@@ -32,15 +33,15 @@
</popUpButtonCell>
</popUpButton>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="11">
<rect key="frame" x="126" y="58" width="53" height="17"/>
<rect key="frame" x="125" y="58" width="51" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Format:" id="12">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="51">
<rect key="frame" x="126" y="20" width="362" height="28"/>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="249" preferredMaxLayoutWidth="358" translatesAutoresizingMaskIntoConstraints="NO" id="51">
<rect key="frame" x="125" y="20" width="363" height="28"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="Not all Information inside your current database can be stored with this format." id="52">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -60,6 +61,7 @@
<constraint firstItem="51" firstAttribute="top" secondItem="2" secondAttribute="bottom" constant="8" symbolic="YES" id="101"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="51" secondAttribute="bottom" constant="20" symbolic="YES" id="103"/>
</constraints>
<point key="canvasLocation" x="-38" y="-82"/>
</customView>
</objects>
</document>

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.

View File

@@ -1,15 +1,15 @@
#MacPass
# MacPass
There are a lot of iOS KeePass tools around but a distinct lack of a good native macOS version.
KeePass can be used via Mono on macOS but lacks vital functionality and feels sluggish and simply out of place.
MacPass is an attempt to create a native macOS port of KeePass on a solid open source foundation with a vibrant community pushing it further to become the best KeePass client for macOS.
##Download
## Download
All pre-built releases can be found at [Github](https://github.com/mstarke/MacPass/releases).
##How to Build
## How to Build
* Fetch the source of MacPass
```bash
@@ -29,12 +29,12 @@ There have been some changes in the submodule urls. Please consider re-syncing a
git submodule sync
git submodule init
##Known Major Issues
## Known Major Issues
* Binary releases (0.5.x):
* KDBX History is only preserved. Editing doesn't create new history entries
##How to Contribute
## How to Contribute
If you want to contribute by fixing a bug, adding a feature or improving localization you're awesome. Please open a pull request!
@@ -44,32 +44,33 @@ Some questions might be ansered in the [FAQ](https://github.com/mstarke/MacPass/
Another place to look is the IRC channel [#macpass](irc://irc.freenode.org/macpass) on [irc.freenode.org](irc://irc.freenode.org)
##System Requirement
## System Requirement
The minimum OS X version required for MacPass is currently 10.8 Mountain Lion.
##Status
## Status
The Status can be found on the dedicated [Wiki page](https://github.com/mstarke/MacPass/wiki/Status).
##What does it look like?
## What does it look like?
![image](https://raw.github.com/mstarke/MacPass/master/Assets/Screenshots/MacPass.png)
More Screenshots in the [Wiki](https://github.com/mstarke/MacPass/wiki/Screenshots)
##Alternatives
## Alternatives
[KeePassX](http://www.keepassx.org) is a Qt based KeePass port. It's in active development and open source. It fully supports all KDBX features and can import KDB into a KDBX file but is unable to safe as KDB. There's an older release that only handles KDB files. KDBX3.1 is fully supported, KDBX4.0 is currently unsupported.
[KeePassXC](https://github.com/keepassxc/keepassxc) straight from the project's README:
[KeePassXC](https://github.com/keepassxreboot/keepassxc) straight from the project's README:
>KeePassXC is a fork of KeePassX that aims to incorporate stalled pull requests, features, and bug fixes that have never made it into the main KeePassX repository.
[KyPass Companion](http://www.kyuran.be/logiciels/kypass4mac/) is a native Cocoa port and offers KeePassHttp compatibility.
Should be able to read and write KDB and KDBX files. It is closed source and currently available in the Mac App Store. It's rather expensive considering the bugs and missing features. Based on the user reviews it should work. Not all KDBX features are supported. It is unable to convert between database versions. KDBX4.0 support is in development.
[KeeWeb](https://keeweb.info) is a cross platform web client in active development based on [electron](http://electron.atom.io) and thus also is available as an offline version for all major platforms. The project is open source. It supports all features of KDBX files but has no KDB support. Because of the technology it's look is customizable, but the native one is quite pretty. Full KDBX 4 support is present. Performance for Argon2 requires WebAssembly.
##License
[KeeWeb](https://keeweb.info) is a cross platform web client in active development based on [electron](http://electron.atom.io) and thus also is available as an offline version for all major platforms. The project is open source. It supports all features of KDBX files but has no KDB support. Because of the technology its look is customizable, but the native one is quite pretty. Full KDBX 4 support is present. Performance for Argon2 requires WebAssembly.
## License
MacPass, a KeePass compatible Password Manager for OS X
Copyright (c) 2012-2017 Michael Starke (HicknHack Software GmbH) and all [MacPass contributors](https://github.com/mstarke/MacPass/graphs/contributors)
@@ -93,7 +94,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Due to being licensed under GPLv3 it's not possible to publish a version of MacPass on the App Store.
For further details, take a look at the [explanation](https://www.fsf.org/news/2010-05-app-store-compliance) of the Free Software Foundation.
##Contributions
## Contributions
The following list might not be complete, please refer to [merged Pull Requests](https://github.com/mstarke/MacPass/pulls?utf8=✓&q=is%3Apr+is%3Aclosed+is%3Amerged) on GitHub for more details. Please report open an issue if you think someone is missing from this list!
@@ -153,7 +154,7 @@ The following list might not be complete, please refer to [merged Pull Requests]
[Michael Belz](https://github.com/sub0ne) Fixed MacPass not opening any window, when lastly opened Database is missing.
##Copyright
## Copyright
This Project is based upon the following work:
@@ -183,6 +184,6 @@ This Project is based upon the following work:
See submodules for additional Licenses
##Feedback
## Feedback
[![Flattr this](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/1550529/mstarkeMacPass-on-GitHub)