Extracted context menu operations into MPContextMenuHelper

Removed private declarations as they aren't needed for the compiler anymore
Fixed drawing order in MPPopupImageView
Fixed #7 Error occurred due to duplicate shortcut.
Copy Password now is bound to ⌘+⌥+C
This commit is contained in:
michael starke
2013-06-09 18:20:04 +02:00
parent 88ff8c79a0
commit 288d118184
18 changed files with 149 additions and 218 deletions

View File

@@ -18,6 +18,7 @@
#import "KdbGroup+MPAdditions.h"
#import "KdbGroup+Undo.h"
#import "KdbEntry+Undo.h"
#import "MPContextMenuHelper.h"
NSString *const MPDidChangeSelectedEntryNotification = @"com.macpass.MPDidChangeSelectedEntryNotification";
@@ -71,27 +72,6 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
@property (assign, nonatomic) MPFilterModeType filterMode;
@property (retain, nonatomic) NSDictionary *filterButtonToMode;
- (IBAction)_toggleFilterSpace:(id)sender;
- (BOOL)_shouldFilterURLs;
- (BOOL)_shouldFilterTitles;
- (BOOL)_shouldFilterUsernames;
- (BOOL)hasFilter;
- (BOOL)_showsFilterBar;
- (void)updateFilter;
- (void)updateFilterText:(id)sender;
- (void)setupFilterBar;
- (void)_setupEntryMenu;
/* Notification handling */
- (void)_didChangeGroupSelectionInOutlineView:(NSNotification *)notification;
- (void)_showFilterBarAnimated:(BOOL)animate;
- (void)_hideFilterBarAnimated:(BOOL)animate;
- (void)_columnDoubleClick:(id)sender;
- (void)_copyToPasteboard:(NSString *)data overlayInfo:(MPOVerlayInfoType)overlayInfoType;
- (KdbEntry *)_clickedOrSelectedEntry;
@end
@implementation MPEntryViewController
@@ -422,7 +402,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
- (void)_setupEntryMenu {
NSMenu *menu = [[NSMenu alloc] init];
NSArray *items = [(MPAppDelegate *)[NSApp delegate] contextMenuItemsWithItems:MPContextMenuFull];
NSArray *items = [MPContextMenuHelper contextMenuItemsWithItems:MPContextMenuFull];
for(NSMenuItem *item in items) {
[menu addItem:item];
}