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

Unified Diff: chrome/browser/app_modal_dialog_gtk.cc

Issue 114058: Pressing "enter" while the JS prompt text entry has focus should (Closed)
Patch Set: gtk_entry_set_activates_default Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_modal_dialog_gtk.cc
diff --git a/chrome/browser/app_modal_dialog_gtk.cc b/chrome/browser/app_modal_dialog_gtk.cc
index 72603a201b75c2f69ab14dd8684a1dfd36f011b7..40b04eddb7ca0ff858ddbcbc6783b2bde953431e 100644
--- a/chrome/browser/app_modal_dialog_gtk.cc
+++ b/chrome/browser/app_modal_dialog_gtk.cc
@@ -104,7 +104,8 @@ void AppModalDialog::CreateAndShowDialog() {
message_type, buttons, "%s", WideToUTF8(message_text_).c_str());
gtk_window_set_title(GTK_WINDOW(dialog_), WideToUTF8(title_).c_str());
- // Adjust content area as needed.
+ // Adjust content area as needed. Set up the prompt text entry or
+ // suppression check box.
if (MessageBoxFlags::kIsJavascriptPrompt == dialog_flags_) {
// TODO(tc): Replace with gtk_dialog_get_content_area() when using GTK 2.14+
GtkWidget* contents_vbox = GTK_DIALOG(dialog_)->vbox;
@@ -113,6 +114,7 @@ void AppModalDialog::CreateAndShowDialog() {
WideToUTF8(default_prompt_text_).c_str());
gtk_box_pack_start(GTK_BOX(contents_vbox), text_box, TRUE, TRUE, 0);
g_object_set_data(G_OBJECT(dialog_), kPromptTextId, text_box);
+ gtk_entry_set_activates_default(GTK_ENTRY(text_box), TRUE);
}
if (display_suppress_checkbox_) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698