mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 21:42:32 +00:00
refactoring for history browsing
This commit is contained in:
@@ -37,8 +37,8 @@
|
|||||||
@(MPActionExportXML): NSStringFromSelector(@selector(exportAsXML:)),
|
@(MPActionExportXML): NSStringFromSelector(@selector(exportAsXML:)),
|
||||||
@(MPActionImportXML): NSStringFromSelector(@selector(importFromXML:)),
|
@(MPActionImportXML): NSStringFromSelector(@selector(importFromXML:)),
|
||||||
@(MPActionToggleQuicklook): NSStringFromSelector(@selector(toggleQuicklookPreview:)),
|
@(MPActionToggleQuicklook): NSStringFromSelector(@selector(toggleQuicklookPreview:)),
|
||||||
@(MPActionShowEntryHistory): NSStringFromSelector(@selector(showHistoryForEntry:)),
|
@(MPActionShowEntryHistory): NSStringFromSelector(@selector(showEntryHistory:)),
|
||||||
@(MPActionHideEntryHistory): NSStringFromSelector(@selector(hideHistoryForEntry:)),
|
@(MPActionHideEntryHistory): NSStringFromSelector(@selector(hideEntryHistory:)),
|
||||||
@(MPActionPerformAutotypeForSelectedEntry): NSStringFromSelector(@selector(performAutotypeForEntry:))
|
@(MPActionPerformAutotypeForSelectedEntry): NSStringFromSelector(@selector(performAutotypeForEntry:))
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
|
|||||||
//self.emptyTrashButton.textColor = [NSColor whiteColor];
|
//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 */
|
/* Setup Filter Bar buttons and menu */
|
||||||
NSInteger tags[] = { MPEntrySearchTitles, MPEntrySearchUsernames, MPEntrySearchPasswords, MPEntrySearchNotes, MPEntrySearchUrls };
|
NSInteger tags[] = { MPEntrySearchTitles, MPEntrySearchUsernames, MPEntrySearchPasswords, MPEntrySearchNotes, MPEntrySearchUrls };
|
||||||
@@ -87,7 +87,7 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
|
|||||||
[[specialMenu itemAtIndex:0] setAction:@selector(toggleSearchFlags:)];
|
[[specialMenu itemAtIndex:0] setAction:@selector(toggleSearchFlags:)];
|
||||||
for(NSInteger iIndex = 0; iIndex < (sizeof(specialTags)/sizeof(NSInteger)); iIndex++) {
|
for(NSInteger iIndex = 0; iIndex < (sizeof(specialTags)/sizeof(NSInteger)); iIndex++) {
|
||||||
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:titles[iIndex] action:@selector(toggleSearchFlags:) keyEquivalent:@""];
|
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:titles[iIndex] action:@selector(toggleSearchFlags:) keyEquivalent:@""];
|
||||||
[item setTag:specialTags[iIndex]];
|
item.tag = specialTags[iIndex];
|
||||||
[specialMenu addItem:item];
|
[specialMenu addItem:item];
|
||||||
}
|
}
|
||||||
[self.specialFilterPopUpButton setMenu:specialMenu];
|
[self.specialFilterPopUpButton setMenu:specialMenu];
|
||||||
|
|||||||
@@ -53,8 +53,8 @@
|
|||||||
- (IBAction)pickExpiryDate:(id)sender;
|
- (IBAction)pickExpiryDate:(id)sender;
|
||||||
|
|
||||||
- (IBAction)performAutotypeForEntry:(id)sender;
|
- (IBAction)performAutotypeForEntry:(id)sender;
|
||||||
- (IBAction)showHistoryForEntry:(id)sender;
|
- (IBAction)showEntryHistory:(id)sender;
|
||||||
- (IBAction)hideHistoryForEntry:(id)sender;
|
- (IBAction)hideEntryHistory:(id)sender;
|
||||||
|
|
||||||
#pragma mark Helper
|
#pragma mark Helper
|
||||||
- (IBAction)fixAutotype:(id)sender;
|
- (IBAction)fixAutotype:(id)sender;
|
||||||
|
|||||||
@@ -495,11 +495,11 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
|
|||||||
[contentView layoutSubtreeIfNeeded];
|
[contentView layoutSubtreeIfNeeded];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)showHistoryForEntry:(id)sender {
|
- (void)showEntryHistory:(id)sender {
|
||||||
[self.document showHistoryForEntry:nil];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)hideHistoryForEntry:(id)sender {
|
- (void)hideEntryHistory:(id)sender {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<key>CFBundleTypeIconFile</key>
|
<key>CFBundleTypeIconFile</key>
|
||||||
<string>FileTypeIcon</string>
|
<string>FileTypeIcon</string>
|
||||||
<key>CFBundleTypeName</key>
|
<key>CFBundleTypeName</key>
|
||||||
<string>kdbxFileType</string>
|
<string>KDBX Database</string>
|
||||||
<key>CFBundleTypeRole</key>
|
<key>CFBundleTypeRole</key>
|
||||||
<string>Editor</string>
|
<string>Editor</string>
|
||||||
<key>LSItemContentTypes</key>
|
<key>LSItemContentTypes</key>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<key>CFBundleTypeIconFile</key>
|
<key>CFBundleTypeIconFile</key>
|
||||||
<string>FileTypeIcon</string>
|
<string>FileTypeIcon</string>
|
||||||
<key>CFBundleTypeName</key>
|
<key>CFBundleTypeName</key>
|
||||||
<string>kdbFileType</string>
|
<string>KDB Database</string>
|
||||||
<key>CFBundleTypeRole</key>
|
<key>CFBundleTypeRole</key>
|
||||||
<string>Editor</string>
|
<string>Editor</string>
|
||||||
<key>LSItemContentTypes</key>
|
<key>LSItemContentTypes</key>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
<string>public.data</string>
|
<string>public.data</string>
|
||||||
</array>
|
</array>
|
||||||
<key>UTTypeDescription</key>
|
<key>UTTypeDescription</key>
|
||||||
<string>Keepass 2 Database</string>
|
<string>KDBX Database</string>
|
||||||
<key>UTTypeIdentifier</key>
|
<key>UTTypeIdentifier</key>
|
||||||
<string>com.hicknhack.macpass.kdbx</string>
|
<string>com.hicknhack.macpass.kdbx</string>
|
||||||
<key>UTTypeTagSpecification</key>
|
<key>UTTypeTagSpecification</key>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<string>public.data</string>
|
<string>public.data</string>
|
||||||
</array>
|
</array>
|
||||||
<key>UTTypeDescription</key>
|
<key>UTTypeDescription</key>
|
||||||
<string>Keepass Database</string>
|
<string>KDB Database</string>
|
||||||
<key>UTTypeIdentifier</key>
|
<key>UTTypeIdentifier</key>
|
||||||
<string>com.hicknhack.macpass.kdb</string>
|
<string>com.hicknhack.macpass.kdb</string>
|
||||||
<key>UTTypeTagSpecification</key>
|
<key>UTTypeTagSpecification</key>
|
||||||
@@ -131,5 +131,16 @@
|
|||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</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>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
Reference in New Issue
Block a user