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

Side by Side Diff: chrome/browser/ui/gtk/about_chrome_dialog.cc

Issue 7569012: gtk: Use gtk_dialog_get_content_area() throughout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
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/about_chrome_dialog.h" 5 #include "chrome/browser/ui/gtk/about_chrome_dialog.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 NULL); 111 NULL);
112 // Pick up the style set in gtk_util.cc:InitRCStyles(). 112 // Pick up the style set in gtk_util.cc:InitRCStyles().
113 // The layout of this dialog is special because the logo should be flush 113 // The layout of this dialog is special because the logo should be flush
114 // with the edges of the window. 114 // with the edges of the window.
115 gtk_widget_set_name(dialog, "about-dialog"); 115 gtk_widget_set_name(dialog, "about-dialog");
116 gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); 116 gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
117 117
118 GtkWidget* close_button = gtk_dialog_add_button(GTK_DIALOG(dialog), 118 GtkWidget* close_button = gtk_dialog_add_button(GTK_DIALOG(dialog),
119 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); 119 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
120 120
121 GtkWidget* content_area = GTK_DIALOG(dialog)->vbox; 121 GtkWidget* content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
122 122
123 // Use an event box to get the background painting correctly 123 // Use an event box to get the background painting correctly
124 GtkWidget* ebox = gtk_event_box_new(); 124 GtkWidget* ebox = gtk_event_box_new();
125 gtk_widget_set_app_paintable(ebox, TRUE); 125 gtk_widget_set_app_paintable(ebox, TRUE);
126 g_signal_connect(ebox, "expose-event", G_CALLBACK(OnEventBoxExpose), NULL); 126 g_signal_connect(ebox, "expose-event", G_CALLBACK(OnEventBoxExpose), NULL);
127 127
128 GtkWidget* hbox = gtk_hbox_new(FALSE, 0); 128 GtkWidget* hbox = gtk_hbox_new(FALSE, 0);
129 129
130 GtkWidget* text_alignment = gtk_alignment_new(0.0, 0.0, 1.0, 1.0); 130 GtkWidget* text_alignment = gtk_alignment_new(0.0, 0.0, 1.0, 1.0);
131 gtk_alignment_set_padding(GTK_ALIGNMENT(text_alignment), 131 gtk_alignment_set_padding(GTK_ALIGNMENT(text_alignment),
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 gtk_util::kContentAreaBorder, 0, 270 gtk_util::kContentAreaBorder, 0,
271 gtk_util::kContentAreaBorder, gtk_util::kContentAreaBorder); 271 gtk_util::kContentAreaBorder, gtk_util::kContentAreaBorder);
272 gtk_container_add(GTK_CONTAINER(alignment), vbox); 272 gtk_container_add(GTK_CONTAINER(alignment), vbox);
273 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); 273 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0);
274 274
275 g_signal_connect(dialog, "response", G_CALLBACK(OnResponse), NULL); 275 g_signal_connect(dialog, "response", G_CALLBACK(OnResponse), NULL);
276 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); 276 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
277 gtk_widget_show_all(dialog); 277 gtk_widget_show_all(dialog);
278 gtk_widget_grab_focus(close_button); 278 gtk_widget_grab_focus(close_button);
279 } 279 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/native_dialog_window.cc ('k') | chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698