From 273865aa130f61f321d3eeafc0ea5a2a6dc9adf8 Mon Sep 17 00:00:00 2001 From: "pinkerton@chromium.org" Date: Wed, 9 Dec 2009 19:56:30 +0000 Subject: Share the code that builds the page menu in a common model, make Mac and Win use it. Implement a mac menu controller that takes this model and generates an NSMenu. Remove the Page Menu NSMenu from Toolbar.xib since it's now created in code. BUG=22646 TEST=page menu should work as before Review URL: http://codereview.chromium.org/465130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34179 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/app/nibs/Toolbar.xib | 710 ++++---------------------------------------- 1 file changed, 55 insertions(+), 655 deletions(-) (limited to 'chrome/app') diff --git a/chrome/app/nibs/Toolbar.xib b/chrome/app/nibs/Toolbar.xib index 9363025..b4aed92 100644 --- a/chrome/app/nibs/Toolbar.xib +++ b/chrome/app/nibs/Toolbar.xib @@ -8,9 +8,6 @@ 353.00 YES - - - YES @@ -46,6 +43,7 @@ 265 {{540, 0}, {0.777771, 36}} + NSView @@ -53,6 +51,7 @@ 266 {{165, 5}, {341, 27}} + 33004 YES @@ -91,6 +90,7 @@ 268 {{101, 5}, {31, 27}} + 33003 YES @@ -120,6 +120,7 @@ 268 {{136, 5}, {29, 27}} + 35000 YES @@ -150,6 +151,7 @@ 268 {{66, 5}, {31, 27}} + 33002 YES @@ -175,6 +177,7 @@ 268 {{34, 5}, {28, 27}} + 33001 YES @@ -201,6 +204,7 @@ 268 {{5, 5}, {29, 27}} + 33000 YES @@ -227,6 +231,7 @@ 265 {{506, 5}, {29, 27}} + 33005 YES @@ -253,6 +258,7 @@ 265 {{540, 5}, {35, 27}} + 33005 YES @@ -278,6 +284,7 @@ 265 {{574, 5}, {35, 27}} + 33005 YES @@ -301,263 +308,34 @@ {618, 36} + ToolbarView - - Page Menu + + Wrench Menu YES - - + + 2147483647 - + NSImage NSMenuCheckmark - + NSImage NSMenuMixedState - - - ^IDS_CREATE_SHORTCUTS - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - ^IDS_CUT - - 2147483647 - - - - - - ^IDS_COPY - - 2147483647 - - - - - - ^IDS_PASTE - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - ^IDS_FIND - - 2147483647 - - - 37000 - - - - ^IDS_SAVE_PAGE - - 2147483647 - - - 35005 - - - - ^IDS_PRINT - - 2147483647 - - - 35004 - - - - YES - YES - - - 2147483647 - - - - - - ^IDS_ZOOM_MENU - - 2147483647 - - - submenuAction: - - ^IDS_ZOOM_MENU - - YES - - - ^IDS_ZOOM_PLUS - - 2147483647 - - - 38001 - - - - ^IDS_ZOOM_NORMAL - - 2147483647 - - - 38002 - - - - ^IDS_ZOOM_MINUS - - 2147483647 - - - 38003 - - - - - - - ^IDS_ENCODING_MENU - - 2147483647 - - - submenuAction: - - ^IDS_ENCODING_MENU - - YES - - - - - - YES - YES - - - 2147483647 - - - - - - ^IDS_DEVELOPER_MENU - - 2147483647 - - - submenuAction: - - ^IDS_DEVELOPER_MENU - - YES - - - ^IDS_VIEW_SOURCE - - 2147483647 - - - 35002 - - - - ^IDS_DEV_TOOLS - - 2147483647 - - - 40004 - - - - ^IDS_TASK_MANAGER - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - ^IDS_REPORT_BUG - - 2147483647 - - - 40008 - - - - - Wrench Menu - - YES - - - - - 2147483647 - - - ^IDS_NEW_TAB 2147483647 - - + + 34014 @@ -565,8 +343,8 @@ ^IDS_NEW_WINDOW 2147483647 - - + + 34000 @@ -574,8 +352,8 @@ ^IDS_NEW_INCOGNITO_WINDOW 2147483647 - - + + 34001 @@ -585,16 +363,16 @@ 2147483647 - - + + ^IDS_BOOMARK_BAR_ALWAYS_SHOW 2147483647 - - + + 40009 @@ -602,8 +380,8 @@ ^IDS_FULLSCREEN 2147483647 - - + + 34030 @@ -613,16 +391,16 @@ 2147483647 - - + + ^IDS_CLEAR_BROWSING_DATA_MAC 2147483647 - - + + 40013 @@ -630,8 +408,8 @@ ^IDS_IMPORT_SETTINGS_TITLE 2147483647 - - + + 40014 @@ -641,16 +419,16 @@ 2147483647 - - + + ^IDS_SHOW_HISTORY 2147483647 - - + + 40010 @@ -658,16 +436,16 @@ ^IDS_BOOKMARK_MANAGER 2147483647 - - + + ^IDS_SHOW_DOWNLOADS 2147483647 - - + + 40012 @@ -675,8 +453,8 @@ ^IDS_SHOW_EXTENSIONS 2147483647 - - + + 40023 @@ -686,8 +464,8 @@ 2147483647 - - + + @@ -696,8 +474,8 @@ ^IDS_SYNC_START_SYNC_BUTTON_LABEL 2147483647 - - + + 41108 @@ -708,16 +486,16 @@ 2147483647 - - + + ^IDS_PREFERENCES_MAC 2147483647 - - + + @@ -847,110 +625,6 @@ commandDispatch: - - - 71 - - - - commandDispatch: - - - - 75 - - - - commandDispatch: - - - - 76 - - - - commandDispatch: - - - - 77 - - - - commandDispatch: - - - - 78 - - - - cut: - - - - 79 - - - - copy: - - - - 80 - - - - paste: - - - - 81 - - - - commandDispatch: - - - - 84 - - - - commandDispatch: - - - - 85 - - - - commandDispatch: - - - - 86 - - - - commandDispatch: - - - - 93 - - - - commandDispatch: - - - - 95 - - - - commandDispatch: - 108 @@ -1045,22 +719,6 @@ - encodingMenu_ - - - - 134 - - - - attachedMenu_ - - - - 135 - - - attachedMenu_ @@ -1069,14 +727,6 @@ - commandDispatch: - - - - 137 - - - commandDispatchUsingKeyModifiers: @@ -1092,14 +742,6 @@ 139 - - yetAnotherObjectToLocalize_ - - - - 140 - - commandDispatch: @@ -1314,46 +956,6 @@ - 42 - - - YES - - - - - - - - - - - - - - - - - - - - - - 43 - - - - - 44 - - - - - 45 - - - - 48 @@ -1396,143 +998,6 @@ - 52 - - - - - 53 - - - - - 54 - - - - - 55 - - - - - 56 - - - - - 57 - - - - - 58 - - - - - 59 - - - YES - - - - - - 60 - - - YES - - - - - - - - 61 - - - - - 62 - - - - - 63 - - - YES - - - - - - 64 - - - YES - - - - - - - - 65 - - - - - 66 - - - YES - - - - - - 67 - - - YES - - - - - 69 - - - - - 70 - - - - - 82 - - - - - 83 - - - - - 87 - - - - - 88 - - - - 96 @@ -1583,11 +1048,6 @@ - 127 - - - - 129 @@ -1655,7 +1115,6 @@ 12.CustomClassName 12.IBPluginDependency 122.IBPluginDependency - 127.IBPluginDependency 129.IBPluginDependency 13.CustomClassName 13.IBPluginDependency @@ -1692,47 +1151,17 @@ 39.IBPluginDependency 4.CustomClassName 4.IBPluginDependency - 42.IBEditorWindowLastContentRect - 42.IBPluginDependency - 43.IBPluginDependency - 44.IBPluginDependency - 45.IBPluginDependency 48.IBEditorWindowLastContentRect 48.IBPluginDependency 49.IBPluginDependency 5.IBPluginDependency 50.IBPluginDependency 51.IBPluginDependency - 52.IBPluginDependency - 53.IBPluginDependency - 54.IBPluginDependency - 55.IBPluginDependency - 56.IBPluginDependency - 57.IBPluginDependency - 58.IBPluginDependency - 59.IBPluginDependency - 60.IBEditorWindowLastContentRect - 60.IBPluginDependency - 61.IBPluginDependency - 62.IBPluginDependency - 63.IBPluginDependency - 64.IBEditorWindowLastContentRect - 64.IBPluginDependency - 65.IBPluginDependency - 66.IBPluginDependency - 67.IBEditorWindowLastContentRect - 67.IBPluginDependency - 69.IBPluginDependency 7.CustomClassName 7.IBAttributePlaceholdersKey 7.IBPluginDependency - 70.IBPluginDependency 8.IBAttributePlaceholdersKey 8.IBPluginDependency - 82.IBPluginDependency - 83.IBPluginDependency - 87.IBPluginDependency - 88.IBPluginDependency 9.CustomClassName 9.IBPluginDependency 96.IBPluginDependency @@ -1759,7 +1188,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin AutocompleteTextFieldCell com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -1831,37 +1259,12 @@ com.apple.InterfaceBuilder.CocoaPlugin AutocompleteTextField com.apple.InterfaceBuilder.CocoaPlugin - {{444, 446}, {235, 293}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin {{48, 162}, {335, 333}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{404, 503}, {202, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{1211, 422}, {201, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{404, 540}, {64, 6}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin DelayedMenuButton ToolTip @@ -1872,7 +1275,6 @@ com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin ToolTip @@ -1882,10 +1284,6 @@ com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin ToolbarButtonCell com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -1941,11 +1339,13 @@ YES closeTabMenuItem_ closeWindowMenuItem_ + helpMenu_ YES NSMenuItem NSMenuItem + NSMenu -- cgit v1.1