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

Side by Side Diff: chrome/browser/gtk/options/url_picker_dialog_gtk.cc

Issue 141020: Make gtk url picker and edit keyword view modal. (Closed)
Patch Set: Created 11 years, 6 months 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
« no previous file with comments | « chrome/browser/gtk/edit_keyword_controller.cc ('k') | no next file » | 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 <gtk/gtk.h> 5 #include <gtk/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/gtk/options/url_picker_dialog_gtk.h" 9 #include "chrome/browser/gtk/options/url_picker_dialog_gtk.h"
10 #include "chrome/browser/net/url_fixer_upper.h" 10 #include "chrome/browser/net/url_fixer_upper.h"
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 UrlPickerDialogGtk::UrlPickerDialogGtk(UrlPickerCallback* callback, 23 UrlPickerDialogGtk::UrlPickerDialogGtk(UrlPickerCallback* callback,
24 Profile* profile, 24 Profile* profile,
25 GtkWindow* parent) 25 GtkWindow* parent)
26 : profile_(profile), 26 : profile_(profile),
27 callback_(callback) { 27 callback_(callback) {
28 dialog_ = gtk_dialog_new_with_buttons( 28 dialog_ = gtk_dialog_new_with_buttons(
29 l10n_util::GetStringUTF8(IDS_ASI_ADD_TITLE).c_str(), 29 l10n_util::GetStringUTF8(IDS_ASI_ADD_TITLE).c_str(),
30 parent, 30 parent,
31 // Non-modal. 31 static_cast<GtkDialogFlags>(GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR),
32 GTK_DIALOG_NO_SEPARATOR,
33 GTK_STOCK_CANCEL, 32 GTK_STOCK_CANCEL,
34 GTK_RESPONSE_CANCEL, 33 GTK_RESPONSE_CANCEL,
35 NULL); 34 NULL);
36 35
37 add_button_ = gtk_dialog_add_button(GTK_DIALOG(dialog_), 36 add_button_ = gtk_dialog_add_button(GTK_DIALOG(dialog_),
38 GTK_STOCK_ADD, GTK_RESPONSE_OK); 37 GTK_STOCK_ADD, GTK_RESPONSE_OK);
39 gtk_dialog_set_default_response(GTK_DIALOG(dialog_), GTK_RESPONSE_OK); 38 gtk_dialog_set_default_response(GTK_DIALOG(dialog_), GTK_RESPONSE_OK);
40 39
41 40
42 GtkWidget* url_hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing); 41 GtkWidget* url_hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 window->AddURL(); 91 window->AddURL();
93 } 92 }
94 gtk_widget_destroy(window->dialog_); 93 gtk_widget_destroy(window->dialog_);
95 } 94 }
96 95
97 // static 96 // static
98 void UrlPickerDialogGtk::OnWindowDestroy(GtkWidget* widget, 97 void UrlPickerDialogGtk::OnWindowDestroy(GtkWidget* widget,
99 UrlPickerDialogGtk* window) { 98 UrlPickerDialogGtk* window) {
100 MessageLoop::current()->DeleteSoon(FROM_HERE, window); 99 MessageLoop::current()->DeleteSoon(FROM_HERE, window);
101 } 100 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/edit_keyword_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698