diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-02 23:40:50 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-02 23:40:50 +0000 |
commit | 64722ca6f2d9738a703fbaa2c6328d639916e74d (patch) | |
tree | 39d27f43d18081e183c21ed24641559ccfce75ee | |
parent | 987d63cd35c65828ebb5f460c0247cfb08c6e1cf (diff) | |
download | chromium_src-64722ca6f2d9738a703fbaa2c6328d639916e74d.zip chromium_src-64722ca6f2d9738a703fbaa2c6328d639916e74d.tar.gz chromium_src-64722ca6f2d9738a703fbaa2c6328d639916e74d.tar.bz2 |
GTK: improve look of download in progress dialog.
BUG=29174
Review URL: http://codereview.chromium.org/464005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33617 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gtk/download_in_progress_dialog_gtk.cc | 30 |
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); |