diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-02 23:41:11 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-02 23:41:11 +0000 |
commit | dbdb04645049be66b2a2700afb15b5594dd51fd5 (patch) | |
tree | 1efa7a2d0dcfd6232113ad2e27d90b234524d328 /chrome/browser/gtk/import_dialog_gtk.cc | |
parent | 52deb42efffa2b7f895bd9f7ca61e03f174300a5 (diff) | |
download | chromium_src-dbdb04645049be66b2a2700afb15b5594dd51fd5.zip chromium_src-dbdb04645049be66b2a2700afb15b5594dd51fd5.tar.gz chromium_src-dbdb04645049be66b2a2700afb15b5594dd51fd5.tar.bz2 |
Set the default action of the import data dialog to "Import" and
focus the button.
BUG=19627
Review URL: http://codereview.chromium.org/259028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27916 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/import_dialog_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/import_dialog_gtk.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/gtk/import_dialog_gtk.cc b/chrome/browser/gtk/import_dialog_gtk.cc index c1cbf35..52f4dc6 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()); |