Set the text import dialog's default button.
authorJohn Darrington <john@darrington.wattle.id.au>
Tue, 24 Mar 2009 11:17:09 +0000 (20:17 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Tue, 24 Mar 2009 11:17:09 +0000 (20:17 +0900)
Grab the focus of the appropriate button of the
text import dialog, when a new page is prepared.
This makes it much easier to use without a mouse.

src/ui/gui/text-data-import-dialog.c

index 2cecd548756879c8c45cbf4963439a893626cd3d..79f77627cf5b9d5b6f2c136e64c46ffd005dfc90 100644 (file)
@@ -649,6 +649,13 @@ static void
 on_prepare (GtkAssistant *assistant, GtkWidget *page,
             struct import_assistant *ia)
 {
+
+  if (gtk_assistant_get_page_type (assistant, page)
+      == GTK_ASSISTANT_PAGE_CONFIRM)
+    gtk_widget_grab_focus (assistant->apply);
+  else
+    gtk_widget_grab_focus (assistant->forward);
+
   if (page == ia->separators.page)
     prepare_separators_page (ia);
   else if (page == ia->formats.page)