Index: chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.mm |
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.mm |
index ebe06d174b66dc765c12669345f35f4b0a33984a..e18f7c0446aecc60980a8913d6f9b5bbc4ed5149 100644 |
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.mm |
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.mm |
@@ -9,6 +9,7 @@ |
#include "chrome/browser/bookmarks/bookmark_expanded_state_tracker.h" |
#include "chrome/browser/bookmarks/bookmark_model.h" |
#include "chrome/browser/bookmarks/bookmark_utils.h" |
+#import "chrome/browser/ui/cocoa/bookmarks/bookmark_cell_single_line.h" |
#include "ui/base/l10n/l10n_util.h" |
@interface BookmarkEditorController (Private) |
@@ -48,6 +49,15 @@ |
} |
- (void)awakeFromNib { |
+ // Check if NSTextFieldCell supports the method. This check is in place as |
+ // only 10.6 and greater support the setUsesSingleLineMode method. |
+ // TODO(kushi.p): Remove this when the project hits a 10.6+ only state. |
+ NSTextFieldCell* nameFieldCell_ = [nameTextField_ cell]; |
+ if ([nameFieldCell_ |
+ respondsToSelector:@selector(setUsesSingleLineMode:)]) { |
+ [nameFieldCell_ setUsesSingleLineMode:YES]; |
+ } |
+ |
// Set text fields to match our bookmark. If the node is NULL we |
// arrived here from an "Add Page..." item in a context menu. |
if (node_) { |