diff options
author | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-11 16:41:02 +0000 |
---|---|---|
committer | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-11 16:41:02 +0000 |
commit | 68ecadd8e4594220f98cdbbbeedcdd5a4211d216 (patch) | |
tree | 81ebd45b541963861bd8123d43b6a55f41bab84d /remoting | |
parent | 4857a4f0e4ba1bd153cd29a12f86c6c3ec4f9eb8 (diff) | |
download | chromium_src-68ecadd8e4594220f98cdbbbeedcdd5a4211d216.zip chromium_src-68ecadd8e4594220f98cdbbbeedcdd5a4211d216.tar.gz chromium_src-68ecadd8e4594220f98cdbbbeedcdd5a4211d216.tar.bz2 |
Split Chromoting's Disconnect button text into 2 parts: name + hotkeys.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7613004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/host/disconnect_window.cc | 13 | ||||
-rw-r--r-- | remoting/host/disconnect_window.h | 4 | ||||
-rw-r--r-- | remoting/host/disconnect_window_linux.cc | 4 | ||||
-rw-r--r-- | remoting/host/disconnect_window_win.cc | 1 |
4 files changed, 20 insertions, 2 deletions
diff --git a/remoting/host/disconnect_window.cc b/remoting/host/disconnect_window.cc index 8036856..f225dc4 100644 --- a/remoting/host/disconnect_window.cc +++ b/remoting/host/disconnect_window.cc @@ -8,5 +8,16 @@ namespace remoting { // TODO(garykac): These strings should be localized. const char DisconnectWindow::kTitle[] = "Remoting"; const char DisconnectWindow::kSharingWith[] = "Sharing with: "; -const char DisconnectWindow::kDisconnectButton[] = "Disconnect (Ctrl+Alt+Esc)"; +const char DisconnectWindow::kDisconnectButton[] = "Disconnect"; + +const char DisconnectWindow::kDisconnectKeysLinux[] = " (Ctrl+Alt+Esc)"; +// For Mac: Ctrl+Option+Esc +// Ctrl: U+2303 = 0xE2 0x8C 0x83 (utf8) +// Option: U+2325 = 0xE2 0x8C 0xA5 (utf8) +// Escape: According to http://en.wikipedia.org/wiki/Esc_key, the ISO 9995 +// standard specifies the U+238B glyph for Escape. Although this +// doesn't appear to be in common use. +const char DisconnectWindow::kDisconnectKeysMac[] = + " (\xE2\x8C\x83+\xE2\x8C\xA5+Esc)"; +const char DisconnectWindow::kDisconnectKeysWin[] = " (Ctrl+Alt+Esc)"; } diff --git a/remoting/host/disconnect_window.h b/remoting/host/disconnect_window.h index bf73b09..6ceb671 100644 --- a/remoting/host/disconnect_window.h +++ b/remoting/host/disconnect_window.h @@ -19,6 +19,10 @@ class DisconnectWindow { static const char kSharingWith[]; static const char kDisconnectButton[]; + static const char kDisconnectKeysLinux[]; + static const char kDisconnectKeysMac[]; + static const char kDisconnectKeysWin[]; + // Show the disconnect window allowing the user to shut down |host|. virtual void Show(ChromotingHost* host, const std::string& username) = 0; diff --git a/remoting/host/disconnect_window_linux.cc b/remoting/host/disconnect_window_linux.cc index bfd2e1c..280c43d 100644 --- a/remoting/host/disconnect_window_linux.cc +++ b/remoting/host/disconnect_window_linux.cc @@ -45,11 +45,13 @@ DisconnectWindowLinux::~DisconnectWindowLinux() { void DisconnectWindowLinux::CreateWindow() { if (disconnect_window_) return; + std::string disconnect_button(kDisconnectButton); + disconnect_button += kDisconnectKeysLinux; disconnect_window_ = gtk_dialog_new_with_buttons( kTitle, NULL, GTK_DIALOG_NO_SEPARATOR, - kDisconnectButton, GTK_RESPONSE_OK, + disconnect_button.c_str(), GTK_RESPONSE_OK, NULL); GtkWindow* window = GTK_WINDOW(disconnect_window_); diff --git a/remoting/host/disconnect_window_win.cc b/remoting/host/disconnect_window_win.cc index 5cbc44d..4aa3639 100644 --- a/remoting/host/disconnect_window_win.cc +++ b/remoting/host/disconnect_window_win.cc @@ -89,6 +89,7 @@ BOOL DisconnectWindowWin::OnDialogMessage(HWND hwnd, UINT msg, HWND hwndButton = GetDlgItem(hwnd, IDC_DISCONNECT); CHECK(hwndButton); std::wstring w_button = UTF8ToWide(kDisconnectButton); + w_button += UTF8ToWide(kDisconnectKeysWin); SetWindowText(hwndButton, w_button.c_str()); HWND hwndSharingWith = GetDlgItem(hwnd, IDC_DISCONNECT_SHARINGWITH); |