summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authorcsilv@chromium.org <csilv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-16 02:46:15 +0000
committercsilv@chromium.org <csilv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-16 02:46:15 +0000
commit44bf7009a31eacc334fbf2dd33b8a97924deff54 (patch)
tree1b6b610d4c4d06bfaedf853ad16843854bb51037 /chrome/app
parent0ef58fd2c529dd425c7e3beea4a88325983c870e (diff)
downloadchromium_src-44bf7009a31eacc334fbf2dd33b8a97924deff54.zip
chromium_src-44bf7009a31eacc334fbf2dd33b8a97924deff54.tar.gz
chromium_src-44bf7009a31eacc334fbf2dd33b8a97924deff54.tar.bz2
Add a contextual menu command for 'Paste and plain text' (or 'Paste and Match Style' on Mac)
MainMenu.xib details: - Change 'Paste and Match Style' to send the pasteAndMatchStyle: message. BUG=25238 TEST=In an editable field on a web page, right-click to 'Paste as plain text'. Review URL: http://codereview.chromium.org/8234006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105710 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/chrome_command_ids.h1
-rw-r--r--chrome/app/generated_resources.grd17
-rw-r--r--chrome/app/nibs/MainMenu.xib59
3 files changed, 47 insertions, 30 deletions
diff --git a/chrome/app/chrome_command_ids.h b/chrome/app/chrome_command_ids.h
index fc334fa..228347a 100644
--- a/chrome/app/chrome_command_ids.h
+++ b/chrome/app/chrome_command_ids.h
@@ -258,6 +258,7 @@
#define IDC_CONTENT_CONTEXT_UNDO 50144
#define IDC_CONTENT_CONTEXT_REDO 50145
#define IDC_CONTENT_CONTEXT_SELECTALL 50146
+#define IDC_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE 50147
// Other items.
#define IDC_CONTENT_CONTEXT_TRANSLATE 50150
#define IDC_CONTENT_CONTEXT_INSPECTELEMENT 50151
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index d64a6d1..bf4dad1 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -734,6 +734,23 @@ are declared in build/common.gypi.
</message>
</if>
+ <!-- Paste and Match Style / Paste as Plain Text -->
+ <if expr="is_macosx">
+ <message name="IDS_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE" desc="Mac/In Title Case: The name of the 'Paste and Match Style' command in the content area context menu">
+ Paste and Match Style
+ </message>
+ </if>
+ <if expr="not is_macosx and pp_ifdef('use_titlecase')">
+ <message name="IDS_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE" desc="In Title Case: The name of the 'Paste as plain text' command in the content area context menu">
+ Paste As Plain Text
+ </message>
+ </if>
+ <if expr="not is_macosx and not pp_ifdef('use_titlecase')">
+ <message name="IDS_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE" desc="The name of the 'Paste as plain text' command in the content area context menu">
+ Paste as plain text
+ </message>
+ </if>
+
<!-- Page menu -->
<if expr="not pp_ifdef('use_titlecase')">
<message name="IDS_NEW_TAB" desc="The text label of the New Tab menu item">
diff --git a/chrome/app/nibs/MainMenu.xib b/chrome/app/nibs/MainMenu.xib
index 2cf45a1..5b62df2 100644
--- a/chrome/app/nibs/MainMenu.xib
+++ b/chrome/app/nibs/MainMenu.xib
@@ -12,7 +12,6 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="81"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1728,14 +1727,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
- <string key="label">pasteAsPlainText:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="688066565"/>
- </object>
- <int key="connectionID">659</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
<string key="label">commandDispatch:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="1008975930"/>
@@ -1840,14 +1831,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
- <string key="label">pasteAsPlainText:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="499460629"/>
- </object>
- <int key="connectionID">690</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
<string key="label">commandDispatch:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="210963491"/>
@@ -1862,6 +1845,22 @@
</object>
<int key="connectionID">695</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">pasteAndMatchStyle:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="688066565"/>
+ </object>
+ <int key="connectionID">696</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">pasteAndMatchStyle:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="499460629"/>
+ </object>
+ <int key="connectionID">697</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -3030,7 +3029,7 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{512, 142}, {358, 263}}</string>
+ <string>{{442, 276}, {358, 263}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{197, 734}, {243, 243}}</string>
@@ -3074,7 +3073,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{525, 802}, {197, 73}}</string>
- <string>{{0, 539}, {1852, 20}}</string>
+ <string>{{6, 364}, {1852, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{74, 862}</string>
@@ -3213,7 +3212,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">695</int>
+ <int key="maxID">697</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -3440,11 +3439,13 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>commandDispatch:</string>
<string>copyToFindPboard:</string>
+ <string>pasteAndMatchStyle:</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">
@@ -3453,6 +3454,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>commandDispatch:</string>
<string>copyToFindPboard:</string>
+ <string>pasteAndMatchStyle:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -3464,6 +3466,10 @@
<string key="name">copyToFindPboard:</string>
<string key="candidateClassName">id</string>
</object>
+ <object class="IBActionInfo">
+ <string key="name">pasteAndMatchStyle:</string>
+ <string key="candidateClassName">id</string>
+ </object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -3544,28 +3550,21 @@
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">browser/renderer_host/accelerated_plugin_view_mac.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">browser/ui/cocoa/objc_zombie.h</string>
+ <string key="minorKey">browser/ui/cocoa/status_bubble_mac.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">browser/ui/cocoa/status_bubble_mac.h</string>
+ <string key="minorKey">browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h</string>
+ <string key="minorKey">common/mac/objc_zombie.h</string>
</object>
</object>
<object class="IBPartialClassDescription">