summaryrefslogtreecommitdiffstats
path: root/views/controls
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-20 20:02:01 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-20 20:02:01 +0000
commita5d8fac6d37dec61810f55c6f49790644053e88f (patch)
tree963004a074c6d8625fcea032d6eb93b14421c5d0 /views/controls
parentda1d2295239c4eeffab4983e5a3751da40777fe8 (diff)
downloadchromium_src-a5d8fac6d37dec61810f55c6f49790644053e88f.zip
chromium_src-a5d8fac6d37dec61810f55c6f49790644053e88f.tar.gz
chromium_src-a5d8fac6d37dec61810f55c6f49790644053e88f.tar.bz2
Make views/ use strings from app_strings.
http://crbug.com/11387 Review URL: http://codereview.chromium.org/113612 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r--views/controls/button/button_dropdown.cc4
-rw-r--r--views/controls/button/menu_button.cc4
-rw-r--r--views/controls/menu/chrome_menu.cc4
-rw-r--r--views/controls/message_box_view.cc1
-rw-r--r--views/controls/scrollbar/bitmap_scroll_bar.cc28
-rw-r--r--views/controls/text_field.cc50
6 files changed, 45 insertions, 46 deletions
diff --git a/views/controls/button/button_dropdown.cc b/views/controls/button/button_dropdown.cc
index 6c81c24..cb1f6ec 100644
--- a/views/controls/button/button_dropdown.cc
+++ b/views/controls/button/button_dropdown.cc
@@ -7,7 +7,7 @@
#include "app/l10n_util.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
-#include "grit/generated_resources.h"
+#include "grit/app_strings.h"
#include "views/controls/menu/view_menu_delegate.h"
#include "views/widget/widget.h"
@@ -172,7 +172,7 @@ void ButtonDropDown::ShowDropDownMenu(HWND window) {
bool ButtonDropDown::GetAccessibleDefaultAction(std::wstring* action) {
DCHECK(action);
- action->assign(l10n_util::GetString(IDS_ACCACTION_PRESS));
+ action->assign(l10n_util::GetString(IDS_APP_ACCACTION_PRESS));
return true;
}
diff --git a/views/controls/button/menu_button.cc b/views/controls/button/menu_button.cc
index 28045a4..fdb28c0 100644
--- a/views/controls/button/menu_button.cc
+++ b/views/controls/button/menu_button.cc
@@ -9,7 +9,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "app/win_util.h"
-#include "grit/generated_resources.h"
+#include "grit/app_strings.h"
#include "grit/theme_resources.h"
#include "views/controls/button/button.h"
#include "views/controls/menu/view_menu_delegate.h"
@@ -231,7 +231,7 @@ void MenuButton::OnMouseExited(const MouseEvent& event) {
bool MenuButton::GetAccessibleDefaultAction(std::wstring* action) {
DCHECK(action);
- action->assign(l10n_util::GetString(IDS_ACCACTION_PRESS));
+ action->assign(l10n_util::GetString(IDS_APP_ACCACTION_PRESS));
return true;
}
diff --git a/views/controls/menu/chrome_menu.cc b/views/controls/menu/chrome_menu.cc
index 6e5da26..b05552f 100644
--- a/views/controls/menu/chrome_menu.cc
+++ b/views/controls/menu/chrome_menu.cc
@@ -19,7 +19,7 @@
#include "base/task.h"
#include "base/timer.h"
#include "base/win_util.h"
-#include "grit/generated_resources.h"
+#include "grit/app_strings.h"
#include "skia/ext/skia_utils_win.h"
#include "views/border.h"
#include "views/drag_utils.h"
@@ -788,7 +788,7 @@ class EmptyMenuMenuItem : public MenuItemView {
explicit EmptyMenuMenuItem(MenuItemView* parent) :
MenuItemView(parent, 0, NORMAL) {
- SetTitle(l10n_util::GetString(IDS_MENU_EMPTY_SUBMENU));
+ SetTitle(l10n_util::GetString(IDS_APP_MENU_EMPTY_SUBMENU));
// Set this so that we're not identified as a normal menu item.
SetID(kEmptyMenuItemViewID);
SetEnabled(false);
diff --git a/views/controls/message_box_view.cc b/views/controls/message_box_view.cc
index 2ac20af..1d00158 100644
--- a/views/controls/message_box_view.cc
+++ b/views/controls/message_box_view.cc
@@ -10,7 +10,6 @@
#include "base/message_loop.h"
#include "base/scoped_clipboard_writer.h"
#include "base/string_util.h"
-#include "grit/generated_resources.h"
#include "views/controls/button/checkbox.h"
#include "views/standard_layout.h"
#include "views/views_delegate.h"
diff --git a/views/controls/scrollbar/bitmap_scroll_bar.cc b/views/controls/scrollbar/bitmap_scroll_bar.cc
index 2d0fbdf..7770768 100644
--- a/views/controls/scrollbar/bitmap_scroll_bar.cc
+++ b/views/controls/scrollbar/bitmap_scroll_bar.cc
@@ -8,7 +8,7 @@
#include "app/l10n_util.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
-#include "grit/generated_resources.h"
+#include "grit/app_strings.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "views/controls/menu/menu.h"
#include "views/controls/scroll_view.h"
@@ -561,31 +561,31 @@ void BitmapScrollBar::ShowContextMenu(View* source,
std::wstring BitmapScrollBar::GetLabel(int id) const {
switch (id) {
case ScrollBarContextMenuCommand_ScrollHere:
- return l10n_util::GetString(IDS_SCROLLBAR_CXMENU_SCROLLHERE);
+ return l10n_util::GetString(IDS_APP_SCROLLBAR_CXMENU_SCROLLHERE);
case ScrollBarContextMenuCommand_ScrollStart:
if (IsHorizontal())
- return l10n_util::GetString(IDS_SCROLLBAR_CXMENU_SCROLLLEFTEDGE);
- return l10n_util::GetString(IDS_SCROLLBAR_CXMENU_SCROLLHOME);
+ return l10n_util::GetString(IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFTEDGE);
+ return l10n_util::GetString(IDS_APP_SCROLLBAR_CXMENU_SCROLLHOME);
case ScrollBarContextMenuCommand_ScrollEnd:
if (IsHorizontal())
- return l10n_util::GetString(IDS_SCROLLBAR_CXMENU_SCROLLRIGHTEDGE);
- return l10n_util::GetString(IDS_SCROLLBAR_CXMENU_SCROLLEND);
+ return l10n_util::GetString(IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHTEDGE);
+ return l10n_util::GetString(IDS_APP_SCROLLBAR_CXMENU_SCROLLEND);
case ScrollBarContextMenuCommand_ScrollPageUp:
if (IsHorizontal())
- return l10n_util::GetString(IDS_SCROLLBAR_CXMENU_SCROLLPAGEUP);
- return l10n_util::GetString(IDS_SCROLLBAR_CXMENU_SCROLLPAGEUP);
+ return l10n_util::GetString(IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEUP);
+ return l10n_util::GetString(IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEUP);
case ScrollBarContextMenuCommand_ScrollPageDown:
if (IsHorizontal())
- return l10n_util::GetString(IDS_SCROLLBAR_CXMENU_SCROLLPAGEDOWN);
- return l10n_util::GetString(IDS_SCROLLBAR_CXMENU_SCROLLPAGEDOWN);
+ return l10n_util::GetString(IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEDOWN);
+ return l10n_util::GetString(IDS_APP_SCROLLBAR_CXMENU_SCROLLPAGEDOWN);
case ScrollBarContextMenuCommand_ScrollPrev:
if (IsHorizontal())
- return l10n_util::GetString(IDS_SCROLLBAR_CXMENU_SCROLLLEFT);
- return l10n_util::GetString(IDS_SCROLLBAR_CXMENU_SCROLLUP);
+ return l10n_util::GetString(IDS_APP_SCROLLBAR_CXMENU_SCROLLLEFT);
+ return l10n_util::GetString(IDS_APP_SCROLLBAR_CXMENU_SCROLLUP);
case ScrollBarContextMenuCommand_ScrollNext:
if (IsHorizontal())
- return l10n_util::GetString(IDS_SCROLLBAR_CXMENU_SCROLLRIGHT);
- return l10n_util::GetString(IDS_SCROLLBAR_CXMENU_SCROLLDOWN);
+ return l10n_util::GetString(IDS_APP_SCROLLBAR_CXMENU_SCROLLRIGHT);
+ return l10n_util::GetString(IDS_APP_SCROLLBAR_CXMENU_SCROLLDOWN);
}
NOTREACHED() << "Invalid BitmapScrollBar Context Menu command!";
return L"";
diff --git a/views/controls/text_field.cc b/views/controls/text_field.cc
index 2a608bb..759fb37 100644
--- a/views/controls/text_field.cc
+++ b/views/controls/text_field.cc
@@ -21,7 +21,7 @@
#include "base/scoped_clipboard_writer.h"
#include "base/string_util.h"
#include "base/win_util.h"
-#include "grit/generated_resources.h"
+#include "grit/app_strings.h"
#include "skia/ext/skia_utils_win.h"
#include "views/controls/hwnd_view.h"
#include "views/controls/menu/menu_win.h"
@@ -286,18 +286,18 @@ TextField::Edit::Edit(TextField* parent, bool draw_border)
text_object_model_ = ole_interface;
context_menu_.reset(new MenuWin(this, Menu::TOPLEFT, m_hWnd));
- context_menu_->AppendMenuItemWithLabel(IDS_UNDO,
- l10n_util::GetString(IDS_UNDO));
+ context_menu_->AppendMenuItemWithLabel(IDS_APP_UNDO,
+ l10n_util::GetString(IDS_APP_UNDO));
context_menu_->AppendSeparator();
- context_menu_->AppendMenuItemWithLabel(IDS_CUT,
- l10n_util::GetString(IDS_CUT));
- context_menu_->AppendMenuItemWithLabel(IDS_COPY,
- l10n_util::GetString(IDS_COPY));
- context_menu_->AppendMenuItemWithLabel(IDS_PASTE,
- l10n_util::GetString(IDS_PASTE));
+ context_menu_->AppendMenuItemWithLabel(IDS_APP_CUT,
+ l10n_util::GetString(IDS_APP_CUT));
+ context_menu_->AppendMenuItemWithLabel(IDS_APP_COPY,
+ l10n_util::GetString(IDS_APP_COPY));
+ context_menu_->AppendMenuItemWithLabel(IDS_APP_PASTE,
+ l10n_util::GetString(IDS_APP_PASTE));
context_menu_->AppendSeparator();
- context_menu_->AppendMenuItemWithLabel(IDS_SELECT_ALL,
- l10n_util::GetString(IDS_SELECT_ALL));
+ context_menu_->AppendMenuItemWithLabel(IDS_APP_SELECT_ALL,
+ l10n_util::GetString(IDS_APP_SELECT_ALL));
}
TextField::Edit::~Edit() {
@@ -373,14 +373,14 @@ void TextField::Edit::SetBackgroundColor(COLORREF bg_color) {
bool TextField::Edit::IsCommandEnabled(int id) const {
switch (id) {
- case IDS_UNDO: return !parent_->IsReadOnly() && !!CanUndo();
- case IDS_CUT: return !parent_->IsReadOnly() &&
- !parent_->IsPassword() && !!CanCut();
- case IDS_COPY: return !!CanCopy() && !parent_->IsPassword();
- case IDS_PASTE: return !parent_->IsReadOnly() && !!CanPaste();
- case IDS_SELECT_ALL: return !!CanSelectAll();
- default: NOTREACHED();
- return false;
+ case IDS_APP_UNDO: return !parent_->IsReadOnly() && !!CanUndo();
+ case IDS_APP_CUT: return !parent_->IsReadOnly() &&
+ !parent_->IsPassword() && !!CanCut();
+ case IDS_APP_COPY: return !!CanCopy() && !parent_->IsPassword();
+ case IDS_APP_PASTE: return !parent_->IsReadOnly() && !!CanPaste();
+ case IDS_APP_SELECT_ALL: return !!CanSelectAll();
+ default: NOTREACHED();
+ return false;
}
}
@@ -388,12 +388,12 @@ void TextField::Edit::ExecuteCommand(int id) {
ScopedFreeze freeze(this, GetTextObjectModel());
OnBeforePossibleChange();
switch (id) {
- case IDS_UNDO: Undo(); break;
- case IDS_CUT: Cut(); break;
- case IDS_COPY: Copy(); break;
- case IDS_PASTE: Paste(); break;
- case IDS_SELECT_ALL: SelectAll(); break;
- default: NOTREACHED(); break;
+ case IDS_APP_UNDO: Undo(); break;
+ case IDS_APP_CUT: Cut(); break;
+ case IDS_APP_COPY: Copy(); break;
+ case IDS_APP_PASTE: Paste(); break;
+ case IDS_APP_SELECT_ALL: SelectAll(); break;
+ default: NOTREACHED(); break;
}
OnAfterPossibleChange();
}