summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-05 17:01:40 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-05 17:01:40 +0000
commit302ebe8cbfd90f7cedb2a4602ed0c160a967e641 (patch)
tree0659724ea4eadfade3de6497798cb2d52c3e3ac6
parent97b90f187cb45991942592fd8e3e6fbd67fcd217 (diff)
downloadchromium_src-302ebe8cbfd90f7cedb2a4602ed0c160a967e641.zip
chromium_src-302ebe8cbfd90f7cedb2a4602ed0c160a967e641.tar.gz
chromium_src-302ebe8cbfd90f7cedb2a4602ed0c160a967e641.tar.bz2
gtk: Change GTK_DIALOG(dialog)->vbox to gtk_dialog_get_content_area().
Note: This was a TODO for tc. BUG=None TEST=None R=tony@chromium.org Review URL: http://codereview.chromium.org/7585001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95628 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/gtk/js_modal_dialog_gtk.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/ui/gtk/js_modal_dialog_gtk.cc b/chrome/browser/ui/gtk/js_modal_dialog_gtk.cc
index bb1a71b..c368740 100644
--- a/chrome/browser/ui/gtk/js_modal_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/js_modal_dialog_gtk.cc
@@ -97,22 +97,23 @@ JSModalDialogGtk::JSModalDialogGtk(JavaScriptAppModalDialog* dialog,
// Adjust content area as needed. Set up the prompt text entry or
// suppression check box.
if (ui::MessageBoxFlags::kIsJavascriptPrompt == dialog_->dialog_flags()) {
- // TODO(tc): Replace with gtk_dialog_get_content_area() when using GTK 2.14+
- GtkWidget* contents_vbox = GTK_DIALOG(gtk_dialog_)->vbox;
+ GtkWidget* content_area =
+ gtk_dialog_get_content_area(GTK_DIALOG(gtk_dialog_));
GtkWidget* text_box = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(text_box),
UTF16ToUTF8(dialog_->default_prompt_text()).c_str());
- gtk_box_pack_start(GTK_BOX(contents_vbox), text_box, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(content_area), text_box, TRUE, TRUE, 0);
g_object_set_data(G_OBJECT(gtk_dialog_), kPromptTextId, text_box);
gtk_entry_set_activates_default(GTK_ENTRY(text_box), TRUE);
}
if (dialog_->display_suppress_checkbox()) {
- GtkWidget* contents_vbox = GTK_DIALOG(gtk_dialog_)->vbox;
+ GtkWidget* content_area =
+ gtk_dialog_get_content_area(GTK_DIALOG(gtk_dialog_));
GtkWidget* check_box = gtk_check_button_new_with_label(
l10n_util::GetStringUTF8(
IDS_JAVASCRIPT_MESSAGEBOX_SUPPRESS_OPTION).c_str());
- gtk_box_pack_start(GTK_BOX(contents_vbox), check_box, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(content_area), check_box, TRUE, TRUE, 0);
g_object_set_data(G_OBJECT(gtk_dialog_), kSuppressCheckboxId, check_box);
}