Commit d38d8c91 authored by Tetsui Ohkubo's avatar Tetsui Ohkubo Committed by Commit Bot

Use the title for "CAPS LOCK is ON" notification.

Use the title text instead of multi line message for "CAPS LOCK is ON"
notification.
Primarily fix for MD style notification but also works properly in
the current style.

BUG=740813
TEST=manual

Change-Id: I9121ae49fcf77fa4e7092d4a6a354b1d1a21d04e
Reviewed-on: https://chromium-review.googlesource.com/569329
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Reviewed-by: default avatarNaoki Fukino <fukino@chromium.org>
Reviewed-by: default avatarTerry Anderson <tdanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486685}
parent 6062c10e
...@@ -771,12 +771,10 @@ This file contains the strings for ash. ...@@ -771,12 +771,10 @@ This file contains the strings for ash.
Alt+Search or Shift Alt+Search or Shift
</message> </message>
<message name="IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_ALT_SEARCH" desc="The message shown on a bubble when caps lock is turned on."> <message name="IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_ALT_SEARCH" desc="The message shown on a bubble when caps lock is turned on.">
CAPS LOCK is on. Press Alt+Search or Shift to cancel.
Press Alt+Search or Shift to cancel.
</message> </message>
<message name="IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_SEARCH" desc="The message shown on a bubble when caps lock is turned on."> <message name="IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_SEARCH" desc="The message shown on a bubble when caps lock is turned on.">
CAPS LOCK is on. Press Search or Shift to cancel.
Press Search or Shift to cancel.
</message> </message>
<message name="IDS_ASH_STATUS_TRAY_BATTERY_FULL" desc="The label in the tray dialog to indicate that the battery is full."> <message name="IDS_ASH_STATUS_TRAY_BATTERY_FULL" desc="The label in the tray dialog to indicate that the battery is full.">
Battery full Battery full
......
...@@ -52,14 +52,14 @@ bool CapsLockIsEnabled() { ...@@ -52,14 +52,14 @@ bool CapsLockIsEnabled() {
} }
std::unique_ptr<Notification> CreateNotification() { std::unique_ptr<Notification> CreateNotification() {
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
const int string_id = const int string_id =
Shell::Get()->system_tray_delegate()->IsSearchKeyMappedToCapsLock() Shell::Get()->system_tray_delegate()->IsSearchKeyMappedToCapsLock()
? IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_SEARCH ? IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_SEARCH
: IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_ALT_SEARCH; : IDS_ASH_STATUS_TRAY_CAPS_LOCK_CANCEL_BY_ALT_SEARCH;
std::unique_ptr<Notification> notification(new Notification( std::unique_ptr<Notification> notification(new Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, kCapsLockNotificationId, message_center::NOTIFICATION_TYPE_SIMPLE, kCapsLockNotificationId,
base::string16(), bundle.GetLocalizedString(string_id), l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_CAPS_LOCK_ENABLED),
l10n_util::GetStringUTF16(string_id),
gfx::Image( gfx::Image(
gfx::CreateVectorIcon(kSystemMenuCapsLockIcon, gfx::CreateVectorIcon(kSystemMenuCapsLockIcon,
TrayPopupItemStyle::GetIconColor( TrayPopupItemStyle::GetIconColor(
......
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