| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "app/l10n_util_mac.h" | 5 #include "app/l10n_util_mac.h" |
| 6 #include "base/mac_util.h" | 6 #include "base/mac_util.h" |
| 7 #include "base/sys_string_conversions.h" | 7 #include "base/sys_string_conversions.h" |
| 8 #include "chrome/browser/bookmarks/bookmark_model.h" | 8 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 9 #import "chrome/browser/cocoa/bookmark_bubble_controller.h" | 9 #import "chrome/browser/cocoa/bookmark_bubble_controller.h" |
| 10 #import "chrome/browser/cocoa/bookmark_bubble_window.h" | 10 #import "chrome/browser/cocoa/bookmark_bubble_window.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // | 149 // |
| 150 // TODO(jrg): make sure nested folders that have the same name are | 150 // TODO(jrg): make sure nested folders that have the same name are |
| 151 // handled properly. | 151 // handled properly. |
| 152 // http://crbug.com/19408 | 152 // http://crbug.com/19408 |
| 153 - (void)fillInFolderList { | 153 - (void)fillInFolderList { |
| 154 [nameTextField_ setStringValue:base::SysWideToNSString(node_->GetTitle())]; | 154 [nameTextField_ setStringValue:base::SysWideToNSString(node_->GetTitle())]; |
| 155 [self addFolderNodes:model_->root_node() toComboBox:folderComboBox_]; | 155 [self addFolderNodes:model_->root_node() toComboBox:folderComboBox_]; |
| 156 | 156 |
| 157 // Add "Choose another folder...". Remember it for later to compare against. | 157 // Add "Choose another folder...". Remember it for later to compare against. |
| 158 chooseAnotherFolder_.reset( | 158 chooseAnotherFolder_.reset( |
| 159 [l10n_util::GetNSString(IDS_BOOMARK_BUBBLE_CHOOSER_ANOTHER_FOLDER) | 159 [l10n_util::GetNSStringWithFixup(IDS_BOOMARK_BUBBLE_CHOOSER_ANOTHER_FOLDER) |
| 160 retain]); | 160 retain]); |
| 161 [folderComboBox_ addItemWithObjectValue:chooseAnotherFolder_.get()]; | 161 [folderComboBox_ addItemWithObjectValue:chooseAnotherFolder_.get()]; |
| 162 | 162 |
| 163 // Finally, select the current parent. | 163 // Finally, select the current parent. |
| 164 NSString* parentTitle = base::SysWideToNSString( | 164 NSString* parentTitle = base::SysWideToNSString( |
| 165 node_->GetParent()->GetTitle()); | 165 node_->GetParent()->GetTitle()); |
| 166 [folderComboBox_ selectItemWithObjectValue:parentTitle]; | 166 [folderComboBox_ selectItemWithObjectValue:parentTitle]; |
| 167 } | 167 } |
| 168 | 168 |
| 169 - (BOOL)windowHasBeenClosed { | 169 - (BOOL)windowHasBeenClosed { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 - (void)setTitle:(NSString*)title parentFolder:(NSString*)folder { | 214 - (void)setTitle:(NSString*)title parentFolder:(NSString*)folder { |
| 215 [nameTextField_ setStringValue:title]; | 215 [nameTextField_ setStringValue:title]; |
| 216 [folderComboBox_ selectItemWithObjectValue:folder]; | 216 [folderComboBox_ selectItemWithObjectValue:folder]; |
| 217 } | 217 } |
| 218 | 218 |
| 219 - (NSString*)chooseAnotherFolderString { | 219 - (NSString*)chooseAnotherFolderString { |
| 220 return chooseAnotherFolder_.get(); | 220 return chooseAnotherFolder_.get(); |
| 221 } | 221 } |
| 222 | 222 |
| 223 @end // implementation BookmarkBubbleController(ExposedForUnitTesting) | 223 @end // implementation BookmarkBubbleController(ExposedForUnitTesting) |
| OLD | NEW |