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

Unified Diff: chrome/browser/gtk/import_dialog_gtk.cc

Issue 259028: Set the default action of the import data dialog to "Import" and (Closed)
Patch Set: Created 11 years, 3 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/gtk/import_dialog_gtk.cc
diff --git a/chrome/browser/gtk/import_dialog_gtk.cc b/chrome/browser/gtk/import_dialog_gtk.cc
index c1cbf35a9ba09bd6a5a497192b9d2e2a24cbd780..52f4dc6ff8f7ad03451ef1efc26ee65de36daeba 100644
--- a/chrome/browser/gtk/import_dialog_gtk.cc
+++ b/chrome/browser/gtk/import_dialog_gtk.cc
@@ -42,6 +42,8 @@ ImportDialogGtk::ImportDialogGtk(GtkWindow* parent, Profile* profile) :
GtkWidget* import_button = gtk_util::AddButtonToDialog(dialog_,
l10n_util::GetStringUTF8(IDS_IMPORT_COMMIT).c_str(),
GTK_STOCK_APPLY, GTK_RESPONSE_ACCEPT);
+ GTK_WIDGET_SET_FLAGS(import_button, GTK_CAN_DEFAULT);
+ gtk_dialog_set_default_response(GTK_DIALOG(dialog_), GTK_RESPONSE_ACCEPT);
// TODO(rahulk): find how to set size properly so that the dialog
// box width is at least enough to display full title.
@@ -98,6 +100,7 @@ ImportDialogGtk::ImportDialogGtk(GtkWindow* parent, Profile* profile) :
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_),
WideToUTF8(profile).c_str());
}
+ gtk_widget_grab_focus(import_button);
} else {
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_),
l10n_util::GetStringUTF8(IDS_IMPORT_NO_PROFILE_FOUND).c_str());
« 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