summaryrefslogtreecommitdiffstats
path: root/chrome/views
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-08 20:50:05 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-08 20:50:05 +0000
commitf1d306e67b8676336f55aae95652d7cd51359534 (patch)
tree6f25205e78ba4c69e7b45468b3fdd0f6bed259f5 /chrome/views
parentb3d565264e6073bd00e4dfd81c8f887ea01fb58c (diff)
downloadchromium_src-f1d306e67b8676336f55aae95652d7cd51359534.zip
chromium_src-f1d306e67b8676336f55aae95652d7cd51359534.tar.gz
chromium_src-f1d306e67b8676336f55aae95652d7cd51359534.tar.bz2
Cleanup, part 1.
* Consistently use underscores between words in identifiers (IDC_NEWTAB -> IDC_NEW_TAB) * Make some identifiers clearer or more up-to-date (IDC_DUPLICATE -> IDC_DUPLICATE_TAB, IDC_GOOFFTHERECORD -> IDC_NEW_INCOGNITO_WINDOW, IDC_NEWPROFILEWINDOW -> IDC_PROFILE_MENU) * Try and make string identifiers (IDS_xxx) match their corresponding IDC_xxx commands. Tony tells me this will not cause any need for retranslation. * As much as possible (without modifying automated UI test XML files), use "Bookmark Bar", not "Bookmarks Bar" (this seemed to be prevailing usage in the code) * Fix 80-column issues This patch touches move files than any subsequent patches, but should be the most rubber-stampable. Review URL: http://codereview.chromium.org/13633 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6535 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views')
-rw-r--r--chrome/views/text_field.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/chrome/views/text_field.cc b/chrome/views/text_field.cc
index 7bc4859..14a9305 100644
--- a/chrome/views/text_field.cc
+++ b/chrome/views/text_field.cc
@@ -290,8 +290,8 @@ TextField::Edit::Edit(TextField* parent, bool draw_border)
context_menu_->AppendMenuItemWithLabel(IDS_PASTE,
l10n_util::GetString(IDS_PASTE));
context_menu_->AppendSeparator();
- context_menu_->AppendMenuItemWithLabel(IDS_SELECTALL,
- l10n_util::GetString(IDS_SELECTALL));
+ context_menu_->AppendMenuItemWithLabel(IDS_SELECT_ALL,
+ l10n_util::GetString(IDS_SELECT_ALL));
}
TextField::Edit::~Edit() {
@@ -360,13 +360,13 @@ 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() && !!CanCut();
- case IDS_COPY: return !!CanCopy();
- case IDS_PASTE: return !parent_->IsReadOnly() && !!CanPaste();
- case IDS_SELECTALL: return !!CanSelectAll();
- default: NOTREACHED();
- return false;
+ case IDS_UNDO: return !parent_->IsReadOnly() && !!CanUndo();
+ case IDS_CUT: return !parent_->IsReadOnly() && !!CanCut();
+ case IDS_COPY: return !!CanCopy();
+ case IDS_PASTE: return !parent_->IsReadOnly() && !!CanPaste();
+ case IDS_SELECT_ALL: return !!CanSelectAll();
+ default: NOTREACHED();
+ return false;
}
}
@@ -374,12 +374,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_SELECTALL: SelectAll(); break;
- default: NOTREACHED(); break;
+ 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;
}
OnAfterPossibleChange();
}