r22144 - gnucash/trunk/src/business/business-gnome - In "Process Payment" and "New Order", let the customer field have keyboard focus.

Christian Stimming cstim at code.gnucash.org
Tue Apr 10 16:24:52 EDT 2012


Author: cstim
Date: 2012-04-10 16:24:51 -0400 (Tue, 10 Apr 2012)
New Revision: 22144
Trac: http://svn.gnucash.org/trac/changeset/22144

Modified:
   gnucash/trunk/src/business/business-gnome/dialog-job.c
   gnucash/trunk/src/business/business-gnome/dialog-order.c
   gnucash/trunk/src/business/business-gnome/dialog-payment.c
Log:
In "Process Payment" and "New Order", let the customer field have keyboard focus.

In "New Job", focus the job name.

Modified: gnucash/trunk/src/business/business-gnome/dialog-job.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-job.c	2012-04-09 19:56:24 UTC (rev 22143)
+++ gnucash/trunk/src/business/business-gnome/dialog-job.c	2012-04-10 20:24:51 UTC (rev 22144)
@@ -402,6 +402,14 @@
 
     gtk_widget_show_all (jw->dialog);
 
+    // The job name should have keyboard focus
+    gtk_widget_grab_focus(jw->name_entry);
+    // Or should the owner field have focus?
+//    if (GNC_IS_GENERAL_SEARCH(jw->cust_edit))
+//    {
+//        gnc_general_search_grab_focus(GNC_GENERAL_SEARCH(jw->cust_edit));
+//    }
+
     g_object_unref(G_OBJECT(builder));
 
     return jw;

Modified: gnucash/trunk/src/business/business-gnome/dialog-order.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-order.c	2012-04-09 19:56:24 UTC (rev 22143)
+++ gnucash/trunk/src/business/business-gnome/dialog-order.c	2012-04-10 20:24:51 UTC (rev 22144)
@@ -46,6 +46,7 @@
 #include "dialog-invoice.h"
 #include "business-gnome-utils.h"
 #include "dialog-date-close.h"
+#include "gnome-search/gnc-general-search.h"
 
 #define DIALOG_NEW_ORDER_CM_CLASS "dialog-new-order"
 #define DIALOG_EDIT_ORDER_CM_CLASS "dialog-edit-order"
@@ -738,6 +739,12 @@
     /* Now fill in a lot of the pieces and display properly */
     gnc_order_update_window (ow);
 
+    // The customer choice widget should have keyboard focus
+    if (GNC_IS_GENERAL_SEARCH(ow->owner_choice))
+    {
+        gnc_general_search_grab_focus(GNC_GENERAL_SEARCH(ow->owner_choice));
+    }
+
     /* Maybe set the reference */
     gnc_order_owner_changed_cb (ow->owner_choice, ow);
 

Modified: gnucash/trunk/src/business/business-gnome/dialog-payment.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-payment.c	2012-04-09 19:56:24 UTC (rev 22143)
+++ gnucash/trunk/src/business/business-gnome/dialog-payment.c	2012-04-10 20:24:51 UTC (rev 22144)
@@ -47,6 +47,7 @@
 #include "business-gnome-utils.h"
 
 #include "dialog-transfer.h"
+#include "gnome-search/gnc-general-search.h"
 
 #define DIALOG_PAYMENT_CUSTOMER_CM_CLASS "customer-payment-dialog"
 #define DIALOG_PAYMENT_VENDOR_CM_CLASS "vendor-payment-dialog"
@@ -863,6 +864,12 @@
     gtk_widget_show_all (pw->dialog);
     g_object_unref(G_OBJECT(builder));
 
+    // The customer choice widget should have keyboard focus
+    if (GNC_IS_GENERAL_SEARCH(pw->owner_choice))
+    {
+        gnc_general_search_grab_focus(GNC_GENERAL_SEARCH(pw->owner_choice));
+    }
+
     /* Warn the user if they have no valid post-to accounts */
     {
         const gchar *text;



More information about the gnucash-changes mailing list