| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.h" | 5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 BookmarkEditorGtk* editor_; | 250 BookmarkEditorGtk* editor_; |
| 251 | 251 |
| 252 // If true, we're running the menu for the bookmark bar or other bookmarks | 252 // If true, we're running the menu for the bookmark bar or other bookmarks |
| 253 // nodes. | 253 // nodes. |
| 254 bool running_menu_for_root_; | 254 bool running_menu_for_root_; |
| 255 | 255 |
| 256 DISALLOW_COPY_AND_ASSIGN(ContextMenuController); | 256 DISALLOW_COPY_AND_ASSIGN(ContextMenuController); |
| 257 }; | 257 }; |
| 258 | 258 |
| 259 // static | 259 // static |
| 260 void BookmarkEditor::Show(gfx::NativeWindow parent_hwnd, | 260 void BookmarkEditor::ShowNative(gfx::NativeWindow parent_hwnd, |
| 261 Profile* profile, | 261 Profile* profile, |
| 262 const BookmarkNode* parent, | 262 const BookmarkNode* parent, |
| 263 const EditDetails& details, | 263 const EditDetails& details, |
| 264 Configuration configuration) { | 264 Configuration configuration) { |
| 265 DCHECK(profile); | 265 DCHECK(profile); |
| 266 BookmarkEditorGtk* editor = | 266 BookmarkEditorGtk* editor = |
| 267 new BookmarkEditorGtk(parent_hwnd, profile, parent, details, | 267 new BookmarkEditorGtk(parent_hwnd, profile, parent, details, |
| 268 configuration); | 268 configuration); |
| 269 editor->Show(); | 269 editor->Show(); |
| 270 } | 270 } |
| 271 | 271 |
| 272 BookmarkEditorGtk::BookmarkEditorGtk( | 272 BookmarkEditorGtk::BookmarkEditorGtk( |
| 273 GtkWindow* window, | 273 GtkWindow* window, |
| 274 Profile* profile, | 274 Profile* profile, |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 GTK_TREE_MODEL(tree_store_), &new_item_iter); | 679 GTK_TREE_MODEL(tree_store_), &new_item_iter); |
| 680 gtk_tree_view_expand_to_path(GTK_TREE_VIEW(tree_view_), path); | 680 gtk_tree_view_expand_to_path(GTK_TREE_VIEW(tree_view_), path); |
| 681 | 681 |
| 682 // Make the folder name editable. | 682 // Make the folder name editable. |
| 683 gtk_tree_view_set_cursor(GTK_TREE_VIEW(tree_view_), path, | 683 gtk_tree_view_set_cursor(GTK_TREE_VIEW(tree_view_), path, |
| 684 gtk_tree_view_get_column(GTK_TREE_VIEW(tree_view_), 0), | 684 gtk_tree_view_get_column(GTK_TREE_VIEW(tree_view_), 0), |
| 685 TRUE); | 685 TRUE); |
| 686 | 686 |
| 687 gtk_tree_path_free(path); | 687 gtk_tree_path_free(path); |
| 688 } | 688 } |
| OLD | NEW |