Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5043)

Unified Diff: chrome/browser/ui/webui/print_preview_data_source.cc

Issue 7721001: PrintPreview: Make ctrl-shift-p start the native print flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/accelerator_table_gtk.cc ('k') | chrome/browser/ui/webui/print_preview_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview_data_source.cc
diff --git a/chrome/browser/ui/webui/print_preview_data_source.cc b/chrome/browser/ui/webui/print_preview_data_source.cc
index ed9bf950c9061b464b7df40d07fe7fcda7e30d81..c0d139a6c50f44438a7d52cc99c6f1c94d418ca7 100644
--- a/chrome/browser/ui/webui/print_preview_data_source.cc
+++ b/chrome/browser/ui/webui/print_preview_data_source.cc
@@ -23,6 +23,19 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+namespace{
+
+#if defined(OS_MACOSX)
+// U+0028 U+21E7 U+2318 U+0050 U+0029 in UTF8
+const char kAdvancedPrintShortcut[] = "\x28\xE2\x8C\x98\xE2\x87\xA7\x50\x29";
+#elif defined(OS_WIN)
+const char kAdvancedPrintShortcut[] = "(Ctrl+Shift+P)";
+#else
+const char kAdvancedPrintShortcut[] = "(Shift+Ctrl+P)";
+#endif
+
+}; // namespace
+
PrintPreviewDataSource::PrintPreviewDataSource()
: ChromeWebUIDataSource(chrome::kChromeUIPrintHost) {
@@ -77,8 +90,15 @@ PrintPreviewDataSource::PrintPreviewDataSource()
IDS_PRINT_PREVIEW_PAGE_LABEL_SINGULAR);
AddLocalizedString("printPreviewPageLabelPlural",
IDS_PRINT_PREVIEW_PAGE_LABEL_PLURAL);
- AddLocalizedString("systemDialogOption",
- IDS_PRINT_PREVIEW_SYSTEM_DIALOG_OPTION);
+#if defined(OS_MACOSX)
Lei Zhang 2011/08/25 23:01:47 Probably don't need this. UTF8ToUTF16 should work
kmadhusu 2011/08/26 02:15:07 Done.
+ const string16 shortcut_text(UTF8ToUTF16(kAdvancedPrintShortcut));
+#else
+ const string16 shortcut_text(ASCIIToUTF16(kAdvancedPrintShortcut));
+#endif
+ AddString("systemDialogOption", l10n_util::GetStringFUTF16(
+ IDS_PRINT_PREVIEW_SYSTEM_DIALOG_OPTION,
+ shortcut_text));
+
AddLocalizedString("pageRangeInstruction",
IDS_PRINT_PREVIEW_PAGE_RANGE_INSTRUCTION);
AddLocalizedString("copiesInstruction", IDS_PRINT_PREVIEW_COPIES_INSTRUCTION);
« no previous file with comments | « chrome/browser/ui/views/accelerator_table_gtk.cc ('k') | chrome/browser/ui/webui/print_preview_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698