Commit f3555a04 authored by Shu Chen's avatar Shu Chen Committed by Commit Bot

Don't show the IME mode icon in UnifiedSystemTray when the IME mode icon on shelf bar is activated.

Bug: 861875
Change-Id: Ie6d0976b1e71a637b12c330323b876bfcb95cc27
Reviewed-on: https://chromium-review.googlesource.com/1130572Reviewed-by: default avatarYuichiro Hanada <yhanada@chromium.org>
Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Commit-Queue: Shu Chen <shuchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574177}
parent 4e73dbe7
...@@ -34,6 +34,7 @@ void ImeModeView::OnIMERefresh() { ...@@ -34,6 +34,7 @@ void ImeModeView::OnIMERefresh() {
} }
void ImeModeView::OnIMEMenuActivationChanged(bool is_active) { void ImeModeView::OnIMEMenuActivationChanged(bool is_active) {
ime_menu_on_shelf_activated_ = is_active;
Update(); Update();
} }
...@@ -58,7 +59,8 @@ void ImeModeView::Update() { ...@@ -58,7 +59,8 @@ void ImeModeView::Update() {
ImeController* ime_controller = Shell::Get()->ime_controller(); ImeController* ime_controller = Shell::Get()->ime_controller();
size_t ime_count = ime_controller->available_imes().size(); size_t ime_count = ime_controller->available_imes().size();
SetVisible(ime_count > 1 || ime_controller->managed_by_policy()); SetVisible(!ime_menu_on_shelf_activated_ &&
(ime_count > 1 || ime_controller->managed_by_policy()));
label()->SetText(ime_controller->current_ime().short_name); label()->SetText(ime_controller->current_ime().short_name);
Layout(); Layout();
......
...@@ -31,6 +31,8 @@ class ImeModeView : public TrayItemView, ...@@ -31,6 +31,8 @@ class ImeModeView : public TrayItemView,
private: private:
void Update(); void Update();
bool ime_menu_on_shelf_activated_ = false;
DISALLOW_COPY_AND_ASSIGN(ImeModeView); DISALLOW_COPY_AND_ASSIGN(ImeModeView);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment