diff options
-rw-r--r-- | ash/system/ime/tray_ime.cc | 11 | ||||
-rw-r--r-- | ash/system/ime/tray_ime.h | 2 | ||||
-rw-r--r-- | ash/system/tray_caps_lock.cc | 13 | ||||
-rw-r--r-- | ash/system/tray_caps_lock.h | 1 |
4 files changed, 18 insertions, 9 deletions
diff --git a/ash/system/ime/tray_ime.cc b/ash/system/ime/tray_ime.cc index b33462e..b301df7 100644 --- a/ash/system/ime/tray_ime.cc +++ b/ash/system/ime/tray_ime.cc @@ -219,7 +219,8 @@ TrayIME::TrayIME() : tray_label_(NULL), default_(NULL), detailed_(NULL), - notification_(NULL) { + notification_(NULL), + message_shown_(false) { } TrayIME::~TrayIME() { @@ -308,11 +309,11 @@ void TrayIME::OnIMERefresh(bool show_message) { if (detailed_) detailed_->Update(list, property_list); - if (show_message) { - if (!notification_) + if (show_message && !message_shown_) { + if (!notification_) { ShowNotificationView(); - else - notification_->RestartAutoCloseTimer(); + message_shown_ = true; + } } } diff --git a/ash/system/ime/tray_ime.h b/ash/system/ime/tray_ime.h index 5ec433a..f16396b 100644 --- a/ash/system/ime/tray_ime.h +++ b/ash/system/ime/tray_ime.h @@ -56,6 +56,8 @@ class TrayIME : public SystemTrayItem, tray::IMEDetailedView* detailed_; tray::IMENotificationView* notification_; + bool message_shown_; + DISALLOW_COPY_AND_ASSIGN(TrayIME); }; diff --git a/ash/system/tray_caps_lock.cc b/ash/system/tray_caps_lock.cc index b6aaeb2..f75adb6 100644 --- a/ash/system/tray_caps_lock.cc +++ b/ash/system/tray_caps_lock.cc @@ -102,7 +102,8 @@ TrayCapsLock::TrayCapsLock() detailed_(NULL), search_mapped_to_caps_lock_(false), caps_lock_enabled_( - Shell::GetInstance()->tray_delegate()->IsCapsLockOn()) { + Shell::GetInstance()->tray_delegate()->IsCapsLockOn()), + message_shown_(false) { } TrayCapsLock::~TrayCapsLock() {} @@ -165,10 +166,14 @@ void TrayCapsLock::OnCapsLockChanged(bool enabled, if (default_) { default_->Update(enabled, search_mapped_to_caps_lock); } else { - if (enabled) - PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); - else if (detailed_) + if (enabled) { + if (!message_shown_) { + PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); + message_shown_ = true; + } + } else if (detailed_) { detailed_->GetWidget()->Close(); + } } } diff --git a/ash/system/tray_caps_lock.h b/ash/system/tray_caps_lock.h index e18127f..397e742 100644 --- a/ash/system/tray_caps_lock.h +++ b/ash/system/tray_caps_lock.h @@ -50,6 +50,7 @@ class TrayCapsLock : public TrayImageItem, bool search_mapped_to_caps_lock_; bool caps_lock_enabled_; + bool message_shown_; DISALLOW_COPY_AND_ASSIGN(TrayCapsLock); }; |