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

Unified Diff: chrome/browser/cocoa/bookmark_name_folder_controller.mm

Issue 338032: Reverting 30136. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/bookmark_name_folder_controller.mm
===================================================================
--- chrome/browser/cocoa/bookmark_name_folder_controller.mm (revision 30139)
+++ chrome/browser/cocoa/bookmark_name_folder_controller.mm (working copy)
@@ -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];
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698