From ad0acc68a5ae79ace062eee99475aa2edb187c4e Mon Sep 17 00:00:00 2001 From: "pinkerton@chromium.org" Date: Tue, 15 Dec 2009 14:28:31 +0000 Subject: 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 --- chrome/browser/browser.cc | 4 ++++ 1 file changed, 4 insertions(+) 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(); -- cgit v1.1