summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/gtk/download_in_progress_dialog_gtk.cc30
1 files changed, 7 insertions, 23 deletions
diff --git a/chrome/browser/gtk/download_in_progress_dialog_gtk.cc b/chrome/browser/gtk/download_in_progress_dialog_gtk.cc
index 31f947f..4e649be 100644
--- a/chrome/browser/gtk/download_in_progress_dialog_gtk.cc
+++ b/chrome/browser/gtk/download_in_progress_dialog_gtk.cc
@@ -51,11 +51,12 @@ DownloadInProgressDialogGtk::DownloadInProgressDialogGtk(Browser* browser)
IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_CANCEL_BUTTON_LABEL);
}
- GtkWidget* dialog = gtk_dialog_new_with_buttons(
- UTF16ToUTF8(product_name).c_str(),
+ GtkWidget* dialog = gtk_message_dialog_new(
browser_->window()->GetNativeHandle(),
- static_cast<GtkDialogFlags>(GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR),
- NULL);
+ static_cast<GtkDialogFlags>(GTK_DIALOG_MODAL),
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_NONE,
+ warning_text.c_str());
gtk_util::AddButtonToDialog(dialog,
cancel_button_text.c_str(),
GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
@@ -63,25 +64,8 @@ DownloadInProgressDialogGtk::DownloadInProgressDialogGtk(Browser* browser)
ok_button_text.c_str(),
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT);
- GtkWidget* content_area = GTK_DIALOG(dialog)->vbox;
-
- // There are two lines of text: the bold warning label and the text
- // explanation label. Neither one wraps.
- GtkWidget* warning_label = gtk_label_new(NULL);
- gtk_label_set_markup(GTK_LABEL(warning_label),
- (std::string("<b>") + warning_text + "</b>").c_str());
- gtk_misc_set_alignment(GTK_MISC(warning_label), 0.0, 0.5);
- gtk_container_add(GTK_CONTAINER(content_area), warning_label);
-
- // Spacing line.
- gtk_container_add(GTK_CONTAINER(content_area), gtk_label_new(NULL));
-
- GtkWidget* explanation_label = gtk_label_new(explanation_text.c_str());
- gtk_misc_set_alignment(GTK_MISC(explanation_label), 0.0, 0.5);
- gtk_container_add(GTK_CONTAINER(content_area), explanation_label);
-
- // Spacing line.
- gtk_container_add(GTK_CONTAINER(content_area), gtk_label_new(NULL));
+ gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
+ explanation_text.c_str());
g_signal_connect(dialog, "response", G_CALLBACK(OnResponse), this);