Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.cc

Issue 9113033: GTK: More raw struct access removal, this time focusing on GtkDialog. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc ('k') | chrome/browser/ui/gtk/certificate_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698