Commit bbb9135d authored by jrg@chromium.org's avatar jrg@chromium.org

Reverting 30136.

Review URL: http://codereview.chromium.org/338032

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30140 0039d316-1c4b-4281-b951-d872f2087c98
parent 60dc10e5
......@@ -2,12 +2,10 @@
// 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
......@@ -21,15 +19,23 @@
parentWindow_ = window;
profile_ = profile;
node_ = node;
std::wstring newFolderString =
l10n_util::GetString(IDS_BOOMARK_EDITOR_NEW_FOLDER_NAME);
initialName_.reset([base::SysWideToNSString(newFolderString) retain]);
if (node_) {
initialName_.reset([base::SysWideToNSString(node_->GetTitle()) retain]);
} else {
initialName_.reset([@"" 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];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment