gnucash maint: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Tue Nov 5 12:14:54 EST 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/e991fe85 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/910cdbfd (commit)
	from  https://github.com/Gnucash/gnucash/commit/1a9825fe (commit)



commit e991fe853caff678ec23cdeb41e9d1ea87403d6b
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Nov 5 09:14:14 2019 -0800

    Bug 797086 - Import customer dialog – headers not translated

diff --git a/gnucash/import-export/customer-import/dialog-customer-import-gui.c b/gnucash/import-export/customer-import/dialog-customer-import-gui.c
index c2308de05..5b6fb6ea4 100644
--- a/gnucash/import-export/customer-import/dialog-customer-import-gui.c
+++ b/gnucash/import-export/customer-import/dialog-customer-import-gui.c
@@ -124,25 +124,25 @@ gnc_plugin_customer_import_showGUI(GtkWindow *parent)
   column = gtk_tree_view_column_new_with_attributes (description, renderer, "text", column_id, NULL); \
   gtk_tree_view_column_set_resizable (column, TRUE); \
   gtk_tree_view_append_column (GTK_TREE_VIEW (gui->tree_view), column);
-    CREATE_COLUMN ("id", CI_ID);
-    CREATE_COLUMN ("company", CI_COMPANY);
-    CREATE_COLUMN ("name", CI_NAME);
-    CREATE_COLUMN ("addr1", CI_ADDR1);
-    CREATE_COLUMN ("addr2", CI_ADDR2);
-    CREATE_COLUMN ("addr3", CI_ADDR3);
-    CREATE_COLUMN ("addr4", CI_ADDR4);
-    CREATE_COLUMN ("phone", CI_PHONE);
-    CREATE_COLUMN ("fax", CI_FAX);
-    CREATE_COLUMN ("email", CI_EMAIL);
-    CREATE_COLUMN ("notes", CI_NOTES);
-    CREATE_COLUMN ("shipname", CI_SHIPNAME);
-    CREATE_COLUMN ("shipaddr1", CI_SHIPADDR1);
-    CREATE_COLUMN ("shipaddr2", CI_SHIPADDR2);
-    CREATE_COLUMN ("shipaddr3", CI_SHIPADDR3);
-    CREATE_COLUMN ("shipaddr4", CI_SHIPADDR4);
-    CREATE_COLUMN ("shipphone", CI_SHIPPHONE);
-    CREATE_COLUMN ("shipfax", CI_SHIPFAX);
-    CREATE_COLUMN ("shipemail", CI_SHIPEMAIL);
+    CREATE_COLUMN (_("id"), CI_ID);
+    CREATE_COLUMN (_("company"), CI_COMPANY);
+    CREATE_COLUMN (_("name"), CI_NAME);
+    CREATE_COLUMN (_("addr1"), CI_ADDR1);
+    CREATE_COLUMN (_("addr2"), CI_ADDR2);
+    CREATE_COLUMN (_("addr3"), CI_ADDR3);
+    CREATE_COLUMN (_("addr4"), CI_ADDR4);
+    CREATE_COLUMN (_("phone"), CI_PHONE);
+    CREATE_COLUMN (_("fax"), CI_FAX);
+    CREATE_COLUMN (_("email"), CI_EMAIL);
+    CREATE_COLUMN (_("notes"), CI_NOTES);
+    CREATE_COLUMN (_("shipname"), CI_SHIPNAME);
+    CREATE_COLUMN (_("shipaddr1"), CI_SHIPADDR1);
+    CREATE_COLUMN (_("shipaddr2"), CI_SHIPADDR2);
+    CREATE_COLUMN (_("shipaddr3"), CI_SHIPADDR3);
+    CREATE_COLUMN (_("shipaddr4"), CI_SHIPADDR4);
+    CREATE_COLUMN (_("shipphone"), CI_SHIPPHONE);
+    CREATE_COLUMN (_("shipfax"), CI_SHIPFAX);
+    CREATE_COLUMN (_("shipemail"), CI_SHIPEMAIL);
 
     gui->component_id = gnc_register_gui_component ("dialog-customer-import-gui",
                         NULL,

commit 910cdbfddc39eea3fc8e624eeda46f40543972e7
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Nov 5 09:12:17 2019 -0800

    Fix compile error, missing return value.
    
    And a condition, !(!inv) to cast inv as a bool is a bit too clever.
    inv != NULL more clearly conveys the intent.

diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index 308c40916..d2de0dbb1 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -1028,7 +1028,7 @@ gnc_plugin_page_register_ui_update (gpointer various, GncPluginPageRegister *pag
     inv = invoice_from_trans(trans);
     action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page),
                                          "JumpAssociatedInvoiceAction");
-    gtk_action_set_sensitive (GTK_ACTION(action), (!(!inv)));
+    gtk_action_set_sensitive (GTK_ACTION(action), inv != NULL);
 
     gnc_plugin_business_split_reg_ui_update (GNC_PLUGIN_PAGE(page));
 
@@ -4333,7 +4333,7 @@ static GncInvoice * invoice_from_trans (Transaction *trans)
     GncInvoice *invoice;
     SplitList *splits;
 
-    g_return_if_fail (GNC_IS_TRANSACTION(trans));
+    g_return_val_if_fail (GNC_IS_TRANSACTION(trans), NULL);
     invoice = gncInvoiceGetInvoiceFromTxn(trans);
 
     if (invoice)



Summary of changes:
 gnucash/gnome/gnc-plugin-page-register.c           |  4 +--
 .../customer-import/dialog-customer-import-gui.c   | 38 +++++++++++-----------
 2 files changed, 21 insertions(+), 21 deletions(-)



More information about the gnucash-changes mailing list