gnucash master: Multiple changes pushed

Christian Stimming cstim at code.gnucash.org
Wed Apr 22 16:41:10 EDT 2015


Updated	 via  https://github.com/Gnucash/gnucash/commit/ea38f2b8 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/e9b6ee74 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/274113b3 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f9376318 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/79546ff6 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/becec402 (commit)
	from  https://github.com/Gnucash/gnucash/commit/c46c0a9e (commit)



commit ea38f2b8e6ba01d3991635c597ed63ccdcf78521
Merge: c46c0a9 e9b6ee7
Author: Christian Stimming <christian at cstimming.de>
Date:   Wed Apr 22 22:40:48 2015 +0200

    Merge branch 'maint'

diff --cc CMakeLists.txt
index d7034e5,a2a3725..7198944
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@@ -92,28 -92,13 +92,33 @@@ IF (NOT GUILE_EXECUTABLE
    MESSAGe (SEND_ERROR "The guile executable was not found, but is required. Please set GUILE_EXECUTABLE.")
  ENDIF (NOT GUILE_EXECUTABLE)
  
 +#BOOST
 +SET (Boost_USE_STATIC_LIBS OFF)
 +SET (Boost_USE_MULTITHREADED ON)
 +SET (Boost_USE_STATIC_RUNTIME OFF)
 +SET (Boost_FIND_QUIETLY ON)
 +FIND_PACKAGE (Boost 1.50.0 REQUIRED COMPONENTS chrono date_time filesystem log program_options regex signals system) # test)
 +# boost-test currently can't be found by FindBoost.cmake because the
 +# shared library might be named libboost_unit_test_framework.so
 +
 +IF (Boost_FOUND)
 +    include_directories(${Boost_INCLUDE_DIRS})
 +#    add_executable(progname file1.cxx file2.cxx)
 +#    target_link_libraries(progname ${Boost_LIBRARIES})
 +ELSE (Boost_FOUND)
 +    MESSAGE (SEND_ERROR "Boost 1.50.0 or later is not installed, and is required. Please install it and ensure that the following libraries are built: chrono, date_time, filesystem, log, program_options, regex, signals, system, and test.")
 +ENDIF (Boost_FOUND)
 +
 +# Also, set the C++ version to c++11
 +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 +
  # ############################################################
  
+ # xsltproc
+ FIND_PROGRAM (XSLTPROC xsltproc)
+ 
+ # ############################################################
+ 
  # libdbi
  FIND_PATH (LIBDBI_INCLUDE_PATH dbi/dbi.h)
  FIND_LIBRARY (LIBDBI_LIBRARY dbi)

commit e9b6ee74ad4d1461777e8671d5c61161db907ad3
Author: Christian Stimming <christian at cstimming.de>
Date:   Wed Apr 22 22:33:58 2015 +0200

    Cutecash: Switch from guile to xml to manage our iso-currencies source file
    
    Copies 87520cdde4b into the cmake build system.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6fd44c4..a2a3725 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -94,6 +94,11 @@ ENDIF (NOT GUILE_EXECUTABLE)
 
 # ############################################################
 
+# xsltproc
+FIND_PROGRAM (XSLTPROC xsltproc)
+
+# ############################################################
+
 # libdbi
 FIND_PATH (LIBDBI_INCLUDE_PATH dbi/dbi.h)
 FIND_LIBRARY (LIBDBI_LIBRARY dbi)
diff --git a/src/engine/CMakeLists.txt b/src/engine/CMakeLists.txt
index 974b02d..26c7723 100644
--- a/src/engine/CMakeLists.txt
+++ b/src/engine/CMakeLists.txt
@@ -76,9 +76,9 @@ GNC_ADD_SWIG_COMMAND (${SWIG_ENGINE_C} ${CMAKE_CURRENT_SOURCE_DIR}/engine.i ${li
 SET (ISO_4217_C ${CMAKE_CURRENT_BINARY_DIR}/iso-4217-currencies.c)
 ADD_CUSTOM_COMMAND (
   OUTPUT ${ISO_4217_C}
-  DEPENDS iso-4217-currencies.scm iso-currencies-to-c.in
+  DEPENDS iso-4217-currencies.xml iso-currencies-to-c.xsl
   COMMAND
-    ${GUILE_EXECUTABLE} -s "${CMAKE_CURRENT_SOURCE_DIR}/iso-currencies-to-c.in" "${CMAKE_CURRENT_SOURCE_DIR}"
+    ${XSLTPROC} -o ${ISO_4217_C} "${CMAKE_CURRENT_SOURCE_DIR}/iso-currencies-to-c.xsl" "${CMAKE_CURRENT_SOURCE_DIR}/iso-4217-currencies.xml"
 )
 # Add dependency on iso-4217-currencies.c
 SET_SOURCE_FILES_PROPERTIES (gnc-commodity.c PROPERTIES OBJECT_DEPENDS ${ISO_4217_C})

commit 274113b34751d63b5df5135b187bf41463c3b09f
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Tue Dec 2 06:58:11 2014 +0100

    Improve "Auto pay on posting" message
    
    http://lists.gnucash.org/logs/2014/11/2014-11-29.html#T11:14:29
    Additional remove some empty placeholders

diff --git a/src/business/business-gnome/gtkbuilder/business-prefs.glade b/src/business/business-gnome/gtkbuilder/business-prefs.glade
index ad25180..de8e96f 100644
--- a/src/business/business-gnome/gtkbuilder/business-prefs.glade
+++ b/src/business/business-gnome/gtkbuilder/business-prefs.glade
@@ -2,6 +2,13 @@
 <interface>
   <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy project-wide -->
+  <object class="GtkAdjustment" id="days_in_adj">
+    <property name="lower">1</property>
+    <property name="upper">180</property>
+    <property name="value">7</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
   <object class="GtkListStore" id="liststore_printinvoice">
     <columns>
       <!-- column-name item -->
@@ -38,36 +45,6 @@
           <placeholder/>
         </child>
         <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
           <object class="GtkLabel" id="label53">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
@@ -144,9 +121,6 @@
           </packing>
         </child>
         <child>
-          <placeholder/>
-        </child>
-        <child>
           <object class="GtkLabel" id="label15">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
@@ -216,6 +190,9 @@
           </packing>
         </child>
         <child>
+          <placeholder/>
+        </child>
+        <child>
           <object class="GtkCheckButton" id="pref/dialogs.business.invoice/tax-included">
             <property name="label" translatable="yes">_Tax included</property>
             <property name="visible">True</property>
@@ -341,9 +318,6 @@
           <placeholder/>
         </child>
         <child>
-          <placeholder/>
-        </child>
-        <child>
           <object class="GtkLabel" id="label2">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
@@ -359,32 +333,8 @@
           </packing>
         </child>
         <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
           <object class="GtkCheckButton" id="pref/dialogs.business.invoice/auto-pay">
-            <property name="label" translatable="yes">Auto pay on post_ing</property>
+            <property name="label" translatable="yes" comments="See the tooltip "At post time..." for details.">_Process payments on posting</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
@@ -401,17 +351,8 @@
           </packing>
         </child>
         <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
           <object class="GtkCheckButton" id="pref/dialogs.business.bill/auto-pay">
-            <property name="label" translatable="yes">Auto _pay on posting</property>
+            <property name="label" translatable="yes" comments="See the tooltip "At post time..." for details.">Pro_cess payments on posting</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
@@ -430,11 +371,4 @@
       </object>
     </child>
   </object>
-  <object class="GtkAdjustment" id="days_in_adj">
-    <property name="lower">1</property>
-    <property name="upper">180</property>
-    <property name="value">7</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
 </interface>

commit f9376318ad82b631c90108f77939f2307953192d
Author: Christian Stimming <christian at cstimming.de>
Date:   Sun Apr 12 22:26:31 2015 +0200

    Bug 747377: Fix overly restrictive input validation for IBAN of SEPA transfer.
    
    Only in some countries the IBAN is really restricted to numeric-only
    (most notably in Germany, "DE"). In some other countries parts of the
    IBAN may be alphas. These checks could be extended for more countries,
    but since aqbanking with the SEPA transfers is used mostly in Germany,
    we just leave it with the exception rule for Germany.

diff --git a/src/import-export/aqb/dialog-ab-trans.c b/src/import-export/aqb/dialog-ab-trans.c
index 93d1216..67a3687 100644
--- a/src/import-export/aqb/dialog-ab-trans.c
+++ b/src/import-export/aqb/dialog-ab-trans.c
@@ -1348,16 +1348,53 @@ gnc_ab_trans_dialog_ibanentry_filter_cb (GtkEditable *editable,
 
         if (gnc_ab_trans_isSEPA(td->trans_type))
         {
-            // SEPA: Only alphas in the first two places (only upper case, though), then only digits
+            enum {
+                ALPHA
+                , ALNUM
+                , NUMERIC
+            } allowed_characterclass;
+
+            // SEPA: Only alphas in the first two places (at index 0, 1)
             if (*position + i < 2)
             {
-                if (g_ascii_isalpha(c))
-                    g_string_append_c(result, g_ascii_toupper(c));
+                allowed_characterclass = ALPHA;
             }
+            // SEPA: Next two places are digits only (index 2, 3)
+            else if (*position + i < 4)
+            {
+                allowed_characterclass = NUMERIC;
+            }
+            // SEPA: The rest depends on the country code: Either Alpha-numeric or numeric only
             else
             {
+                const gchar* acct_text = gtk_entry_get_text(GTK_ENTRY(td->recp_account_entry));
+                // Special case for German ("DE") IBAN: Numeric only. Otherwise allow alpha-numeric
+                if (acct_text[0] == 'D' && acct_text[1] == 'E')
+                {
+                    allowed_characterclass = NUMERIC;
+                }
+                else
+                {
+                    allowed_characterclass = ALNUM;
+                }
+            }
+
+            // Do the actual character class check. Alphas are only allowed in
+            // uppercase, though.
+            switch (allowed_characterclass)
+            {
+            case ALPHA:
+                if (g_ascii_isalpha(c))
+                    g_string_append_c(result, g_ascii_toupper(c));
+                break;
+            case ALNUM:
+                if (g_ascii_isalnum(c))
+                    g_string_append_c(result, g_ascii_toupper(c));
+                break;
+            case NUMERIC:
                 if (g_ascii_isdigit(c))
                     g_string_append_c(result, c);
+                break;
             }
         }
         else

commit 79546ff6a5647f2b219c304decad14f3c51a1b68
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Fri Apr 10 21:11:50 2015 +0200

    Note in txf-help*.scm that changes should be applied to
    gnucash-docs/help/*/Help_txf-categories.xml
    
    Code part of cross linking

diff --git a/src/tax/us/txf-help-de_DE.scm b/src/tax/us/txf-help-de_DE.scm
index 4d611c5..415463d 100644
--- a/src/tax/us/txf-help-de_DE.scm
+++ b/src/tax/us/txf-help-de_DE.scm
@@ -12,6 +12,7 @@
 ;;
 ;; This file holds the explanations to the categories from txf-de_DE.scm.
 ;;
+;; Changes in this file should also be applied on gnucash-docs/help/de/Help_txf-categories.xml
 
 (define txf-help-strings
   '(
diff --git a/src/tax/us/txf-help.scm b/src/tax/us/txf-help.scm
index c470548..27edada 100644
--- a/src/tax/us/txf-help.scm
+++ b/src/tax/us/txf-help.scm
@@ -6,6 +6,7 @@
 ;;
 ;; (n <- TurboTax      (N <- IRS
 ;;
+;; Changes in this file should also be applied on gnucash-docs/help/C/Help_txf-categories.xml
 
 (define txf-help-strings
   '(

commit becec4022b64161b66ff61338f133d9d43f769b0
Author: Alex Aycinena <alex.aycinena at gmail.com>
Date:   Wed Apr 8 12:13:55 2015 -0700

    Bug 740955 - Correct general journal and general ledger reports to properly handle Use-Split-Action-For-Num option in File->Properties.

diff --git a/src/report/standard-reports/general-journal.scm b/src/report/standard-reports/general-journal.scm
index 4653165..b957e90 100644
--- a/src/report/standard-reports/general-journal.scm
+++ b/src/report/standard-reports/general-journal.scm
@@ -105,7 +105,9 @@
      ;; One list per option here with: option-name, default-value
      (list
       (list (N_ "Date") #t)
-      (list (N_ "Num") #f)
+      (if (qof-book-use-split-action-for-num-field (gnc-get-current-book))
+          (list (N_ "Num/Action") #f)
+          (list (N_ "Num") #f))
       (list (N_ "Description") #t)
       (list (N_ "Account") #t)
       (list (N_ "Shares") #f)
diff --git a/src/report/standard-reports/general-ledger.scm b/src/report/standard-reports/general-ledger.scm
index 1035c15..5da37fe 100644
--- a/src/report/standard-reports/general-ledger.scm
+++ b/src/report/standard-reports/general-ledger.scm
@@ -71,27 +71,50 @@
      (lambda (l)
        (set-option! gnc:pagename-display (car l) (cadr l)))
      ;; One list per option here with: option-name, default-value
-     (list
-      (list (N_ "Date") #t)
-      (list (N_ "Reconciled Date") #f)
-      (list (N_ "Num") #f)
-      (list (N_ "Description") #t)
-      (list (N_ "Memo") #f)
-      (list (N_ "Account Name") #f)
-      (list (N_ "Use Full Account Name") #f)
-      (list (N_ "Account Code") #f)
-      (list (N_ "Other Account Name") #f)
-      (list (N_ "Use Full Other Account Name") #f)
-      (list (N_ "Other Account Code") #f)
-      (list (N_ "Shares") #f)
-      (list (N_ "Price") #f)
-      ;; note the "Amount" multichoice option here
-      (list (N_ "Amount") 'double)
-      (list (N_ "Running Balance") #t)
-      (list (N_ "Totals") #f)
-      (list (N_ "Sign Reverses") 'credit-accounts)
-      )
+     (if (qof-book-use-split-action-for-num-field (gnc-get-current-book))
+         (list
+          (list (N_ "Date") #t)
+          (list (N_ "Reconciled Date") #f)
+          (list (N_ "Num/Action") #f)
+          (list (N_ "Trans Number") #f)
+          (list (N_ "Description") #t)
+          (list (N_ "Memo") #f)
+          (list (N_ "Account Name") #f)
+          (list (N_ "Use Full Account Name") #f)
+          (list (N_ "Account Code") #f)
+          (list (N_ "Other Account Name") #f)
+          (list (N_ "Use Full Other Account Name") #f)
+          (list (N_ "Other Account Code") #f)
+          (list (N_ "Shares") #f)
+          (list (N_ "Price") #f)
+          ;; note the "Amount" multichoice option here
+          (list (N_ "Amount") 'double)
+          (list (N_ "Running Balance") #t)
+          (list (N_ "Totals") #f)
+          (list (N_ "Sign Reverses") 'credit-accounts)
+         )
+         (list
+          (list (N_ "Date") #t)
+          (list (N_ "Reconciled Date") #f)
+          (list (N_ "Num") #f)
+          (list (N_ "Description") #t)
+          (list (N_ "Memo") #f)
+          (list (N_ "Account Name") #f)
+          (list (N_ "Use Full Account Name") #f)
+          (list (N_ "Account Code") #f)
+          (list (N_ "Other Account Name") #f)
+          (list (N_ "Use Full Other Account Name") #f)
+          (list (N_ "Other Account Code") #f)
+          (list (N_ "Shares") #f)
+          (list (N_ "Price") #f)
+          ;; note the "Amount" multichoice option here
+          (list (N_ "Amount") 'double)
+          (list (N_ "Running Balance") #t)
+          (list (N_ "Totals") #f)
+          (list (N_ "Sign Reverses") 'credit-accounts)
+         )
      )
+    )
     
     ;; set options in the general tab...
     (set-option!



Summary of changes:
 CMakeLists.txt                                     |  5 ++
 .../business-gnome/gtkbuilder/business-prefs.glade | 90 +++-------------------
 src/engine/CMakeLists.txt                          |  4 +-
 src/report/standard-reports/general-journal.scm    |  4 +-
 src/report/standard-reports/general-ledger.scm     | 63 ++++++++++-----
 src/tax/us/txf-help-de_DE.scm                      |  1 +
 src/tax/us/txf-help.scm                            |  1 +
 7 files changed, 67 insertions(+), 101 deletions(-)



More information about the gnucash-changes mailing list