From a182287130f00e2c8061007edeab3217ebc24e88 Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Wed, 1 Aug 2007 18:37:30 +0000 Subject: [PATCH] Window menu changed, had to update hard coding as to where it is placed. git-svn-id: http://macvim.googlecode.com/svn/trunk@56 96c4425d-ca35-0410-94e5-3396d5c13a8f --- MMVimController.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MMVimController.m b/MMVimController.m index 2e3e4a4af2..0c289d536d 100644 --- a/MMVimController.m +++ b/MMVimController.m @@ -906,7 +906,7 @@ static NSMenuItem *findMenuItemWithTagInMenu(NSMenu *root, int tag) { shouldUpdateMainMenu = NO; - // HACK! Add the vim menu named 'Window' as the submenu with index 5 of an + // HACK! Add the vim menu named 'Window' as the submenu with index 3 of an // already existing menu with the same name. The 'Window' menu is set up // in Interface Builder. NSMenu *mainMenu = [NSApp mainMenu]; @@ -929,11 +929,11 @@ static NSMenuItem *findMenuItemWithTagInMenu(NSMenu *root, int tag) for (i = 0; i < count; ++i) { NSMenuItem *item = [mainMenuItems objectAtIndex:i]; - if (windowMenu && [windowMenu numberOfItems] > 6 + if (windowMenu && [windowMenu numberOfItems] > 4 && [[item title] isEqual:@"Window"]) { - // Item 5 of the Window menu is replaced with vim's Window menu. - [windowMenu removeItemAtIndex:5]; - [windowMenu insertItem:item atIndex:5]; + // Item 3 of the Window menu is replaced with vim's Window menu. + [windowMenu removeItemAtIndex:3]; + [windowMenu insertItem:item atIndex:3]; } else { [mainMenu insertItem:item atIndex:i+1]; }