gnucash master: Multiple changes pushed

Christopher Lam clam at code.gnucash.org
Sun May 10 07:24:09 EDT 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/8d64c011 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0b0e4c76 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f9dfdb3e (commit)
	 via  https://github.com/Gnucash/gnucash/commit/e92cd20d (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f7a85161 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/e84e6806 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/a143d59b (commit)
	 via  https://github.com/Gnucash/gnucash/commit/79286d92 (commit)
	from  https://github.com/Gnucash/gnucash/commit/f23e3b26 (commit)



commit 8d64c011c5931ec4e7f4efc8f7ac17a9d014ad3b
Merge: f9dfdb3e6 0b0e4c763
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sun May 10 17:04:39 2020 +0800

    Merge branch 'maint'

diff --cc gnucash/gnome-utils/gnc-gnome-utils.c
index 17ff06918,188da7d45..f92c90c79
--- a/gnucash/gnome-utils/gnc-gnome-utils.c
+++ b/gnucash/gnome-utils/gnc-gnome-utils.c
@@@ -65,20 -64,15 +65,27 @@@ static int gnome_is_initialized = FALSE
  
  #define ACCEL_MAP_NAME "accelerator-map"
  
+ const gchar *msg_no_help_found =
+     N_("GnuCash could not find the files of the help documentation.");
+ const gchar *msg_no_help_reason =
+     N_("This is likely because the \"gnucash-docs\" package is not properly installed.");
+     /* Translators: URI of missing help files */
+ const gchar *msg_no_help_location = N_("Expected location");
+ 
  static void gnc_book_options_help_cb (GNCOptionWin *win, gpointer dat);
  
 +void
 +gnc_gnome_utils_init (void)
 +{
 +    gnc_component_manager_init ();
 +    gnc_options_ui_initialize ();
 +
 +    scm_init_sw_gnome_utils_module();
 +    scm_c_use_module ("sw_gnome_utils");
 +    scm_c_use_module("gnucash gnome-utils");
 +}
 +
 +
  static void
  gnc_global_options_help_cb (GNCOptionWin *win, gpointer dat)
  {
diff --cc gnucash/gnome/gnc-budget-view.c
index 9f772d4b4,046efef3b..ad4d5aae3
--- a/gnucash/gnome/gnc-budget-view.c
+++ b/gnucash/gnome/gnc-budget-view.c
@@@ -494,21 -445,17 +494,21 @@@ gbv_create_widget (GncBudgetView *budge
                        G_CALLBACK(gbv_totals_scrollbar_value_changed_cb), budget_view);
  
      // Create totals tree view
 -    totals_tree_model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT);
 -    gtk_list_store_append(totals_tree_model, &iter);
 -    gtk_list_store_set(totals_tree_model, &iter, 0, _("Income"), 1, TOTALS_TYPE_INCOME, -1);
 -    gtk_list_store_append(totals_tree_model, &iter);
 -    gtk_list_store_set(totals_tree_model, &iter, 0, _("Expenses"), 1, TOTALS_TYPE_EXPENSES, -1);
 -    gtk_list_store_append(totals_tree_model, &iter);
 -    gtk_list_store_set(totals_tree_model, &iter, 0, _("Transfer"), 1, TOTALS_TYPE_ASSET_LIAB_EQ, -1);
 -    gtk_list_store_append(totals_tree_model, &iter);
 -    gtk_list_store_set(totals_tree_model, &iter, 0, _("Remaining to Budget"), 1, TOTALS_TYPE_REMAINDER, -1);
 -
 -    totals_tree_view = GTK_TREE_VIEW(gtk_tree_view_new());
 +    totals_tree_model = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING);
 +    gtk_list_store_append (totals_tree_model, &iter);
-     gtk_list_store_set (totals_tree_model, &iter, 0, _("Inflow from Income"),
++    gtk_list_store_set (totals_tree_model, &iter, 0, _("Income"),
 +                                                  1, TOTALS_TYPE_INCOME, 2, " ", 3, " ", -1);
 +    gtk_list_store_append (totals_tree_model, &iter);
-     gtk_list_store_set (totals_tree_model, &iter, 0, _("Outflow to Expenses"),
++    gtk_list_store_set (totals_tree_model, &iter, 0, _("Expenses"),
 +                                                  1, TOTALS_TYPE_EXPENSES, 2, " ", 3, " ", -1);
 +    gtk_list_store_append (totals_tree_model, &iter);
-     gtk_list_store_set (totals_tree_model, &iter, 0, _("Outflow to Asset/Equity/Liability"),
++    gtk_list_store_set (totals_tree_model, &iter, 0, _("Transfer"),
 +                                                  1, TOTALS_TYPE_ASSET_LIAB_EQ, 2, " ", 3, " ", -1);
 +    gtk_list_store_append (totals_tree_model, &iter);
 +    gtk_list_store_set (totals_tree_model, &iter, 0, _("Remaining to Budget"),
 +                                                  1, TOTALS_TYPE_REMAINDER, 2, " ", 3, " ", -1);
 +
 +    totals_tree_view = GTK_TREE_VIEW(gtk_tree_view_new ());
      priv->totals_tree_view = totals_tree_view;
      gtk_tree_selection_set_mode (gtk_tree_view_get_selection (totals_tree_view), GTK_SELECTION_NONE);
      gtk_tree_view_set_headers_visible (totals_tree_view, FALSE);
diff --cc gnucash/gnome/gnc-plugin-page-budget.c
index 814a83a33,90d7f20a1..b3cf45e0b
--- a/gnucash/gnome/gnc-plugin-page-budget.c
+++ b/gnucash/gnome/gnc-plugin-page-budget.c
@@@ -166,17 -160,12 +166,17 @@@ static GtkActionEntry gnc_plugin_page_b
          G_CALLBACK(gnc_plugin_page_budget_cmd_estimate_budget)
      },
      {
-         "AllPeriodsBudgetAction", "system-run", N_("All Periods"),
+         "AllPeriodsBudgetAction", "system-run", N_("_All Periods..."),
          NULL,
-         N_("Edit budget for all periods for the selected accounts"),
+         N_("Edit budget for all periods for the selected accounts."),
          G_CALLBACK(gnc_plugin_page_budget_cmd_allperiods_budget)
      },
 -
 +    {
 +        "BudgetNoteAction", "system-run", N_("Edit Note"),
 +        NULL,
 +        N_("Edit note for the selected account and period"),
 +        G_CALLBACK (gnc_plugin_page_budget_cmd_budget_note)
 +    },
      /* View menu */
      {
          "ViewFilterByAction", NULL, N_("_Filter By..."), NULL, NULL,

commit 0b0e4c7630f9a5a8202011fe5dc760eaed58dc28
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Sun May 10 03:41:05 2020 +0200

    HIG, I18N: Improve Budget menu entries

diff --git a/gnucash/gnome/gnc-plugin-budget.c b/gnucash/gnome/gnc-plugin-budget.c
index bdbd9b21e..6632a8d11 100644
--- a/gnucash/gnome/gnc-plugin-budget.c
+++ b/gnucash/gnome/gnc-plugin-budget.c
@@ -60,25 +60,25 @@ static void gnc_plugin_budget_cmd_delete_budget (GtkAction *action,
 static GtkActionEntry gnc_plugin_actions [] =
 {
     {
-        "NewBudgetAction", NULL, N_("New Budget"), NULL,
-        N_("Create a new Budget"),
+        "NewBudgetAction", NULL, N_("_New Budget"), NULL,
+        N_("Create a new Budget."),
         G_CALLBACK(gnc_plugin_budget_cmd_new_budget)
     },
 
     {
-        "OpenBudgetAction", NULL, N_("Open Budget"), NULL,
-        N_("Open an existing Budget"),
+        "OpenBudgetAction", NULL, N_("_Open Budget"), NULL,
+        N_("Open an existing Budget in a new tab. If none exists a new budget will be created."),
         G_CALLBACK(gnc_plugin_budget_cmd_open_budget)
     },
 
     {
-        "CopyBudgetAction", NULL, N_("Copy Budget"), NULL,
-        N_("Copy an existing Budget"),
+        "CopyBudgetAction", NULL, N_("_Copy Budget"), NULL,
+        N_("Copy an existing Budget."),
         G_CALLBACK(gnc_plugin_budget_cmd_copy_budget)
     },
     {
-        "DeleteBudgetAction", NULL, N_("Delete Budget"), NULL,
-        N_("Deletes an existing Budget"),
+        "DeleteBudgetAction", NULL, N_("_Delete Budget"), NULL,
+        N_("Delete an existing Budget."),
         G_CALLBACK(gnc_plugin_budget_cmd_delete_budget)
     },
 
diff --git a/gnucash/gnome/gnc-plugin-page-budget.c b/gnucash/gnome/gnc-plugin-page-budget.c
index cd845c23e..90d7f20a1 100644
--- a/gnucash/gnome/gnc-plugin-page-budget.c
+++ b/gnucash/gnome/gnc-plugin-page-budget.c
@@ -132,37 +132,37 @@ static GtkActionEntry gnc_plugin_page_budget_actions [] =
     /* File menu */
     {
         "OpenAccountAction", GNC_ICON_OPEN_ACCOUNT, N_("Open _Account"), NULL,
-        N_("Open the selected account"),
+        N_("Open the selected account."),
         G_CALLBACK(gnc_plugin_page_budget_cmd_open_account)
     },
     {
         "OpenSubaccountsAction", GNC_ICON_OPEN_ACCOUNT,
         N_("Open _Subaccounts"), NULL,
-        N_("Open the selected account and all its subaccounts"),
+        N_("Open the selected account and all its subaccounts."),
         G_CALLBACK(gnc_plugin_page_budget_cmd_open_subaccounts)
     },
 
     /* Edit menu */
     {
         "DeleteBudgetAction", GNC_ICON_DELETE_BUDGET, N_("_Delete Budget"),
-        NULL, N_("Delete this budget"),
+        NULL, N_("Delete this budget."),
         G_CALLBACK(gnc_plugin_page_budget_cmd_delete_budget)
     },
     {
-        "OptionsBudgetAction", "document-properties", N_("Budget Options"),
-        NULL, N_("Edit this budget's options"),
+        "OptionsBudgetAction", "document-properties", N_("Budget _Options..."),
+        NULL, N_("Edit this budget's options."),
         G_CALLBACK(gnc_plugin_page_budget_cmd_view_options)
     },
     {
-        "EstimateBudgetAction", "system-run", N_("Estimate Budget"),
+        "EstimateBudgetAction", "system-run", N_("Esti_mate Budget..."),
         NULL,
-        N_("Estimate a budget value for the selected accounts from past transactions"),
+        N_("Estimate a budget value for the selected accounts from past transactions."),
         G_CALLBACK(gnc_plugin_page_budget_cmd_estimate_budget)
     },
     {
-        "AllPeriodsBudgetAction", "system-run", N_("All Periods"),
+        "AllPeriodsBudgetAction", "system-run", N_("_All Periods..."),
         NULL,
-        N_("Edit budget for all periods for the selected accounts"),
+        N_("Edit budget for all periods for the selected accounts."),
         G_CALLBACK(gnc_plugin_page_budget_cmd_allperiods_budget)
     },
 
@@ -173,7 +173,7 @@ static GtkActionEntry gnc_plugin_page_budget_actions [] =
     },
     {
         "ViewRefreshAction", "view-refresh", N_("_Refresh"), "<primary>r",
-        N_("Refresh this window"),
+        N_("Refresh this window."),
         G_CALLBACK(gnc_plugin_page_budget_cmd_refresh)
     },
 

commit f9dfdb3e6c9b39982bddd7ff747a21597f41271b
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sat May 9 23:17:11 2020 +0800

    [c-interface] compact code, use (ice-9 match)

diff --git a/libgnucash/app-utils/c-interface.scm b/libgnucash/app-utils/c-interface.scm
index 7e16d892b..45d7f2e72 100644
--- a/libgnucash/app-utils/c-interface.scm
+++ b/libgnucash/app-utils/c-interface.scm
@@ -15,6 +15,8 @@
 ;; 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652
 ;; Boston, MA  02110-1301,  USA       gnu at gnu.org
 
+(use-modules (ice-9 match))
+
 (define (gnc:call-with-error-handling cmd args)
   (let ((captured-stack #f)
         (captured-error #f)
@@ -61,17 +63,13 @@
   (gnc:call-with-error-handling func args))
 
 (define (gnc:backtrace-if-exception proc . args)
-  (let* ((apply-result (gnc:apply-with-error-handling proc args))
-         (result (car apply-result))
-         (captured-error (cadr apply-result)))
-    (cond
-     (captured-error
-      (display captured-error (current-error-port))
-      (set! gnc:last-captured-error (gnc:html-string-sanitize captured-error))
-      (when (defined? 'gnc:warn)
-        (gnc:warn captured-error))
-      #f)
-     (else result))))
+  (match (gnc:apply-with-error-handling proc args)
+    ((result #f) result)
+    ((_ captured-error)
+     (display captured-error (current-error-port))
+     (set! gnc:last-captured-error (gnc:html-string-sanitize captured-error))
+     (when (defined? 'gnc:warn) (gnc:warn captured-error))
+     #f)))
 
 (define-public gnc:last-captured-error "")
 
@@ -80,16 +78,8 @@
 ;; translated with gettext.
 (define (gnc:make-string-database)
   (define string-hash (make-hash-table))
-  (define (lookup key)
-    (_ (hash-ref string-hash key)))
-  (define (store key string)
-    (hash-set! string-hash key string))
-  (define (dispatch message . args)
-    (let ((func (case message
-                  ((lookup) lookup)
-                  ((store) store)
-                  (else #f))))
-      (if func
-          (apply func args)
-          (gnc:warn "string-database: bad message" message "\n"))))
-  dispatch)
+  (lambda args
+    (match args
+      (('lookup key) (_ (hash-ref string-hash key)))
+      (('store key string) (hash-set! string-hash key string))
+      (_ (gnc:warn "string-database: bad action")))))

commit e92cd20d78cc84d5c8b2963aebd0c8006a31b292
Merge: f7a85161c a143d59b7
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat May 9 15:41:06 2020 -0700

    Merge Jean Laroches '797737_match_previously_matched_trans' into maint.


commit f7a85161cdbc7700317c0731ffb4aa373d0efd2c
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Sat May 9 23:47:43 2020 +0200

    I18N: fix translator comments in window-reconcile.c

diff --git a/gnucash/gnome/window-reconcile.c b/gnucash/gnome/window-reconcile.c
index e01a0987e..d5085afa7 100644
--- a/gnucash/gnome/window-reconcile.c
+++ b/gnucash/gnome/window-reconcile.c
@@ -370,17 +370,15 @@ gnc_start_recn_date_changed (GtkWidget *widget, startRecnWindowData *data)
 
     if (days_after_today > 0)
     {
-        /* Translators: This is a ngettext(3) message, %d is the
-           number of days in the future */
         gchar *str = g_strdup_printf
+            /* Translators: %d is the number of days in the future */
             (ngettext ("Statement Date is %d day after today.",
                        "Statement Date is %d days after today.",
                        days_after_today),
              days_after_today);
 
-        /* Translators: This is a ngettext(3) message, %d is the
-           number of days in the future */
         gchar *tip_start = g_strdup_printf
+            /* Translators: %d is the number of days in the future */
             (ngettext ("The statement date you have chosen is %d day in the future.",
                        "The statement date you have chosen is %d days in the future.",
                        days_after_today),

commit e84e680603b225cb52be6981840b80291ef8352b
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Sat May 9 01:51:05 2020 +0200

    I18N: Fix several issuse with 'Help not found' strings
    
    Unify and modularize the strings
    Add an unmarked string

diff --git a/gnucash/gnome-utils/gnc-gnome-utils.c b/gnucash/gnome-utils/gnc-gnome-utils.c
index b9066ab35..188da7d45 100644
--- a/gnucash/gnome-utils/gnc-gnome-utils.c
+++ b/gnucash/gnome-utils/gnc-gnome-utils.c
@@ -64,6 +64,13 @@ static int gnome_is_initialized = FALSE;
 
 #define ACCEL_MAP_NAME "accelerator-map"
 
+const gchar *msg_no_help_found =
+    N_("GnuCash could not find the files of the help documentation.");
+const gchar *msg_no_help_reason =
+    N_("This is likely because the \"gnucash-docs\" package is not properly installed.");
+    /* Translators: URI of missing help files */
+const gchar *msg_no_help_location = N_("Expected location");
+
 static void gnc_book_options_help_cb (GNCOptionWin *win, gpointer dat);
 
 static void
@@ -280,10 +287,9 @@ gnc_gnome_help (const char *dir, const char *detail)
                   componentsJoinedByString: @"-"];
         if (![[NSFileManager defaultManager] fileExistsAtPath: docs_dir])
         {
-            const gchar *message =
-                _("GnuCash could not find the files for the help documentation. "
-                  "This is likely because the 'gnucash-docs' package is not installed");
-            gnc_error_dialog(NULL, "%s at %s", message, [docs_dir UTF8String]);
+            gnc_error_dialog(NULL, "%s\n%s\n%s: %s", _(msg_no_help_found),
+                             _(msg_no_help_reason),
+                             _(msg_no_help_location), [docs_dir UTF8String]);
             [pool release];
             return;
         }
@@ -373,10 +379,7 @@ gnc_gnome_help (const char *dir, const char *detail)
         [[NSWorkspace sharedWorkspace] openURL: url];
     else
     {
-        const gchar *message =
-            _("GnuCash could not find the files for the help documentation. "
-              "This is likely because the 'gnucash-docs' package is not installed.");
-        gnc_error_dialog(NULL, "%s", message);
+       gnc_error_dialog(NULL, "%s\n%s", _(msg_no_help_found), _(msg_no_help_reason));
     }
     [pool release];
 }
@@ -404,9 +407,7 @@ gnc_gnome_help (const char *file_name, const char *anchor)
 
     if (!found)
     {
-        const gchar *message =
-            _("GnuCash could not find the files for the help documentation.");
-        gnc_error_dialog (NULL, message);
+        gnc_error_dialog (NULL, "%s\n%s", _(msg_no_help_found), _(msg_no_help_reason));
     }
     else
     {
@@ -439,10 +440,7 @@ gnc_gnome_help (const char *file_name, const char *anchor)
 
     g_assert(error != NULL);
     {
-        const gchar *message =
-            _("GnuCash could not find the files for the help documentation. "
-              "This is likely because the 'gnucash-docs' package is not installed.");
-        gnc_error_dialog(NULL, "%s", message);
+        gnc_error_dialog(NULL, "%s\n%s", _(msg_no_help_found), _(msg_no_help_reason));
     }
     PERR ("%s", error->message);
     g_error_free(error);
@@ -505,7 +503,7 @@ gnc_launch_assoc (GtkWindow *parent, const char *uri)
                        NULL, NULL, SW_SHOWNORMAL) <= 32)
         {
             const gchar *message =
-            _("GnuCash could not find the associated file");
+            _("GnuCash could not find the associated file.");
             gnc_error_dialog(parent, "%s:\n%s", message, filename);
         }
         g_free (wincmd);

commit a143d59b7c9984d532c4db15c0f7438cb18dd3ac
Author: jean <you at example.com>
Date:   Fri May 8 08:44:23 2020 -0700

    Bug 797737 - Import matching can match an imported transaction to an existing, previously matched transaction
    
    A simple fix that skips transactions that have an online_id in the matching process.
    This fixes the issue, and also speeds up the import.

diff --git a/gnucash/import-export/import-backend.c b/gnucash/import-export/import-backend.c
index 888b913b2..747cf29cd 100644
--- a/gnucash/import-export/import-backend.c
+++ b/gnucash/import-export/import-backend.c
@@ -627,6 +627,10 @@ static void split_find_match (GNCImportTransInfo * trans_info,
         Transaction *new_trans = gnc_import_TransInfo_get_trans (trans_info);
         Split *new_trans_fsplit = gnc_import_TransInfo_get_fsplit (trans_info);
 
+        // Do not consider transactions that have been previously matched.
+        if (gnc_import_split_has_online_id (split))
+            return;
+
         /* Matching heuristics */
 
         /* Amount heuristics */

commit 79286d92d570135d7697eb3a65cbe725a9a8b449
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sat May 2 11:11:21 2020 +0800

    Bug 797659 - Liabilities in budget report no longer calculate correctly
    
    Restores budget-3.7 behaviour for current budgets.
    Fixes future budget behaviour.
    Restore budget-3.7 headings "Income/Expense/Transfer"
    Renamed budget-3.7 heading Total to "Remaining"

diff --git a/gnucash/gnome/gnc-budget-view.c b/gnucash/gnome/gnc-budget-view.c
index 7b44c294a..046efef3b 100644
--- a/gnucash/gnome/gnc-budget-view.c
+++ b/gnucash/gnome/gnc-budget-view.c
@@ -447,11 +447,11 @@ gbv_create_widget (GncBudgetView *budget_view)
     // Create totals tree view
     totals_tree_model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT);
     gtk_list_store_append(totals_tree_model, &iter);
-    gtk_list_store_set(totals_tree_model, &iter, 0, _("Inflow from Income"), 1, TOTALS_TYPE_INCOME, -1);
+    gtk_list_store_set(totals_tree_model, &iter, 0, _("Income"), 1, TOTALS_TYPE_INCOME, -1);
     gtk_list_store_append(totals_tree_model, &iter);
-    gtk_list_store_set(totals_tree_model, &iter, 0, _("Outflow to Expenses"), 1, TOTALS_TYPE_EXPENSES, -1);
+    gtk_list_store_set(totals_tree_model, &iter, 0, _("Expenses"), 1, TOTALS_TYPE_EXPENSES, -1);
     gtk_list_store_append(totals_tree_model, &iter);
-    gtk_list_store_set(totals_tree_model, &iter, 0, _("Outflow to Asset/Equity/Liability"), 1, TOTALS_TYPE_ASSET_LIAB_EQ, -1);
+    gtk_list_store_set(totals_tree_model, &iter, 0, _("Transfer"), 1, TOTALS_TYPE_ASSET_LIAB_EQ, -1);
     gtk_list_store_append(totals_tree_model, &iter);
     gtk_list_store_set(totals_tree_model, &iter, 0, _("Remaining to Budget"), 1, TOTALS_TYPE_REMAINDER, -1);
 
@@ -1202,11 +1202,11 @@ totals_col_source (GtkTreeViewColumn *col, GtkCellRenderer *cell,
             switch (row_type)
             {
                 case TOTALS_TYPE_ASSET_LIAB_EQ:
-                    if ((acctype == ACCT_TYPE_LIABILITY) ||
-                        (acctype == ACCT_TYPE_EQUITY))
-                        neg = !neg;
-                    else if (acctype != ACCT_TYPE_ASSET)
+                    if ((acctype != ACCT_TYPE_ASSET) &&
+                        (acctype != ACCT_TYPE_LIABILITY) &&
+                        (acctype != ACCT_TYPE_EQUITY))
                         continue;
+                    neg = !neg;
                     break;
                 case TOTALS_TYPE_EXPENSES:
                     if (acctype != ACCT_TYPE_EXPENSE)
@@ -1218,10 +1218,7 @@ totals_col_source (GtkTreeViewColumn *col, GtkCellRenderer *cell,
                     neg = !neg;
                     break;
                 case TOTALS_TYPE_REMAINDER:
-                    if ((acctype == ACCT_TYPE_ASSET) ||
-                        (acctype == ACCT_TYPE_INCOME) ||
-                        (acctype == ACCT_TYPE_EXPENSE))
-                        neg = !neg;
+                    neg = !neg;
                     break;
                 default:
                     continue;       /* don't count if unexpected total row type is passed in... */
@@ -1239,6 +1236,7 @@ totals_col_source (GtkTreeViewColumn *col, GtkCellRenderer *cell,
                         (acctype != ACCT_TYPE_LIABILITY) &&
                         (acctype != ACCT_TYPE_EQUITY))
                         continue;
+                    neg = (acctype == ACCT_TYPE_ASSET);
                     break;
                 case TOTALS_TYPE_EXPENSES:
                     if (acctype != ACCT_TYPE_EXPENSE)
@@ -1249,7 +1247,8 @@ totals_col_source (GtkTreeViewColumn *col, GtkCellRenderer *cell,
                         continue;
                     break;
                 case TOTALS_TYPE_REMAINDER:
-                    neg = (acctype != ACCT_TYPE_INCOME);
+                    neg = ((acctype == ACCT_TYPE_ASSET) ||
+                           (acctype == ACCT_TYPE_EXPENSE));
                     break;
                 default:
                     continue;       /* don't count if unexpected total row type is passed in... */



Summary of changes:
 gnucash/gnome-utils/gnc-gnome-utils.c  | 30 +++++++++++++--------------
 gnucash/gnome/gnc-budget-view.c        | 23 ++++++++++----------
 gnucash/gnome/gnc-plugin-budget.c      | 16 +++++++-------
 gnucash/gnome/gnc-plugin-page-budget.c | 20 +++++++++---------
 gnucash/gnome/window-reconcile.c       |  6 ++----
 gnucash/import-export/import-backend.c |  4 ++++
 libgnucash/app-utils/c-interface.scm   | 38 +++++++++++++---------------------
 7 files changed, 63 insertions(+), 74 deletions(-)



More information about the gnucash-changes mailing list