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

Side by Side Diff: chrome/browser/ui/gtk/hung_renderer_dialog_gtk.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/browser_dialogs.h" 5 #include "chrome/browser/ui/browser_dialogs.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // |||icon||| ||| 92 // |||icon||| |||
93 // ||·----·|| The folowing page(s).. ||| 93 // ||·----·|| The folowing page(s).. |||
94 // || || ||| 94 // || || |||
95 // || ||------------------------||| 95 // || ||------------------------|||
96 // || || table of tabs ||| 96 // || || table of tabs |||
97 // || |·------------------------·|| 97 // || |·------------------------·||
98 // |·---------------------------------·| 98 // |·---------------------------------·|
99 // | | 99 // | |
100 // | kill button wait button| 100 // | kill button wait button|
101 // ·-----------------------------------· 101 // ·-----------------------------------·
102 GtkWidget* contents_vbox = dialog_->vbox; 102 GtkWidget* content_area = gtk_dialog_get_content_area(dialog_);
103 gtk_box_set_spacing(GTK_BOX(contents_vbox), gtk_util::kContentAreaSpacing); 103 gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing);
104 104
105 GtkWidget* hbox = gtk_hbox_new(FALSE, 12); 105 GtkWidget* hbox = gtk_hbox_new(FALSE, 12);
106 gtk_box_pack_start(GTK_BOX(contents_vbox), hbox, TRUE, TRUE, 0); 106 gtk_box_pack_start(GTK_BOX(content_area), hbox, TRUE, TRUE, 0);
107 107
108 // Wrap the icon in a vbox so it stays top aligned. 108 // Wrap the icon in a vbox so it stays top aligned.
109 GtkWidget* icon_vbox = gtk_vbox_new(FALSE, 0); 109 GtkWidget* icon_vbox = gtk_vbox_new(FALSE, 0);
110 gtk_box_pack_start(GTK_BOX(hbox), icon_vbox, FALSE, FALSE, 0); 110 gtk_box_pack_start(GTK_BOX(hbox), icon_vbox, FALSE, FALSE, 0);
111 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 111 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
112 GdkPixbuf* icon_pixbuf = rb.GetNativeImageNamed(IDR_FROZEN_TAB_ICON); 112 GdkPixbuf* icon_pixbuf = rb.GetNativeImageNamed(IDR_FROZEN_TAB_ICON);
113 GtkWidget* icon = gtk_image_new_from_pixbuf(icon_pixbuf); 113 GtkWidget* icon = gtk_image_new_from_pixbuf(icon_pixbuf);
114 gtk_box_pack_start(GTK_BOX(icon_vbox), icon, FALSE, FALSE, 0); 114 gtk_box_pack_start(GTK_BOX(icon_vbox), icon, FALSE, FALSE, 0);
115 115
116 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); 116 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 g_instance->ShowForTabContents(contents); 224 g_instance->ShowForTabContents(contents);
225 } 225 }
226 } 226 }
227 227
228 void HideHungRendererDialog(TabContents* contents) { 228 void HideHungRendererDialog(TabContents* contents) {
229 if (!logging::DialogsAreSuppressed() && g_instance) 229 if (!logging::DialogsAreSuppressed() && g_instance)
230 g_instance->EndForTabContents(contents); 230 g_instance->EndForTabContents(contents);
231 } 231 }
232 232
233 } // namespace browser 233 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/first_run_dialog.cc ('k') | chrome/browser/ui/gtk/importer/import_lock_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698