summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-09 04:56:17 +0000
committeryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-09 04:56:17 +0000
commit506ccef8b227e6329a51bd916b6c68e9fdabea14 (patch)
treeea7d93355a1b66dbd9d593b52e112bc092f929ac
parenta3018be3ef7cf4f916a313bca028160694f87d7e (diff)
downloadchromium_src-506ccef8b227e6329a51bd916b6c68e9fdabea14.zip
chromium_src-506ccef8b227e6329a51bd916b6c68e9fdabea14.tar.gz
chromium_src-506ccef8b227e6329a51bd916b6c68e9fdabea14.tar.bz2
Don't show IME properties when current language is set to XKB.
BUG=1727 TEST=see the bug Review URL: http://codereview.chromium.org/669265 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40999 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/status/language_menu_button.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/chromeos/status/language_menu_button.cc b/chrome/browser/chromeos/status/language_menu_button.cc
index ab28f32..be16920 100644
--- a/chrome/browser/chromeos/status/language_menu_button.cc
+++ b/chrome/browser/chromeos/status/language_menu_button.cc
@@ -323,6 +323,10 @@ void LanguageMenuButton::RunMenu(views::View* source, const gfx::Point& pt) {
void LanguageMenuButton::LanguageChanged(LanguageLibrary* obj) {
const std::string name = FormatInputLanguage(obj->current_language(), false);
UpdateIcon(UTF8ToWide(name));
+
+ // This is necessary to remove IME properties when the current language is
+ // switched to XKB.
+ RebuildModel();
}
void LanguageMenuButton::ImePropertiesChanged(LanguageLibrary* obj) {
@@ -358,7 +362,10 @@ void LanguageMenuButton::RebuildModel() {
const ImePropertyList& property_list
= LanguageLibrary::Get()->current_ime_properties();
- if (!property_list.empty()) {
+ const InputLanguage& current_language
+ = LanguageLibrary::Get()->current_language();
+ if ((!property_list.empty()) &&
+ (current_language.category == chromeos::LANGUAGE_CATEGORY_IME)) {
if (need_separator)
model_->AddSeparator();
for (size_t i = 0; i < property_list.size(); ++i) {