From a99fce0ea927c4040410566b7c6a31049a9d9811 Mon Sep 17 00:00:00 2001 From: "rsesek@chromium.org" Date: Mon, 21 Mar 2011 20:58:48 +0000 Subject: [Mac] Confirm-to-quit: Add an option in the app menu. This option is off by default. This CL also removes the command line flag and the about:flags strings. XIB changes: * Add a new menu item and separator. * Wire up the menu item to -[AppController toggleConfirmToQuit:] BUG=60591 TEST=Go to Chromium menu. See "Warn Before Quitting (Cmd+Q)". Select it to enable/disable. Feature works as before, respecting this flag. Review URL: http://codereview.chromium.org/6708058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78920 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/app/generated_resources.grd | 9 ++--- chrome/app/nibs/MainMenu.xib | 81 ++++++++++++++++++++++++++++---------- 2 files changed, 64 insertions(+), 26 deletions(-) (limited to 'chrome/app') diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 099fb55..493c2a5 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -4131,12 +4131,6 @@ Keep your key file in a safe place. You will need it to create new versions of y Always Disabled - - Confirm to Quit - - - Receive a prompt before quitting to confirm the action. - Experimental Extension APIs @@ -4775,6 +4769,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Hold $1⌘Q to Quit. + + Warn Before Quitting ($1⌘Q) + diff --git a/chrome/app/nibs/MainMenu.xib b/chrome/app/nibs/MainMenu.xib index 84553059..fb46027 100644 --- a/chrome/app/nibs/MainMenu.xib +++ b/chrome/app/nibs/MainMenu.xib @@ -2,17 +2,17 @@ 1050 - 10F2108 + 10J567 823 - 1038.29 - 461.00 + 1038.35 + 462.00 com.apple.InterfaceBuilder.CocoaPlugin 823 YES - + YES @@ -197,6 +197,24 @@ + + + ^IDS_CONFIRM_TO_QUIT_OPTION + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + ^IDS_EXIT_MAC$IDS_PRODUCT_NAME @@ -1772,6 +1790,14 @@ 685 + + + toggleConfirmToQuit: + + + + 688 + @@ -2105,6 +2131,8 @@ + + @@ -2628,6 +2656,16 @@ + + 686 + + + + + 687 + + + @@ -2820,6 +2858,8 @@ 674.IBPluginDependency 676.IBPluginDependency 682.IBPluginDependency + 686.IBPluginDependency + 687.IBPluginDependency 72.IBPluginDependency 72.ImportedFromIB2 73.IBPluginDependency @@ -2896,7 +2936,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{744, 1273}, {358, 243}} + {{517, 94}, {358, 243}} com.apple.InterfaceBuilder.CocoaPlugin {{197, 734}, {243, 243}} @@ -2936,17 +2976,17 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{1292, 763}, {323, 223}} + {{1292, 114}, {323, 223}} com.apple.InterfaceBuilder.CocoaPlugin {{525, 802}, {197, 73}} - {{102, 986}, {1578, 20}} + {{102, 337}, {1578, 20}} com.apple.InterfaceBuilder.CocoaPlugin {74, 862} {{11, 977}, {478, 20}} com.apple.InterfaceBuilder.CocoaPlugin - {{916, 1283}, {399, 233}} + {{689, 104}, {399, 233}} com.apple.InterfaceBuilder.CocoaPlugin {{475, 832}, {234, 43}} com.apple.InterfaceBuilder.CocoaPlugin @@ -2985,7 +3025,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{824, 337}, {301, 153}} + {{863, 184}, {301, 153}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3003,7 +3043,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{111, 358}, {382, 253}} + {{114, 54}, {388, 283}} com.apple.InterfaceBuilder.CocoaPlugin {{23, 794}, {245, 183}} @@ -3032,6 +3072,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3043,7 +3085,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{576, 1233}, {350, 283}} + {{349, 54}, {350, 283}} com.apple.InterfaceBuilder.CocoaPlugin {{323, 672}, {199, 203}} @@ -3071,7 +3113,7 @@ - 685 + 688 @@ -3085,11 +3127,13 @@ YES orderFrontStandardAboutPanel: showPreferences: + toggleConfirmToQuit: YES id id + id @@ -3098,6 +3142,7 @@ YES orderFrontStandardAboutPanel: showPreferences: + toggleConfirmToQuit: YES @@ -3109,6 +3154,10 @@ showPreferences: id + + toggleConfirmToQuit: + id + @@ -3197,14 +3246,6 @@ - CrApplication - NSApplication - - IBProjectSource - common/chrome_application_mac.h - - - DownloadShelfController NSViewController -- cgit v1.1