diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-15 14:28:31 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-15 14:28:31 +0000 |
commit | ad0acc68a5ae79ace062eee99475aa2edb187c4e (patch) | |
tree | 1ecdbdd1c1d6eac04ffd1f010cd0c2253291e69a | |
parent | 8e0bad38b67d236df65ed8123fe06d98ed41bcf0 (diff) | |
download | chromium_src-ad0acc68a5ae79ace062eee99475aa2edb187c4e.zip chromium_src-ad0acc68a5ae79ace062eee99475aa2edb187c4e.tar.gz chromium_src-ad0acc68a5ae79ace062eee99475aa2edb187c4e.tar.bz2 |
Enable/disable "next/previous tab" commands when there is only 1 tab.
BUG=26951
TEST=make sure next/previous tab menu items are correctly enabled/disabled based on the number of tabs.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34554 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 0c892a9..c2a76a6 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -2583,6 +2583,10 @@ void Browser::UpdateCommandsForTabState() { // Window management commands command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB, !(type() & TYPE_APP) && CanDuplicateContentsAt(selected_index())); + command_updater_.UpdateCommandEnabled(IDC_SELECT_NEXT_TAB, + !(type() & TYPE_APP) && tab_count() > 1); + command_updater_.UpdateCommandEnabled(IDC_SELECT_PREVIOUS_TAB, + !(type() & TYPE_APP) && tab_count() > 1); // Current navigation entry, may be NULL. NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); |