diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 02:34:09 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 02:34:09 +0000 |
commit | 7c774a1528e5f289c49fb7614f376067e37ba4b0 (patch) | |
tree | 46cbb04a16895b13e18b19c8dbef69021bda9084 /chrome/browser | |
parent | 0ac41f8a150b37c05c0a11197739903e0edaa5d5 (diff) | |
download | chromium_src-7c774a1528e5f289c49fb7614f376067e37ba4b0.zip chromium_src-7c774a1528e5f289c49fb7614f376067e37ba4b0.tar.gz chromium_src-7c774a1528e5f289c49fb7614f376067e37ba4b0.tar.bz2 |
Linux: Create app modal dialogs in a different way to work around a KDE 3 window manager bug. While we're at it, change dialog's default size to match that of Chrome on Windows.
BUG=28230
TEST=see bug
Review URL: http://codereview.chromium.org/425016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32905 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/app_modal_dialog_gtk.cc | 1 | ||||
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.cc | 1 | ||||
-rw-r--r-- | chrome/browser/gtk/options/advanced_contents_gtk.cc | 1 | ||||
-rw-r--r-- | chrome/browser/gtk/options/advanced_page_gtk.cc | 1 | ||||
-rw-r--r-- | chrome/browser/gtk/options/content_page_gtk.cc | 1 | ||||
-rw-r--r-- | chrome/browser/gtk/options/passwords_page_gtk.cc | 16 | ||||
-rw-r--r-- | chrome/browser/gtk/process_singleton_dialog.cc | 1 | ||||
-rw-r--r-- | chrome/browser/gtk/repost_form_warning_gtk.cc | 1 |
8 files changed, 16 insertions, 7 deletions
diff --git a/chrome/browser/app_modal_dialog_gtk.cc b/chrome/browser/app_modal_dialog_gtk.cc index 9587624..1d541bc 100644 --- a/chrome/browser/app_modal_dialog_gtk.cc +++ b/chrome/browser/app_modal_dialog_gtk.cc @@ -127,6 +127,7 @@ void AppModalDialog::CreateAndShowDialog() { gfx::NativeWindow window = client_->GetMessageBoxRootWindow(); dialog_ = gtk_message_dialog_new(window, GTK_DIALOG_MODAL, message_type, buttons, "%s", WideToUTF8(message_text_).c_str()); + gtk_util::ApplyMessageDialogQuirks(dialog_); gtk_window_set_title(GTK_WINDOW(dialog_), WideToUTF8(title_).c_str()); // Adjust content area as needed. Set up the prompt text entry or diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index fd57740..601bd20 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -1155,6 +1155,7 @@ void BrowserWindowGtk::ShowProfileErrorDialog(int message_id) { GtkWidget* dialog = gtk_message_dialog_new(window_, static_cast<GtkDialogFlags>(0), GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, "%s", message.c_str()); + gtk_util::ApplyMessageDialogQuirks(dialog); gtk_window_set_title(GTK_WINDOW(dialog), title.c_str()); g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_widget_show_all(dialog); diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.cc b/chrome/browser/gtk/options/advanced_contents_gtk.cc index da0d132..c17d137 100644 --- a/chrome/browser/gtk/options/advanced_contents_gtk.cc +++ b/chrome/browser/gtk/options/advanced_contents_gtk.cc @@ -819,6 +819,7 @@ void PrivacySection::ShowRestartMessageBox() const { GTK_BUTTONS_OK, "%s", l10n_util::GetStringUTF8(IDS_OPTIONS_RESTART_REQUIRED).c_str()); + gtk_util::ApplyMessageDialogQuirks(dialog); gtk_window_set_title(GTK_WINDOW(dialog), l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str()); g_signal_connect_swapped(dialog, "response", G_CALLBACK(gtk_widget_destroy), diff --git a/chrome/browser/gtk/options/advanced_page_gtk.cc b/chrome/browser/gtk/options/advanced_page_gtk.cc index 4271a33..065c577 100644 --- a/chrome/browser/gtk/options/advanced_page_gtk.cc +++ b/chrome/browser/gtk/options/advanced_page_gtk.cc @@ -56,6 +56,7 @@ void AdvancedPageGtk::OnResetToDefaultsClicked( GTK_BUTTONS_NONE, "%s", l10n_util::GetStringUTF8(IDS_OPTIONS_RESET_MESSAGE).c_str()); + gtk_util::ApplyMessageDialogQuirks(dialog_); gtk_dialog_add_buttons( GTK_DIALOG(dialog_), l10n_util::GetStringUTF8(IDS_OPTIONS_RESET_CANCELLABEL).c_str(), diff --git a/chrome/browser/gtk/options/content_page_gtk.cc b/chrome/browser/gtk/options/content_page_gtk.cc index a694c6f..0dfd8e1 100644 --- a/chrome/browser/gtk/options/content_page_gtk.cc +++ b/chrome/browser/gtk/options/content_page_gtk.cc @@ -521,6 +521,7 @@ void ContentPageGtk::OnSyncStartStopButtonClicked(GtkButton* widget, "%s", l10n_util::GetStringUTF8( IDS_SYNC_STOP_SYNCING_EXPLANATION_LABEL).c_str()); + gtk_util::ApplyMessageDialogQuirks(dialog); gtk_window_set_title(GTK_WINDOW(dialog), l10n_util::GetStringUTF8( IDS_SYNC_STOP_SYNCING_BUTTON_LABEL).c_str()); diff --git a/chrome/browser/gtk/options/passwords_page_gtk.cc b/chrome/browser/gtk/options/passwords_page_gtk.cc index f4a2197..c7ab52f 100644 --- a/chrome/browser/gtk/options/passwords_page_gtk.cc +++ b/chrome/browser/gtk/options/passwords_page_gtk.cc @@ -200,14 +200,16 @@ void PasswordsPageGtk::OnRemoveButtonClicked(GtkButton* widget, void PasswordsPageGtk::OnRemoveAllButtonClicked(GtkButton* widget, PasswordsPageGtk* page) { GtkWindow* window = GTK_WINDOW(gtk_widget_get_toplevel(page->page_)); - GtkWidget* confirm = gtk_message_dialog_new(window, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_QUESTION, - GTK_BUTTONS_YES_NO, - "%s", - l10n_util::GetStringUTF8( + GtkWidget* confirm = gtk_message_dialog_new( + window, + static_cast<GtkDialogFlags>( + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT), + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, + "%s", + l10n_util::GetStringUTF8( IDS_PASSWORDS_PAGE_VIEW_TEXT_DELETE_ALL_PASSWORDS).c_str()); - gtk_window_set_modal(GTK_WINDOW(confirm), TRUE); + gtk_util::ApplyMessageDialogQuirks(confirm); gtk_window_set_title(GTK_WINDOW(confirm), l10n_util::GetStringUTF8( IDS_PASSWORDS_PAGE_VIEW_CAPTION_DELETE_ALL_PASSWORDS).c_str()); g_signal_connect(confirm, "response", G_CALLBACK(OnRemoveAllConfirmResponse), diff --git a/chrome/browser/gtk/process_singleton_dialog.cc b/chrome/browser/gtk/process_singleton_dialog.cc index a922bda..ffaf503 100644 --- a/chrome/browser/gtk/process_singleton_dialog.cc +++ b/chrome/browser/gtk/process_singleton_dialog.cc @@ -22,6 +22,7 @@ ProcessSingletonDialog::ProcessSingletonDialog(const std::string& message) { GTK_BUTTONS_NONE, "%s", message.c_str()); + gtk_util::ApplyMessageDialogQuirks(dialog_); gtk_window_set_title(GTK_WINDOW(dialog_), l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str()); gtk_dialog_add_button(GTK_DIALOG(dialog_), GTK_STOCK_QUIT, diff --git a/chrome/browser/gtk/repost_form_warning_gtk.cc b/chrome/browser/gtk/repost_form_warning_gtk.cc index fab88e6..227e864 100644 --- a/chrome/browser/gtk/repost_form_warning_gtk.cc +++ b/chrome/browser/gtk/repost_form_warning_gtk.cc @@ -22,6 +22,7 @@ RepostFormWarningGtk::RepostFormWarningGtk( GTK_BUTTONS_NONE, "%s", l10n_util::GetStringUTF8(IDS_HTTP_POST_WARNING).c_str()); + gtk_util::ApplyMessageDialogQuirks(dialog_); gtk_window_set_title(GTK_WINDOW(dialog_), l10n_util::GetStringUTF8(IDS_HTTP_POST_WARNING_TITLE).c_str()); gtk_util::AddButtonToDialog(dialog_, |