gnucash master: Multiple changes pushed

Christopher Lam clam at code.gnucash.org
Mon May 4 12:09:42 EDT 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/a9a60c18 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/14ea5d97 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/2fae14c3 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/5ed6b424 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/92e9e60c (commit)
	 via  https://github.com/Gnucash/gnucash/commit/2f063923 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/6a3fabc3 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/ca9d58b2 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f1c2e339 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/327544e6 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/47594533 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/b4177bc6 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/1e598191 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/5cabbbc9 (commit)
	from  https://github.com/Gnucash/gnucash/commit/e5e7b30f (commit)



commit a9a60c18310ba8c4273b50ee587df4a47640d869
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Mon May 4 23:32:10 2020 +0800

    [Account.cpp] more xaccAccountTypeGetFundamental types

diff --git a/libgnucash/engine/Account.cpp b/libgnucash/engine/Account.cpp
index 33dd04a5e..a6ede7ac5 100644
--- a/libgnucash/engine/Account.cpp
+++ b/libgnucash/engine/Account.cpp
@@ -4398,6 +4398,9 @@ xaccAccountTypeGetFundamental (GNCAccountType t)
     {
         case ACCT_TYPE_BANK:
         case ACCT_TYPE_STOCK:
+        case ACCT_TYPE_MONEYMRKT:
+        case ACCT_TYPE_CHECKING:
+        case ACCT_TYPE_SAVINGS:
         case ACCT_TYPE_MUTUAL:
         case ACCT_TYPE_CURRENCY:
         case ACCT_TYPE_CASH:
@@ -4407,6 +4410,7 @@ xaccAccountTypeGetFundamental (GNCAccountType t)
         case ACCT_TYPE_CREDIT:
         case ACCT_TYPE_LIABILITY:
         case ACCT_TYPE_PAYABLE:
+        case ACCT_TYPE_CREDITLINE:
             return ACCT_TYPE_LIABILITY;
         case ACCT_TYPE_INCOME:
             return ACCT_TYPE_INCOME;

commit 14ea5d97512a5753b11828c38cd114e093b1bdd0
Merge: e5e7b30f7 2fae14c3b
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Mon May 4 23:31:21 2020 +0800

    Merge branch 'maint'

diff --cc doc/tip_of_the_day.list.c
index ed421a661,d775c0946..6e5db72d4
--- a/doc/tip_of_the_day.list.c
+++ b/doc/tip_of_the_day.list.c
@@@ -1,6 -1,11 +1,11 @@@
 - N_( "The GnuCash online manual has lots of helpful information. \
 + N_( "1The GnuCash online manual has lots of helpful information. \
  You can access the manual under the Help menu.")
  
+ /* Translators: You can replace the link, if a transated page exists. */
+  N_( "Mailing lists are the preferred form of communication in the \
+ GnuCash community. For announcements of new releases, user groups etc. \
+ see the table at https://wiki.gnucash.org/wiki/Mailing_Lists")
+ 
   N_( "The GnuCash developers are easy to contact. As well \
  as several mailing lists, you can chat to them live on IRC! \
  Join them on #gnucash at irc.gnome.org")
diff --cc gnucash/gtkbuilder/dialog-preferences.glade
index 2bc5f23ab,ca4c74251..86a0dacfd
--- a/gnucash/gtkbuilder/dialog-preferences.glade
+++ b/gnucash/gtkbuilder/dialog-preferences.glade
@@@ -1,24 -1,7 +1,24 @@@
  <?xml version="1.0" encoding="UTF-8"?>
- <!-- Generated with glade 3.22.1 -->
+ <!-- Generated with glade 3.22.2 -->
  <interface>
    <requires lib="gtk+" version="3.10"/>
 +  <object class="GtkAdjustment" id="atm_fee_adj">
 +    <property name="upper">1000</property>
 +    <property name="step_increment">0.01</property>
 +    <property name="page_increment">10</property>
 +  </object>
 +  <object class="GtkAdjustment" id="auto_add_adj">
 +    <property name="lower">1</property>
 +    <property name="upper">6</property>
 +    <property name="step_increment">1</property>
 +    <property name="page_increment">10</property>
 +  </object>
 +  <object class="GtkAdjustment" id="auto_clear_adj">
 +    <property name="lower">6</property>
 +    <property name="upper">12</property>
 +    <property name="step_increment">1</property>
 +    <property name="page_increment">10</property>
 +  </object>
    <object class="GtkAdjustment" id="auto_decimal_places_adj">
      <property name="lower">1</property>
      <property name="upper">8</property>
@@@ -2982,9 -2852,9 +2982,10 @@@ many months before the current month:</
                          <property name="can_focus">True</property>
                          <property name="tooltip_text" translatable="yes">On high resolution screens reports tend to be hard to read. This option allows you to scale reports up by the set factor. For example setting this to 2.0 will display reports at twice their typical size.</property>
                          <property name="halign">start</property>
 -                        <property name="margin_left">12</property>
 +                        <property name="text" translatable="yes">1</property>
                          <property name="adjustment">default_zoom_adj</property>
 +                        <property name="value">1</property>
+                         <property name="digits">1</property>
                        </object>
                        <packing>
                          <property name="expand">False</property>
diff --cc gnucash/import-export/import-main-matcher.c
index d7d20d656,b9889ee76..786c160b8
--- a/gnucash/import-export/import-main-matcher.c
+++ b/gnucash/import-export/import-main-matcher.c
@@@ -67,9 -67,8 +67,10 @@@ struct _main_matcher_inf
      gpointer user_data;
      GNCImportPendingMatches *pending_matches;
      GtkTreeViewColumn *account_column;
 +    GtkWidget         *show_account_column;
 +    GtkWidget         *show_matched_info;
      gboolean add_toggled;   // flag to indicate that add has been toggled to stop selection
+     gint id;
  };
  
  enum downloaded_cols

commit 2fae14c3baf90fe0b71d15b9ad34a5d9edd408c9
Merge: 5ed6b424d f1c2e339f
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun May 3 11:52:07 2020 +0100

    Merge Chris Good's branch 'bug797648Rec-2', PR #713 into maint


commit 5ed6b424ddce13db3450a483bcb3e7ed2a08f9cd
Merge: 2f0639235 92e9e60cd
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun May 3 11:12:58 2020 +0100

    Merge Jean Laroche's branch 'fix_seg_fault_in_matcher'  into maint


commit 92e9e60cd027e8b1f79bc04a79005129c8149293
Author: jean <you at example.com>
Date:   Sat May 2 21:10:38 2020 -0700

    Fix the crash that occurs when opening a new book when the transaction-matching dialog has been opened then closed.

diff --git a/gnucash/import-export/import-main-matcher.c b/gnucash/import-export/import-main-matcher.c
index 8851da8b2..b9889ee76 100644
--- a/gnucash/import-export/import-main-matcher.c
+++ b/gnucash/import-export/import-main-matcher.c
@@ -68,6 +68,7 @@ struct _main_matcher_info
     GNCImportPendingMatches *pending_matches;
     GtkTreeViewColumn *account_column;
     gboolean add_toggled;   // flag to indicate that add has been toggled to stop selection
+    gint id;
 };
 
 enum downloaded_cols
@@ -171,6 +172,7 @@ void gnc_gen_trans_list_delete (GNCImportMainMatcher *info)
     {
         gnc_save_window_size (GNC_PREFS_GROUP, GTK_WINDOW(info->main_widget));
         gnc_import_Settings_delete (info->user_settings);
+        gnc_unregister_gui_component (info->id);
         gtk_widget_destroy (GTK_WIDGET (info->main_widget));
     }
     else
@@ -924,7 +926,6 @@ GNCImportMainMatcher *gnc_gen_trans_list_new (GtkWidget *parent,
     GtkStyleContext *stylectxt;
     GdkRGBA color;
     GtkWidget *button;
-    gint id;
 
     info = g_new0 (GNCImportMainMatcher, 1);
     info->pending_matches = gnc_import_PendingMatches_new();
@@ -981,12 +982,12 @@ GNCImportMainMatcher *gnc_gen_trans_list_new (GtkWidget *parent,
     g_object_unref (G_OBJECT(builder));
     
     // Register this UI, it needs to be closed when the session is closed.
-    id = gnc_register_gui_component (IMPORT_MAIN_MATCHER_CM_CLASS,
-                                    NULL, /* no refresh handler */
-                                    (GNCComponentCloseHandler)gnc_gen_trans_list_delete,
-                                    info);
+    info->id = gnc_register_gui_component (IMPORT_MAIN_MATCHER_CM_CLASS,
+                                           NULL, /* no refresh handler */
+                                           (GNCComponentCloseHandler)gnc_gen_trans_list_delete,
+                                           info);
     // This ensure this dialog is closed when the session is closed.
-    gnc_gui_component_set_session (id, gnc_get_current_session());
+    gnc_gui_component_set_session (info->id, gnc_get_current_session());
     return info;
 }
 

commit 2f0639235a93df7109c6178b0ec218cd408512fb
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sun May 3 11:43:19 2020 +0800

    Bug 797707 - CSV Transaction Export: custom dates should be insensitive by default
    
    By default the absolute date selector needs to be made
    insensitive. Selecting 'Custom Start/End date' will enable
    sensitivity.

diff --git a/gnucash/import-export/csv-exp/assistant-csv-export.c b/gnucash/import-export/csv-exp/assistant-csv-export.c
index e9cc9bdcd..427a20bf3 100644
--- a/gnucash/import-export/csv-exp/assistant-csv-export.c
+++ b/gnucash/import-export/csv-exp/assistant-csv-export.c
@@ -938,6 +938,7 @@ csv_export_assistant_create (CsvExportInfo *info)
 
         /* Start date info */
         info->csvd.start_date = gnc_date_edit_new (gnc_time (NULL), FALSE, FALSE);
+        gtk_widget_set_sensitive (info->csvd.start_date, FALSE);
         hbox = GTK_WIDGET(gtk_builder_get_object (builder, "start_date_hbox"));
         gtk_box_pack_start (GTK_BOX(hbox), info->csvd.start_date, TRUE, TRUE, 0);
         gtk_widget_show (info->csvd.start_date);
@@ -947,6 +948,7 @@ csv_export_assistant_create (CsvExportInfo *info)
 
         /* End date info */
         info->csvd.end_date = gnc_date_edit_new (gnc_time (NULL), FALSE, FALSE);
+        gtk_widget_set_sensitive (info->csvd.end_date, FALSE);
         hbox = GTK_WIDGET(gtk_builder_get_object (builder, "end_date_hbox"));
         gtk_box_pack_start (GTK_BOX(hbox), info->csvd.end_date, TRUE, TRUE, 0);
         gtk_widget_show (info->csvd.end_date);

commit 6a3fabc30d8e0f551c8918703f07119d5f5bb065
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat May 2 15:29:02 2020 -0700

    Fix test failure for timezones west of the prime meridian.
    
    The previous fix didn't calculate the comparison time correctly and
    ended up in the wrong day because the GMT time is before the local time.
    
    In the course of checking the corner-case timezones (Midway and
    Kiritimati) I found an error in the GncDateTime calculation of the
    neutral time, so fixed that too.

diff --git a/bindings/python/tests/test_business.py b/bindings/python/tests/test_business.py
index 97528ec71..4baea45a9 100644
--- a/bindings/python/tests/test_business.py
+++ b/bindings/python/tests/test_business.py
@@ -1,6 +1,6 @@
 from unittest import main
 
-from datetime import datetime, timezone
+from datetime import datetime, timezone, timedelta
 
 from gnucash import Account, \
     ACCT_TYPE_RECEIVABLE, ACCT_TYPE_INCOME, ACCT_TYPE_BANK, \
@@ -56,8 +56,15 @@ class TestBusiness(BusinessSession):
         self.assertEqual( NAME, self.employee.GetUsername() )
 
     def test_post(self):
-        self.assertEqual(datetime.now(timezone.utc).replace(hour=10, minute=59, second=0, microsecond=0).astimezone(),
-                         self.invoice.GetDatePosted().astimezone())
+        utc_offset = datetime.now().astimezone().utcoffset()
+        now = datetime.now().astimezone()
+        neutral_time = (now + utc_offset).astimezone(timezone.utc).replace(hour=10, minute=59, second=0, microsecond=0)
+        if utc_offset > timedelta(hours=13):
+            neutral_time -= utc_offset - timedelta(hours=13);
+        if utc_offset < timedelta(hours=-10):
+            neutral_time += timedelta(hours=-10) - utc_offset
+        self.assertEqual(neutral_time,
+                         self.invoice.GetDatePosted().astimezone(timezone.utc))
         self.assertTrue( self.invoice.IsPosted() )
 
     def test_owner(self):
diff --git a/libgnucash/engine/gnc-datetime.cpp b/libgnucash/engine/gnc-datetime.cpp
index 2192ffd3f..bd9a8cd31 100644
--- a/libgnucash/engine/gnc-datetime.cpp
+++ b/libgnucash/engine/gnc-datetime.cpp
@@ -314,7 +314,7 @@ GncDateTimeImpl::GncDateTimeImpl(const GncDateImpl& date, DayPart part) :
             if (offset < hours(-10))
                 m_time -= hours(offset.hours() + 10);
             if (offset > hours(13))
-                m_time -= hours(offset.hours() - 11);
+                m_time += hours(13 - offset.hours());
         }
         catch(boost::gregorian::bad_year&)
         {

commit ca9d58b2783e55132b7d2d69eb60faf115e30088
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat May 2 18:11:05 2020 +0200

    Display report zoom factor with one decimal space.
    
    The code actually allowed fractional scaling, but the display of the option didn't.
    As a result the spin button was acting oddly.
    This was discovered while looking into bug
    https://bugs.gnucash.org/show_bug.cgi?id=797712 but this commit is not a fix for that bug.

diff --git a/gnucash/gtkbuilder/dialog-preferences.glade b/gnucash/gtkbuilder/dialog-preferences.glade
index a4456b1fc..ca4c74251 100644
--- a/gnucash/gtkbuilder/dialog-preferences.glade
+++ b/gnucash/gtkbuilder/dialog-preferences.glade
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
+<!-- Generated with glade 3.22.2 -->
 <interface>
   <requires lib="gtk+" version="3.10"/>
   <object class="GtkAdjustment" id="auto_decimal_places_adj">
@@ -105,7 +105,7 @@
     <property name="default_height">400</property>
     <property name="type_hint">normal</property>
     <signal name="response" handler="gnc_preferences_response_cb" swapped="no"/>
-    <child>
+    <child type="titlebar">
       <placeholder/>
     </child>
     <child internal-child="vbox">
@@ -2854,6 +2854,7 @@ many months before the current month:</property>
                         <property name="halign">start</property>
                         <property name="margin_left">12</property>
                         <property name="adjustment">default_zoom_adj</property>
+                        <property name="digits">1</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>

commit f1c2e339fc9bf7df3487057fbe6fc06d872ac1a9
Author: goodvibes2 <goodchris96 at gmail.com>
Date:   Sat May 2 16:43:49 2020 +1000

    Bug 797648 Redo - Reconciliation - Treat each split independently
    
    The previous change under this bug which propagated the status
    change (reconcile or unreconcile) of any split for the account to
    be reconciled (and its subaccounts) in a transaction, to all
    splits for the account to be reconciled (and its subaccounts) in
    the transaction, is incorrect. Each split needs to be able to be
    checked or unchecked independently of any other split in the
    transaction.

diff --git a/gnucash/gnome/reconcile-view.c b/gnucash/gnome/reconcile-view.c
index 7815e32ab..165e78456 100644
--- a/gnucash/gnome/reconcile-view.c
+++ b/gnucash/gnome/reconcile-view.c
@@ -518,94 +518,14 @@ gnc_reconcile_view_toggle_split (GNCReconcileView *view, Split *split)
 }
 
 
-static void
-gnc_reconcile_view_toggle_children (Account *account, GNCReconcileView *view, Split *split)
-{
-    GList       *child_accounts, *node;
-    Transaction *transaction;
-
-    /*
-     * Need to get all splits in this transaction and identify any that are
-     * in the same hierarchy as the account being reconciled (not necessarily
-     * the account this split is from.)
-     *
-     * For each of these splits toggle them all to the same state.
-     */
-    child_accounts = gnc_account_get_descendants (account);
-    child_accounts = g_list_prepend (child_accounts, account);
-    transaction = xaccSplitGetParent (split);
-    for (node = xaccTransGetSplitList (transaction); node; node = node->next)
-    {
-        Split *other_split;
-        Account *other_account;
-        GNCReconcileView *current_view;
-
-        GtkTreeModel *model;
-        GtkTreeIter   iter;
-        gboolean      valid;
-        gpointer      pointer;
-
-        other_split = node->data;
-        other_account = xaccSplitGetAccount (other_split);
-        if (other_split == split)
-            continue;
-        /* Check this 'other' account is in the same hierarchy */
-        if (!g_list_find (child_accounts, other_account))
-            continue;
-        /* Search our sibling view for this split first.  We search the
-         * sibling list first because that it where it is most likely to be.
-         */
-        current_view = view->sibling;
-        if (!gnc_query_view_item_in_view (GNC_QUERY_VIEW (current_view), other_split))
-        {
-            /* Not in the sibling view, try this view */
-            current_view = view;
-            if (!gnc_query_view_item_in_view (GNC_QUERY_VIEW (current_view), other_split))
-                /* We can't find it, nothing more I can do about it */
-                continue;
-        }
-
-        /* Found the other split. Toggle the reconciled check mark in the view... */
-        model = gtk_tree_view_get_model (GTK_TREE_VIEW (current_view));
-        valid = gtk_tree_model_get_iter_first (model, &iter);
-
-        while (valid)
-        {
-            // Walk through the list, reading each row
-            gtk_tree_model_get (model, &iter, REC_POINTER, &pointer, -1);
-
-            if(pointer == other_split)
-            {
-                gboolean toggled;
-                gtk_tree_model_get (model, &iter, REC_RECN, &toggled, -1);
-                gtk_list_store_set (GTK_LIST_STORE (model), &iter, REC_RECN, !toggled, -1);
-                break;
-            }
-
-            valid = gtk_tree_model_iter_next (model, &iter);
-        }
-
-        /* ...and toggle its reconciled state in the internal hash */
-        gnc_reconcile_view_toggle_split (current_view, other_split);
-    }
-    g_list_free (child_accounts);
-}
-
-
 static void
 gnc_reconcile_view_toggle (GNCReconcileView *view, Split *split)
 {
-    gboolean include_children;
-
     g_return_if_fail (GNC_IS_RECONCILE_VIEW (view));
     g_return_if_fail (view->reconciled != NULL);
 
     gnc_reconcile_view_toggle_split (view, split);
 
-    include_children = xaccAccountGetReconcileChildrenStatus (view->account);
-    if (include_children)
-        gnc_reconcile_view_toggle_children (view->account, view, split);
-
     g_signal_emit (G_OBJECT (view),
                    reconcile_view_signals[TOGGLE_RECONCILED], 0, split);
 }

commit 327544e6c048057f2675b223fd2679e688e0a063
Author: goodvibes2 <goodchris96 at gmail.com>
Date:   Sat May 2 16:11:50 2020 +1000

    Revert "Bug 797648 - Fix problem reconciling multiple splits in a transaction"
    
    This reverts commit dd589060a3580456d5dfd079e7f0f75cc7252a9b.

diff --git a/gnucash/gnome/reconcile-view.c b/gnucash/gnome/reconcile-view.c
index 6f406befb..7815e32ab 100644
--- a/gnucash/gnome/reconcile-view.c
+++ b/gnucash/gnome/reconcile-view.c
@@ -501,43 +501,8 @@ gnc_reconcile_view_class_init (GNCReconcileViewClass *klass)
 }
 
 
-static gboolean
-gnc_reconcile_view_toggle_split (GNCReconcileView *view, Split *split)
-{
-    Split *current;
-
-    g_return_val_if_fail (GNC_IS_RECONCILE_VIEW (view), FALSE);
-    g_return_val_if_fail (view->reconciled != NULL, FALSE);
-
-    current = g_hash_table_lookup (view->reconciled, split);
-
-    if (current == NULL)
-    {
-        g_hash_table_insert (view->reconciled, split, split);
-        return TRUE;
-    }
-    else
-    {
-        g_hash_table_remove (view->reconciled, split);
-        return FALSE;
-    }
-}
-
-
-/*****************************************************************************\
- * gnc_reconcile_view_rec_or_unrec_split                                     *
- *   insert or remove a child split from the list of splits to be reconciled *
- *   (view->reconciled) so that all other splits in the same transaction     *
- *   for the account being reconciled (including children), are the same     *
- *   reconciliation state as the split that has  been toggled                *
- *                                                                           *
- * Args: view           - the view to use                                    *
- *       split          - the split to be inserted or removed                *
- *       reconcile      - TRUE=insert, FALSE=remove                          *
- * Returns: void                                                             *
-\*****************************************************************************/
 static void
-gnc_reconcile_view_rec_or_unrec_split (GNCReconcileView *view, Split *split, gboolean reconcile)
+gnc_reconcile_view_toggle_split (GNCReconcileView *view, Split *split)
 {
     Split *current;
 
@@ -546,15 +511,15 @@ gnc_reconcile_view_rec_or_unrec_split (GNCReconcileView *view, Split *split, gbo
 
     current = g_hash_table_lookup (view->reconciled, split);
 
-    if (current == NULL && reconcile)
+    if (current == NULL)
         g_hash_table_insert (view->reconciled, split, split);
-    if ((current != NULL) && (!reconcile))
+    else
         g_hash_table_remove (view->reconciled, split);
 }
 
 
 static void
-gnc_reconcile_view_toggle_children (Account *account, GNCReconcileView *view, Split *split, gboolean reconcile)
+gnc_reconcile_view_toggle_children (Account *account, GNCReconcileView *view, Split *split)
 {
     GList       *child_accounts, *node;
     Transaction *transaction;
@@ -564,8 +529,7 @@ gnc_reconcile_view_toggle_children (Account *account, GNCReconcileView *view, Sp
      * in the same hierarchy as the account being reconciled (not necessarily
      * the account this split is from.)
      *
-     * For each of these splits set them to the same state as the split whose
-     * checkbox was toggled.
+     * For each of these splits toggle them all to the same state.
      */
     child_accounts = gnc_account_get_descendants (account);
     child_accounts = g_list_prepend (child_accounts, account);
@@ -614,8 +578,7 @@ gnc_reconcile_view_toggle_children (Account *account, GNCReconcileView *view, Sp
             {
                 gboolean toggled;
                 gtk_tree_model_get (model, &iter, REC_RECN, &toggled, -1);
-                if (toggled != reconcile)
-                    gtk_list_store_set (GTK_LIST_STORE (model), &iter, REC_RECN, reconcile, -1);
+                gtk_list_store_set (GTK_LIST_STORE (model), &iter, REC_RECN, !toggled, -1);
                 break;
             }
 
@@ -623,7 +586,7 @@ gnc_reconcile_view_toggle_children (Account *account, GNCReconcileView *view, Sp
         }
 
         /* ...and toggle its reconciled state in the internal hash */
-        gnc_reconcile_view_rec_or_unrec_split (current_view, other_split, reconcile);
+        gnc_reconcile_view_toggle_split (current_view, other_split);
     }
     g_list_free (child_accounts);
 }
@@ -633,16 +596,15 @@ static void
 gnc_reconcile_view_toggle (GNCReconcileView *view, Split *split)
 {
     gboolean include_children;
-    gboolean is_reconciled;
 
     g_return_if_fail (GNC_IS_RECONCILE_VIEW (view));
     g_return_if_fail (view->reconciled != NULL);
 
-    is_reconciled = gnc_reconcile_view_toggle_split (view, split);
+    gnc_reconcile_view_toggle_split (view, split);
 
     include_children = xaccAccountGetReconcileChildrenStatus (view->account);
     if (include_children)
-        gnc_reconcile_view_toggle_children (view->account, view, split, is_reconciled);
+        gnc_reconcile_view_toggle_children (view->account, view, split);
 
     g_signal_emit (G_OBJECT (view),
                    reconcile_view_signals[TOGGLE_RECONCILED], 0, split);

commit 4759453356cfa0590b2f117aeb266bca8675bbbe
Author: goodvibes2 <goodchris96 at gmail.com>
Date:   Sat May 2 16:10:19 2020 +1000

    Revert "Use Doxygen format for function comment"
    
    This reverts commit d2986559de203471ecd2280eb1a61afb0b5c6934.

diff --git a/gnucash/gnome/reconcile-view.c b/gnucash/gnome/reconcile-view.c
index d600bca9c..6f406befb 100644
--- a/gnucash/gnome/reconcile-view.c
+++ b/gnucash/gnome/reconcile-view.c
@@ -524,17 +524,18 @@ gnc_reconcile_view_toggle_split (GNCReconcileView *view, Split *split)
 }
 
 
-/** Insert or remove a split from the list of splits to be reconciled
- *   (view->reconciled) so that all other splits in the same transaction
- *   for the account being reconciled (including children), are the same
- *   reconciliation state as the split that has been toggled.
- *
- *  @param view The view to use.
- *
- *  @param split The split to be inserted or removed
- *
- *  @param reconcile TRUE=insert, FALSE=remove
- */
+/*****************************************************************************\
+ * gnc_reconcile_view_rec_or_unrec_split                                     *
+ *   insert or remove a child split from the list of splits to be reconciled *
+ *   (view->reconciled) so that all other splits in the same transaction     *
+ *   for the account being reconciled (including children), are the same     *
+ *   reconciliation state as the split that has  been toggled                *
+ *                                                                           *
+ * Args: view           - the view to use                                    *
+ *       split          - the split to be inserted or removed                *
+ *       reconcile      - TRUE=insert, FALSE=remove                          *
+ * Returns: void                                                             *
+\*****************************************************************************/
 static void
 gnc_reconcile_view_rec_or_unrec_split (GNCReconcileView *view, Split *split, gboolean reconcile)
 {

commit b4177bc60abc1ed60a2d80a791376680493c0659
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Apr 30 11:30:03 2020 -0700

    Fix transaction post_date being set to midnight local.
    
    Reported for Invoices on gnucash-user. Checked all other uses of
    xaccTransSetPostDateSecs(), fixed the ones that weren't passing an
    already normalized time64. For Invoices change the post_date to also be
    normalized so that it stays the same as the transaction post_date. That
    also protects it from the displayed date changing depending on timezone.
    
    The python binding invoice post_time test had to be changed to match.

diff --git a/bindings/python/tests/test_business.py b/bindings/python/tests/test_business.py
index 0238d9d74..97528ec71 100644
--- a/bindings/python/tests/test_business.py
+++ b/bindings/python/tests/test_business.py
@@ -1,6 +1,6 @@
 from unittest import main
 
-from datetime import datetime, timedelta
+from datetime import datetime, timezone
 
 from gnucash import Account, \
     ACCT_TYPE_RECEIVABLE, ACCT_TYPE_INCOME, ACCT_TYPE_BANK, \
@@ -56,8 +56,8 @@ class TestBusiness(BusinessSession):
         self.assertEqual( NAME, self.employee.GetUsername() )
 
     def test_post(self):
-        self.assertEqual(self.today - timedelta(0, 0, self.today.microsecond),
-                         self.invoice.GetDatePosted())
+        self.assertEqual(datetime.now(timezone.utc).replace(hour=10, minute=59, second=0, microsecond=0).astimezone(),
+                         self.invoice.GetDatePosted().astimezone())
         self.assertTrue( self.invoice.IsPosted() )
 
     def test_owner(self):
diff --git a/gnucash/gnome-utils/dialog-transfer.c b/gnucash/gnome-utils/dialog-transfer.c
index 70a1aec77..1657d77ff 100644
--- a/gnucash/gnome-utils/dialog-transfer.c
+++ b/gnucash/gnome-utils/dialog-transfer.c
@@ -1514,7 +1514,7 @@ create_transaction(XferDialog *xferData, time64 time,
     xaccTransBeginEdit(trans);
 
     xaccTransSetCurrency(trans, xferData->from_commodity);
-    xaccTransSetDatePostedSecs(trans, time);
+    xaccTransSetDatePostedSecsNormalized(trans, time);
 
     /* Trans-Num or Split-Action set with gnc_set_num_action below per book
      * option */
diff --git a/gnucash/gnome-utils/gnc-tree-view-split-reg.c b/gnucash/gnome-utils/gnc-tree-view-split-reg.c
index 533c3293b..016021211 100644
--- a/gnucash/gnome-utils/gnc-tree-view-split-reg.c
+++ b/gnucash/gnome-utils/gnc-tree-view-split-reg.c
@@ -2450,7 +2450,7 @@ gtv_sr_begin_edit (GncTreeViewSplitReg *view, Transaction *trans)
             //is a new transaction and set the time to current time to show current
             //date on new transactions
             time = gnc_time (NULL);
-            xaccTransSetDatePostedSecs (trans, time);
+            xaccTransSetDatePostedSecsNormalized (trans, time);
         }
     }
     LEAVE(" ");
diff --git a/libgnucash/engine/gncInvoice.c b/libgnucash/engine/gncInvoice.c
index 9ad48692c..a399e6580 100644
--- a/libgnucash/engine/gncInvoice.c
+++ b/libgnucash/engine/gncInvoice.c
@@ -1506,8 +1506,8 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
 
     /* Entered and Posted at date */
     xaccTransSetDateEnteredSecs (txn, gnc_time (NULL));
-    xaccTransSetDatePostedSecs (txn, post_date);
-    gncInvoiceSetDatePosted (invoice, post_date);
+    xaccTransSetDatePostedSecsNormalized (txn, post_date);
+    gncInvoiceSetDatePosted (invoice, xaccTransRetDatePosted(txn));
 
     xaccTransSetDateDue (txn, due_date);
 

commit 1e59819176dadee3f1e8e534ed51af37f04e5c55
Author: John Ralls <jralls at ceridwen.us>
Date:   Wed Apr 29 17:11:52 2020 -0700

    Respect the environment LD_LIBRARY_PATH for loading Scheme modules and tests.

diff --git a/common/cmake_modules/GncAddSchemeTargets.cmake b/common/cmake_modules/GncAddSchemeTargets.cmake
index 17336b0a2..be5525c54 100644
--- a/common/cmake_modules/GncAddSchemeTargets.cmake
+++ b/common/cmake_modules/GncAddSchemeTargets.cmake
@@ -121,10 +121,10 @@ function(gnc_add_scheme_targets _TARGET _SOURCE_FILES _OUTPUT_DIR _GUILE_DEPENDS
         file(TO_CMAKE_PATH "$ENV{PATH}" fpath)
         set(LIBRARY_PATH "PATH=${BINDIR_BUILD};${fpath}")
       else()
-        set (LIBRARY_PATH "LD_LIBRARY_PATH=${LIBDIR_BUILD}:${LIBDIR_BUILD}/gnucash")
+        set (LIBRARY_PATH "LD_LIBRARY_PATH=${LIBDIR_BUILD}:${LIBDIR_BUILD}/gnucash:$ENV{LD_LIBRARY_PATH}")
       endif()
       if (APPLE)
-        set (LIBRARY_PATH "DYLD_LIBRARY_PATH=${LIBDIR_BUILD}:${LIBDIR_BUILD}/gnucash")
+        set (LIBRARY_PATH "DYLD_LIBRARY_PATH=${LIBDIR_BUILD}:${LIBDIR_BUILD}/gnucash:$ENV{DYLD_LIBRARY_PATH}")
       endif()
       set(_GNC_MODULE_PATH "")
       if(MINGW64)
diff --git a/common/cmake_modules/GncAddTest.cmake b/common/cmake_modules/GncAddTest.cmake
index 3d510a4e8..b81d08cf2 100644
--- a/common/cmake_modules/GncAddTest.cmake
+++ b/common/cmake_modules/GncAddTest.cmake
@@ -9,10 +9,10 @@ function(get_guile_env)
   list(APPEND env "GNC_UNINSTALLED=yes")
   list(APPEND env "GNC_BUILDDIR=${CMAKE_BINARY_DIR}")
   if (APPLE)
-    list(APPEND env "DYLD_LIBRARY_PATH=${_GNC_MODULE_PATH}")
+    list(APPEND env "DYLD_LIBRARY_PATH=${_GNC_MODULE_PATH}:$ENV{LD_LIBRARY_PATH}")
   endif()
   if (UNIX)
-    list(APPEND env LD_LIBRARY_PATH=${_GNC_MODULE_PATH})
+    list(APPEND env "LD_LIBRARY_PATH=${_GNC_MODULE_PATH}:$ENV{DYLD_LIBRARY_PATH}")
   endif()
   if (MINGW64)
     set(fpath "")

commit 5cabbbc99855a2928c6396455e892b0857b36f59
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Tue Apr 28 00:58:57 2020 +0200

    Add a tip about announcements and other mailing lists

diff --git a/doc/tip_of_the_day.list.c b/doc/tip_of_the_day.list.c
index a69da038f..d775c0946 100644
--- a/doc/tip_of_the_day.list.c
+++ b/doc/tip_of_the_day.list.c
@@ -1,6 +1,11 @@
  N_( "The GnuCash online manual has lots of helpful information. \
 You can access the manual under the Help menu.")
 
+/* Translators: You can replace the link, if a transated page exists. */
+ N_( "Mailing lists are the preferred form of communication in the \
+GnuCash community. For announcements of new releases, user groups etc. \
+see the table at https://wiki.gnucash.org/wiki/Mailing_Lists")
+
  N_( "The GnuCash developers are easy to contact. As well \
 as several mailing lists, you can chat to them live on IRC! \
 Join them on #gnucash at irc.gnome.org")



Summary of changes:
 bindings/python/tests/test_business.py             |  13 ++-
 common/cmake_modules/GncAddSchemeTargets.cmake     |   4 +-
 common/cmake_modules/GncAddTest.cmake              |   4 +-
 doc/tip_of_the_day.list.c                          |   5 +
 gnucash/gnome-utils/dialog-transfer.c              |   2 +-
 gnucash/gnome-utils/gnc-tree-view-split-reg.c      |   2 +-
 gnucash/gnome/reconcile-view.c                     | 125 +--------------------
 gnucash/gtkbuilder/dialog-preferences.glade        |   5 +-
 .../import-export/csv-exp/assistant-csv-export.c   |   2 +
 gnucash/import-export/import-main-matcher.c        |  13 ++-
 libgnucash/engine/Account.cpp                      |   4 +
 libgnucash/engine/gnc-datetime.cpp                 |   2 +-
 libgnucash/engine/gncInvoice.c                     |   4 +-
 13 files changed, 44 insertions(+), 141 deletions(-)



More information about the gnucash-changes mailing list