summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-24 10:08:36 +0000
committeryusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-24 10:08:36 +0000
commitc1a645cf9ae5d93e676c3068be1d9d93a16b5a14 (patch)
tree9e763b98927558c115b1468f43701637622c1657
parentccd6c20dd477b125c32dd851c799289c5660b4a2 (diff)
downloadchromium_src-c1a645cf9ae5d93e676c3068be1d9d93a16b5a14.zip
chromium_src-c1a645cf9ae5d93e676c3068be1d9d93a16b5a14.tar.gz
chromium_src-c1a645cf9ae5d93e676c3068be1d9d93a16b5a14.tar.bz2
Don't show the tooltip for the language indicator when the indicator is hidden.
BUG=chromium-os:4227 TEST=manual Review URL: http://codereview.chromium.org/2837015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50713 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/status/language_menu_button.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/status/language_menu_button.cc b/chrome/browser/chromeos/status/language_menu_button.cc
index 7265c70..943c3e8 100644
--- a/chrome/browser/chromeos/status/language_menu_button.cc
+++ b/chrome/browser/chromeos/status/language_menu_button.cc
@@ -421,9 +421,6 @@ void LanguageMenuButton::LocaleChanged() {
void LanguageMenuButton::UpdateIndicator(
const std::wstring& name, const std::wstring& tooltip) {
- if (!tooltip.empty()) {
- SetTooltipText(tooltip);
- }
// Hide the button only if there is only one input method, and the input
// method is a XKB keyboard layout. We don't hide the button for other
// types of input methods as these might have intra input method modes,
@@ -435,8 +432,10 @@ void LanguageMenuButton::UpdateIndicator(
// As the disabled color is set to invisible, disabling makes the
// button disappear.
SetEnabled(false);
+ SetTooltipText(L""); // remove tooltip
} else {
SetEnabled(true);
+ SetTooltipText(tooltip);
}
SetText(name);
set_alignment(TextButton::ALIGN_RIGHT);