summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-21 20:58:48 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-21 20:58:48 +0000
commita99fce0ea927c4040410566b7c6a31049a9d9811 (patch)
treeb254206eb05db424f05155aa79d2cf2694f195d1 /chrome/app
parent89f5aa8cd1f29a63a989907c454495993659854e (diff)
downloadchromium_src-a99fce0ea927c4040410566b7c6a31049a9d9811.zip
chromium_src-a99fce0ea927c4040410566b7c6a31049a9d9811.tar.gz
chromium_src-a99fce0ea927c4040410566b7c6a31049a9d9811.tar.bz2
[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
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/generated_resources.grd9
-rw-r--r--chrome/app/nibs/MainMenu.xib81
2 files changed, 64 insertions, 26 deletions
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
<message name="IDS_FLAGS_PAGE_PRERENDER_DISABLED" desc="Option name for always disabling the 'Prerendering' lab">
Always Disabled
</message>
- <message name="IDS_FLAGS_CONFIRM_TO_QUIT_NAME" desc="Name of the 'Confirm to Quit' lab.">
- Confirm to Quit
- </message>
- <message name="IDS_FLAGS_CONFIRM_TO_QUIT_DESCRIPTION" desc="Description of the 'Confirm to Quit' lab.">
- Receive a prompt before quitting to confirm the action.
- </message>
<message name="IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME" desc="Name of the 'Experimental Extension APIs' lab.">
Experimental Extension APIs
</message>
@@ -4775,6 +4769,9 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_CONFIRM_TO_QUIT_DESCRIPTION" desc="Instructions for how the user should confirm quitting.">
Hold <ph name="KEY_EQUIVALENT">$1<ex>⌘Q</ex></ph> to Quit.
</message>
+ <message name="IDS_CONFIRM_TO_QUIT_OPTION" desc="The label of the checkbox preference that enables the confirm-to-quit feature.">
+ Warn Before Quitting (<ph name="KEY_EQUIVALENT">$1<ex>⌘Q</ex></ph>)
+ </message>
<!-- Importer Lock Dialog -->
<message name="IDS_IMPORTER_LOCK_TITLE" desc="Dialog title for importer lock dialog">
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 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">10F2108</string>
+ <string key="IBDocument.SystemVersion">10J567</string>
<string key="IBDocument.InterfaceBuilderVersion">823</string>
- <string key="IBDocument.AppKitVersion">1038.29</string>
- <string key="IBDocument.HIToolboxVersion">461.00</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
+ <string key="IBDocument.HIToolboxVersion">462.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">823</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="24"/>
+ <integer value="57"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -197,6 +197,24 @@
<reference key="NSOnImage" ref="353210768"/>
<reference key="NSMixedImage" ref="549394948"/>
</object>
+ <object class="NSMenuItem" id="140035077">
+ <reference key="NSMenu" ref="110575045"/>
+ <string key="NSTitle">^IDS_CONFIRM_TO_QUIT_OPTION</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="353210768"/>
+ <reference key="NSMixedImage" ref="549394948"/>
+ </object>
+ <object class="NSMenuItem" id="276231874">
+ <reference key="NSMenu" ref="110575045"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="353210768"/>
+ <reference key="NSMixedImage" ref="549394948"/>
+ </object>
<object class="NSMenuItem" id="632727374">
<reference key="NSMenu" ref="110575045"/>
<string key="NSTitle">^IDS_EXIT_MAC$IDS_PRODUCT_NAME</string>
@@ -1772,6 +1790,14 @@
</object>
<int key="connectionID">685</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleConfirmToQuit:</string>
+ <reference key="source" ref="168151378"/>
+ <reference key="destination" ref="140035077"/>
+ </object>
+ <int key="connectionID">688</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -2105,6 +2131,8 @@
<reference ref="198763083"/>
<reference ref="198763083"/>
<reference ref="214319129"/>
+ <reference ref="276231874"/>
+ <reference ref="140035077"/>
</object>
<reference key="parent" ref="694149608"/>
</object>
@@ -2628,6 +2656,16 @@
<reference key="object" ref="693413486"/>
<reference key="parent" ref="835318025"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">686</int>
+ <reference key="object" ref="276231874"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">687</int>
+ <reference key="object" ref="140035077"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -2820,6 +2858,8 @@
<string>674.IBPluginDependency</string>
<string>676.IBPluginDependency</string>
<string>682.IBPluginDependency</string>
+ <string>686.IBPluginDependency</string>
+ <string>687.IBPluginDependency</string>
<string>72.IBPluginDependency</string>
<string>72.ImportedFromIB2</string>
<string>73.IBPluginDependency</string>
@@ -2896,7 +2936,7 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{744, 1273}, {358, 243}}</string>
+ <string>{{517, 94}, {358, 243}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{197, 734}, {243, 243}}</string>
@@ -2936,17 +2976,17 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{1292, 763}, {323, 223}}</string>
+ <string>{{1292, 114}, {323, 223}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{525, 802}, {197, 73}}</string>
- <string>{{102, 986}, {1578, 20}}</string>
+ <string>{{102, 337}, {1578, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{74, 862}</string>
<string>{{11, 977}, {478, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{916, 1283}, {399, 233}}</string>
+ <string>{{689, 104}, {399, 233}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{475, 832}, {234, 43}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -2985,7 +3025,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{824, 337}, {301, 153}}</string>
+ <string>{{863, 184}, {301, 153}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -3003,7 +3043,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{111, 358}, {382, 253}}</string>
+ <string>{{114, 54}, {388, 283}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{23, 794}, {245, 183}}</string>
@@ -3032,6 +3072,8 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
@@ -3043,7 +3085,7 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{576, 1233}, {350, 283}}</string>
+ <string>{{349, 54}, {350, 283}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{323, 672}, {199, 203}}</string>
@@ -3071,7 +3113,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">685</int>
+ <int key="maxID">688</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -3085,11 +3127,13 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>orderFrontStandardAboutPanel:</string>
<string>showPreferences:</string>
+ <string>toggleConfirmToQuit:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
@@ -3098,6 +3142,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>orderFrontStandardAboutPanel:</string>
<string>showPreferences:</string>
+ <string>toggleConfirmToQuit:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -3109,6 +3154,10 @@
<string key="name">showPreferences:</string>
<string key="candidateClassName">id</string>
</object>
+ <object class="IBActionInfo">
+ <string key="name">toggleConfirmToQuit:</string>
+ <string key="candidateClassName">id</string>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -3197,14 +3246,6 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">CrApplication</string>
- <string key="superclassName">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">common/chrome_application_mac.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">DownloadShelfController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">