| 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 // |||| |||| | 336 // |||| |||| |
| 337 // |||| |||| | 337 // |||| |||| |
| 338 // |||| |||| | 338 // |||| |||| |
| 339 // |||| |||| | 339 // |||| |||| |
| 340 // |||+---------------------------------------------------------+||| | 340 // |||+---------------------------------------------------------+||| |
| 341 // ||+-----------------------------------------------------------+|| | 341 // ||+-----------------------------------------------------------+|| |
| 342 // |+-------------------------------------------------------------+| | 342 // |+-------------------------------------------------------------+| |
| 343 // +---------------------------------------------------------------+ | 343 // +---------------------------------------------------------------+ |
| 344 // | 344 // |
| 345 // * The url and corresponding label are not shown if creating a new folder. | 345 // * The url and corresponding label are not shown if creating a new folder. |
| 346 GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox; | 346 GtkWidget* content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog_)); |
| 347 gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing); | 347 gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing); |
| 348 | 348 |
| 349 GtkWidget* vbox = gtk_vbox_new(FALSE, 12); | 349 GtkWidget* vbox = gtk_vbox_new(FALSE, 12); |
| 350 | 350 |
| 351 name_entry_ = gtk_entry_new(); | 351 name_entry_ = gtk_entry_new(); |
| 352 std::string title; | 352 std::string title; |
| 353 GURL url; | 353 GURL url; |
| 354 if (details_.type == EditDetails::EXISTING_NODE) { | 354 if (details_.type == EditDetails::EXISTING_NODE) { |
| 355 title = UTF16ToUTF8(details_.existing_node->GetTitle()); | 355 title = UTF16ToUTF8(details_.existing_node->GetTitle()); |
| 356 url = details_.existing_node->url(); | 356 url = details_.existing_node->url(); |
| (...skipping 322 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 |