rolled out new submenu to single items

changed some localization keys
build menus using centralized MPContextMenuHelper
This commit is contained in:
michael starke
2017-10-30 11:40:49 +01:00
parent d69ced43c9
commit c86a6b0504
27 changed files with 73 additions and 72 deletions

View File

@@ -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 -