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

Side by Side Diff: chrome/browser/gtk/repost_form_warning_gtk.cc

Issue 425016: Linux: Create app modal dialogs in a different way to work around a KDE 3 win... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: with missing files Created 11 years 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
« no previous file with comments | « chrome/browser/gtk/process_singleton_dialog.cc ('k') | chrome/common/gtk_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/gtk/repost_form_warning_gtk.h" 5 #include "chrome/browser/gtk/repost_form_warning_gtk.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/tab_contents/navigation_controller.h" 9 #include "chrome/browser/tab_contents/navigation_controller.h"
10 #include "chrome/common/gtk_util.h" 10 #include "chrome/common/gtk_util.h"
11 #include "chrome/common/notification_service.h" 11 #include "chrome/common/notification_service.h"
12 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
13 13
14 RepostFormWarningGtk::RepostFormWarningGtk( 14 RepostFormWarningGtk::RepostFormWarningGtk(
15 GtkWindow* parent, 15 GtkWindow* parent,
16 NavigationController* navigation_controller) 16 NavigationController* navigation_controller)
17 : navigation_controller_(navigation_controller) { 17 : navigation_controller_(navigation_controller) {
18 dialog_ = gtk_message_dialog_new( 18 dialog_ = gtk_message_dialog_new(
19 parent, 19 parent,
20 GTK_DIALOG_MODAL, 20 GTK_DIALOG_MODAL,
21 GTK_MESSAGE_QUESTION, 21 GTK_MESSAGE_QUESTION,
22 GTK_BUTTONS_NONE, 22 GTK_BUTTONS_NONE,
23 "%s", 23 "%s",
24 l10n_util::GetStringUTF8(IDS_HTTP_POST_WARNING).c_str()); 24 l10n_util::GetStringUTF8(IDS_HTTP_POST_WARNING).c_str());
25 gtk_util::ApplyMessageDialogQuirks(dialog_);
25 gtk_window_set_title(GTK_WINDOW(dialog_), 26 gtk_window_set_title(GTK_WINDOW(dialog_),
26 l10n_util::GetStringUTF8(IDS_HTTP_POST_WARNING_TITLE).c_str()); 27 l10n_util::GetStringUTF8(IDS_HTTP_POST_WARNING_TITLE).c_str());
27 gtk_util::AddButtonToDialog(dialog_, 28 gtk_util::AddButtonToDialog(dialog_,
28 l10n_util::GetStringUTF8(IDS_HTTP_POST_WARNING_CANCEL).c_str(), 29 l10n_util::GetStringUTF8(IDS_HTTP_POST_WARNING_CANCEL).c_str(),
29 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); 30 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
30 gtk_util::AddButtonToDialog(dialog_, 31 gtk_util::AddButtonToDialog(dialog_,
31 l10n_util::GetStringUTF8(IDS_HTTP_POST_WARNING_RESEND).c_str(), 32 l10n_util::GetStringUTF8(IDS_HTTP_POST_WARNING_RESEND).c_str(),
32 GTK_STOCK_REFRESH, GTK_RESPONSE_OK); 33 GTK_STOCK_REFRESH, GTK_RESPONSE_OK);
33 gtk_util::SetWindowIcon(GTK_WINDOW(dialog_)); 34 gtk_util::SetWindowIcon(GTK_WINDOW(dialog_));
34 35
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 if (dialog->navigation_controller_) 78 if (dialog->navigation_controller_)
78 dialog->navigation_controller_->Reload(false); 79 dialog->navigation_controller_->Reload(false);
79 } 80 }
80 } 81 }
81 82
82 // static 83 // static
83 void RepostFormWarningGtk::OnWindowDestroy(GtkWidget* widget, 84 void RepostFormWarningGtk::OnWindowDestroy(GtkWidget* widget,
84 RepostFormWarningGtk* dialog) { 85 RepostFormWarningGtk* dialog) {
85 MessageLoop::current()->DeleteSoon(FROM_HERE, dialog); 86 MessageLoop::current()->DeleteSoon(FROM_HERE, dialog);
86 } 87 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/process_singleton_dialog.cc ('k') | chrome/common/gtk_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698