From 419eb2a7c0a4186d43a9b9d68aaf24a22fff9855 Mon Sep 17 00:00:00 2001 From: "pinkerton@chromium.org" Date: Wed, 11 Nov 2009 16:26:26 +0000 Subject: Allow new window creation when the frontmost browser has a modal sheet attached. BUG=27379 TEST=creating new windows with app modals, tab modal, window modals Review URL: http://codereview.chromium.org/387025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31667 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/app_controller_mac.mm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'chrome') diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index d24cd7a..4d36d3d 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -463,18 +463,16 @@ static bool g_is_opening_new_window = false; NSInteger tag = [item tag]; if (menuState_->SupportsCommand(tag)) { switch (tag) { + // The File Menu commands are not automatically disabled by Cocoa when a + // dialog sheet obscures the browser window, so we disable several of + // them here. We don't need to include IDC_CLOSE_WINDOW, because + // app_controller is only activated when there are no key windows (see + // function comment). case IDC_RESTORE_TAB: enable = [self keyWindowIsMissingOrBlocked] && [self canRestoreTab]; break; - // The File Menu commands are not automatically disabled by Cocoa when - // a dialog sheet obscures the browser window, so we disable them here. - // We don't need to include IDC_CLOSE_WINDOW, because app_controller - // is only activated when there are no key windows (see function - // comment). case IDC_OPEN_FILE: - case IDC_NEW_WINDOW: case IDC_NEW_TAB: - case IDC_NEW_INCOGNITO_WINDOW: enable = [self keyWindowIsMissingOrBlocked]; break; default: -- cgit v1.1