[balsa/gtk3] Grab keyboard focus to the default button



commit 125a9a4f950cfd2469348e2099c205ac41d41086
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu Mar 26 18:09:31 2015 -0400

    Grab keyboard focus to the default button
    
        * src/store-address.c (store_address_dialog): grab the keyboard
        focus to the default button, "OK", instead of the address book
        combo-box.

 ChangeLog           |    6 ++++++
 src/store-address.c |    2 ++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7aa09bb..a464c88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2015-03-26  Peter Bloomfield  <pbloomfield bellsouth net>
 
+       * src/store-address.c (store_address_dialog): grab the keyboard
+       focus to the default button, "OK", instead of the address book
+       combo-box.
+
+2015-03-26  Peter Bloomfield  <pbloomfield bellsouth net>
+
        * src/store-address.c (balsa_store_address_from_messages): clean
        up code;
        (store_address_response): drop response for "save this address
diff --git a/src/store-address.c b/src/store-address.c
index eb9d1b5..eb433e1 100644
--- a/src/store-address.c
+++ b/src/store-address.c
@@ -211,6 +211,8 @@ store_address_dialog(StoreAddressInfo * info)
                                     _("_OK"), GTK_RESPONSE_OK,
                                     NULL);
     gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
+    gtk_widget_grab_focus(gtk_dialog_get_widget_for_response
+                          (GTK_DIALOG(dialog), GTK_RESPONSE_OK));
     vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
 
 #if HAVE_MACOSX_DESKTOP


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]