mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 09:09:28 +00:00
rolled out new submenu to single items
changed some localization keys build menus using centralized MPContextMenuHelper
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#import "MPAppDelegate.h"
|
||||
|
||||
#import "MPAutotypeDaemon.h"
|
||||
#import "MPContextMenuHelper.h"
|
||||
#import "MPDockTileHelper.h"
|
||||
#import "MPDocument.h"
|
||||
#import "MPDocumentController.h"
|
||||
@@ -104,6 +105,13 @@ NSString *const MPHelpURLKey = @"MPHelpURL";
|
||||
toObject:NSUserDefaultsController.sharedUserDefaultsController
|
||||
withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyRememberKeyFilesForDatabases]
|
||||
options:nil];
|
||||
|
||||
NSMenu *fileMenu = self.fileNewMenuItem.menu;
|
||||
NSInteger insertIndex = [fileMenu indexOfItem:self.fileNewMenuItem]+1;
|
||||
NSArray *items = [MPContextMenuHelper contextMenuItemsWithItems:MPContextMenuCreate];
|
||||
for(NSMenuItem *item in items.reverseObjectEnumerator) {
|
||||
[fileMenu insertItem:item atIndex:insertIndex];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
Reference in New Issue
Block a user