From ee125610ee16ec11d9374c1eafd7e8f77d9a870c Mon Sep 17 00:00:00 2001 From: John Darrington Date: Tue, 24 Mar 2009 20:17:09 +0900 Subject: [PATCH] Set the text import dialog's default button. 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ui/gui/text-data-import-dialog.c b/src/ui/gui/text-data-import-dialog.c index 2cecd548..79f77627 100644 --- a/src/ui/gui/text-data-import-dialog.c +++ b/src/ui/gui/text-data-import-dialog.c @@ -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) -- 2.30.2