diff options
| author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-27 20:00:01 +0000 |
|---|---|---|
| committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-27 20:00:01 +0000 |
| commit | 29f8598a0ab092fbb5eb9eea8676ae22f5ce1fbf (patch) | |
| tree | 83a8b6ab114f424546ba5b60a2cac8069191bcf0 /chrome/browser/cocoa/wrench_menu_controller.mm | |
| parent | 079548b6cea329582d60143cc18f00a59a6cc4cd (diff) | |
| download | chromium_src-29f8598a0ab092fbb5eb9eea8676ae22f5ce1fbf.zip chromium_src-29f8598a0ab092fbb5eb9eea8676ae22f5ce1fbf.tar.gz chromium_src-29f8598a0ab092fbb5eb9eea8676ae22f5ce1fbf.tar.bz2 | |
[Mac] Do not insert an "About Chrome" item when the Wrench menu shows an available update.
Changes to the WrenchMenuModel have made |-[WrenchMenuController insertUpdateAvailableItem]|
obsolete. The Upgrade item is now inserted when the menu is built but is just
marked as hidden; the About item is now distinct and never inserted on Mac.
BUG=56023
TEST=Be out of date with 1 window open. Wait for the upgrade ball to appear. Open the Wrench menu and do not see an "About Chrome" item.
Review URL: http://codereview.chromium.org/3455027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60695 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/wrench_menu_controller.mm')
| -rw-r--r-- | chrome/browser/cocoa/wrench_menu_controller.mm | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/chrome/browser/cocoa/wrench_menu_controller.mm b/chrome/browser/cocoa/wrench_menu_controller.mm index 4966157..3c76d92 100644 --- a/chrome/browser/cocoa/wrench_menu_controller.mm +++ b/chrome/browser/cocoa/wrench_menu_controller.mm @@ -169,36 +169,6 @@ class ZoomLevelObserver : public NotificationObserver { return static_cast<WrenchMenuModel*>(model_); } -// Inserts the update available notification menu item. -- (void)insertUpdateAvailableItem { - WrenchMenuModel* model = [self wrenchMenuModel]; - // Don't insert the item multiple times. - if (!model || model->GetIndexOfCommandId(IDC_ABOUT) != -1) - return; - - // Update the model manually because the model is static because other - // platforms always have an About item. - int index = model->GetIndexOfCommandId(IDC_OPTIONS) + 1; - model->InsertItemAt(index, IDC_ABOUT, - l10n_util::GetStringFUTF16(IDS_ABOUT, - l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); - - // The model does not broadcast change notifications to its delegate, so - // insert the actual menu item ourselves. - NSInteger menuIndex = [[self menu] indexOfItemWithTag:index]; - [self addItemToMenu:[self menu] - atIndex:menuIndex - fromModel:model - modelIndex:index]; - - // Since the tag of each menu item is the index within the model, they need - // to be adjusted after insertion. - for (NSInteger i = menuIndex + 1; i < [[self menu] numberOfItems]; ++i) { - NSMenuItem* item = [[self menu] itemAtIndex:i]; - [item setTag:[item tag] + 1]; - } -} - // Fit the localized strings into the Cut/Copy/Paste control, then resize the // whole menu item accordingly. - (void)adjustPositioning { |
