OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 parent_window, | 304 parent_window, |
305 GTK_DIALOG_MODAL, | 305 GTK_DIALOG_MODAL, |
306 GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, | 306 GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, |
307 GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, | 307 GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, |
308 NULL); | 308 NULL); |
309 #if !GTK_CHECK_VERSION(2, 22, 0) | 309 #if !GTK_CHECK_VERSION(2, 22, 0) |
310 gtk_dialog_set_has_separator(GTK_DIALOG(dialog_), FALSE); | 310 gtk_dialog_set_has_separator(GTK_DIALOG(dialog_), FALSE); |
311 #endif | 311 #endif |
312 | 312 |
313 if (show_tree_) { | 313 if (show_tree_) { |
314 GtkWidget* action_area = GTK_DIALOG(dialog_)->action_area; | 314 GtkWidget* action_area = gtk_dialog_get_action_area(GTK_DIALOG(dialog_)); |
315 new_folder_button_ = gtk_button_new_with_label( | 315 new_folder_button_ = gtk_button_new_with_label( |
316 l10n_util::GetStringUTF8( | 316 l10n_util::GetStringUTF8( |
317 IDS_BOOKMARK_EDITOR_NEW_FOLDER_BUTTON).c_str()); | 317 IDS_BOOKMARK_EDITOR_NEW_FOLDER_BUTTON).c_str()); |
318 g_signal_connect(new_folder_button_, "clicked", | 318 g_signal_connect(new_folder_button_, "clicked", |
319 G_CALLBACK(OnNewFolderClickedThunk), this); | 319 G_CALLBACK(OnNewFolderClickedThunk), this); |
320 gtk_container_add(GTK_CONTAINER(action_area), new_folder_button_); | 320 gtk_container_add(GTK_CONTAINER(action_area), new_folder_button_); |
321 gtk_button_box_set_child_secondary(GTK_BUTTON_BOX(action_area), | 321 gtk_button_box_set_child_secondary(GTK_BUTTON_BOX(action_area), |
322 new_folder_button_, TRUE); | 322 new_folder_button_, TRUE); |
323 } | 323 } |
324 | 324 |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 GTK_TREE_MODEL(tree_store_), &new_item_iter); | 685 GTK_TREE_MODEL(tree_store_), &new_item_iter); |
686 gtk_tree_view_expand_to_path(GTK_TREE_VIEW(tree_view_), path); | 686 gtk_tree_view_expand_to_path(GTK_TREE_VIEW(tree_view_), path); |
687 | 687 |
688 // Make the folder name editable. | 688 // Make the folder name editable. |
689 gtk_tree_view_set_cursor(GTK_TREE_VIEW(tree_view_), path, | 689 gtk_tree_view_set_cursor(GTK_TREE_VIEW(tree_view_), path, |
690 gtk_tree_view_get_column(GTK_TREE_VIEW(tree_view_), 0), | 690 gtk_tree_view_get_column(GTK_TREE_VIEW(tree_view_), 0), |
691 TRUE); | 691 TRUE); |
692 | 692 |
693 gtk_tree_path_free(path); | 693 gtk_tree_path_free(path); |
694 } | 694 } |
OLD | NEW |