diff options
author | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-27 00:15:57 +0000 |
---|---|---|
committer | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-27 00:15:57 +0000 |
commit | e788980fade2d430979134ebb9d69a03d7ccf90d (patch) | |
tree | 565bc65271f4aa01ebf4f8674c23e8b57a670e68 | |
parent | 9cdd435401eb674ed72e02ddf945668fd271d1ac (diff) | |
download | chromium_src-e788980fade2d430979134ebb9d69a03d7ccf90d.zip chromium_src-e788980fade2d430979134ebb9d69a03d7ccf90d.tar.gz chromium_src-e788980fade2d430979134ebb9d69a03d7ccf90d.tar.bz2 |
Landing http://codereview.chromium.org/337006 for mrossetti
BUG=21908
TEST=Control-click on the bookmark bar, either on an existing folder
or on the blank area and choose "Add Folder..." from the contextual
menu. A sheet will drop down from the bookmark bar asking for the name
of the folder to add. The edit field will be populated with the
proposed name 'New folder'. ('New folder' will be appropriately
localized.)
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30136 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/cocoa/bookmark_name_folder_controller.mm | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/chrome/browser/cocoa/bookmark_name_folder_controller.mm b/chrome/browser/cocoa/bookmark_name_folder_controller.mm index 720b076a..122853f 100644 --- a/chrome/browser/cocoa/bookmark_name_folder_controller.mm +++ b/chrome/browser/cocoa/bookmark_name_folder_controller.mm @@ -2,10 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "app/l10n_util.h" #include "base/mac_util.h" #include "base/sys_string_conversions.h" #include "chrome/browser/profile.h" #import "chrome/browser/cocoa/bookmark_name_folder_controller.h" +#include "grit/generated_resources.h" @implementation BookmarkNameFolderController @@ -19,23 +21,15 @@ parentWindow_ = window; profile_ = profile; node_ = node; - if (node_) { - initialName_.reset([base::SysWideToNSString(node_->GetTitle()) retain]); - } else { - initialName_.reset([@"" retain]); - } + std::wstring newFolderString = + l10n_util::GetString(IDS_BOOMARK_EDITOR_NEW_FOLDER_NAME); + initialName_.reset([base::SysWideToNSString(newFolderString) retain]); } return self; } - (void)awakeFromNib { [nameField_ setStringValue:initialName_.get()]; - if (node_) { - // TODO(jrg)?: on Windows the dialog is named either New Folder or - // Edit Folder Name. However, since we're a sheet on the Mac, the - // title is never seen. If we switch from a sheet, correct the - // title right here. - } [self controlTextDidChange:nil]; } |