gnucash master: Multiple changes pushed
Christopher Lam
clam at code.gnucash.org
Thu Oct 14 06:28:38 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/9eaa3eb2 (commit)
via https://github.com/Gnucash/gnucash/commit/003b0a5d (commit)
via https://github.com/Gnucash/gnucash/commit/ca163664 (commit)
via https://github.com/Gnucash/gnucash/commit/39060d8b (commit)
via https://github.com/Gnucash/gnucash/commit/62368a45 (commit)
via https://github.com/Gnucash/gnucash/commit/b4a0b4f0 (commit)
via https://github.com/Gnucash/gnucash/commit/76378011 (commit)
via https://github.com/Gnucash/gnucash/commit/ff0c02db (commit)
via https://github.com/Gnucash/gnucash/commit/1354698b (commit)
via https://github.com/Gnucash/gnucash/commit/203432c4 (commit)
via https://github.com/Gnucash/gnucash/commit/2ace810e (commit)
via https://github.com/Gnucash/gnucash/commit/8940d9d8 (commit)
via https://github.com/Gnucash/gnucash/commit/1b0bfa5d (commit)
via https://github.com/Gnucash/gnucash/commit/81b48ee8 (commit)
via https://github.com/Gnucash/gnucash/commit/c2a44935 (commit)
via https://github.com/Gnucash/gnucash/commit/e5e46fa5 (commit)
via https://github.com/Gnucash/gnucash/commit/651f33e9 (commit)
via https://github.com/Gnucash/gnucash/commit/bda7d50b (commit)
via https://github.com/Gnucash/gnucash/commit/59bd247d (commit)
via https://github.com/Gnucash/gnucash/commit/23d964a6 (commit)
via https://github.com/Gnucash/gnucash/commit/0bce6a1d (commit)
via https://github.com/Gnucash/gnucash/commit/3ff5bd82 (commit)
via https://github.com/Gnucash/gnucash/commit/f4941a5b (commit)
via https://github.com/Gnucash/gnucash/commit/e5027f91 (commit)
via https://github.com/Gnucash/gnucash/commit/7692027b (commit)
via https://github.com/Gnucash/gnucash/commit/7c9c2eba (commit)
via https://github.com/Gnucash/gnucash/commit/be75a433 (commit)
via https://github.com/Gnucash/gnucash/commit/c321eae7 (commit)
via https://github.com/Gnucash/gnucash/commit/4c5b3658 (commit)
via https://github.com/Gnucash/gnucash/commit/50fb1839 (commit)
via https://github.com/Gnucash/gnucash/commit/6f33e8b1 (commit)
via https://github.com/Gnucash/gnucash/commit/ad7bffaa (commit)
via https://github.com/Gnucash/gnucash/commit/34a4b652 (commit)
via https://github.com/Gnucash/gnucash/commit/7b9ad513 (commit)
via https://github.com/Gnucash/gnucash/commit/3f501bb3 (commit)
via https://github.com/Gnucash/gnucash/commit/8b82970c (commit)
via https://github.com/Gnucash/gnucash/commit/d0d4d95e (commit)
from https://github.com/Gnucash/gnucash/commit/d9f918f4 (commit)
commit 9eaa3eb23ab76dbb7ae906c640751247fd125fdf
Merge: d9f918f40 003b0a5de
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Thu Oct 14 09:34:28 2021 +0800
Merge branch 'maint'
diff --cc bindings/guile/test/CMakeLists.txt
index ee9dfb9b7,ee48e6f49..c6fa65a74
--- a/bindings/guile/test/CMakeLists.txt
+++ b/bindings/guile/test/CMakeLists.txt
@@@ -41,10 -41,18 +40,12 @@@ gnc_add_scheme_test_targets(scm-test-en
OUTPUT_DIR "tests"
DEPENDS "${GUILE_DEPENDS}")
-# Module interfaces deprecated in 4.x, will be removed for 5.x
-gnc_add_scheme_deprecated_module (
- OLD_MODULE "gnucash engine test test-extras"
- NEW_MODULE "tests test-engine-extras"
- DEPENDS "scm-test-engine-extras")
-
gnc_add_scheme_test_targets(scm-test-engine
- SOURCES "${bindings_test_SCHEME}"
- OUTPUT_DIR "tests"
- DEPENDS "${GUILE_DEPENDS};scm-test-engine-extras")
+ SOURCES "${bindings_test_SCHEME}"
+ OUTPUT_DIR "tests"
+ DEPENDS "${GUILE_DEPENDS};scm-test-engine-extras")
+
+ gnc_add_scheme_tests("${bindings_test_SCHEME}")
add_dependencies(check scm-test-engine)
gnc_add_scheme_tests("${engine_test_SCHEME}")
commit 003b0a5deb5a1776bdc2e7781a0b9dd4a0185c4a
Merge: 763780114 ca1636643
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Wed Oct 13 20:25:26 2021 +0800
Merge branch 'maint-leaks2' into maint #1166
commit ca1636643a8ae649c092a5c9aaf92882b472d9ee
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Wed Oct 13 07:13:12 2021 +0800
[dialog-custom-report] don't allocate GValue
receive GncGUID* directly from GtkTreeModel
diff --git a/gnucash/gnome/dialog-custom-report.c b/gnucash/gnome/dialog-custom-report.c
index 67d80f78a..4ca9937bf 100644
--- a/gnucash/gnome/dialog-custom-report.c
+++ b/gnucash/gnome/dialog-custom-report.c
@@ -640,10 +640,8 @@ gnc_ui_custom_report_edit_name (GncMainWindow * window, SCM scm_guid)
while (valid_iter)
{
- GValue value = { 0, };
GncGUID *row_guid;
- gtk_tree_model_get_value (model, &iter, COL_NUM, &value);
- row_guid = (GncGUID *) g_value_get_pointer (&value);
+ gtk_tree_model_get (model, &iter, COL_NUM, &row_guid, -1);
if (guid_equal (guid, row_guid))
{
@@ -663,7 +661,6 @@ gnc_ui_custom_report_edit_name (GncMainWindow * window, SCM scm_guid)
break;
}
- g_value_unset (&value);
valid_iter = gtk_tree_model_iter_next (model, &iter);
}
commit 39060d8bde26402c0bee1f41fad3933cdaecf041
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Wed Oct 13 06:33:08 2021 +0800
[dialog-custom-report] plug leaks when destroying dialog
diff --git a/gnucash/gnome/dialog-custom-report.c b/gnucash/gnome/dialog-custom-report.c
index 98a9f0834..67d80f78a 100644
--- a/gnucash/gnome/dialog-custom-report.c
+++ b/gnucash/gnome/dialog-custom-report.c
@@ -80,6 +80,7 @@ typedef struct _CustomReportDialog
} CustomReportDialog;
+void custom_report_dialog_destroy_cb (GtkWidget* widget, gpointer data);
void custom_report_dialog_close_cb(GtkWidget* widget, gpointer data);
void custom_report_help_cb(GtkWidget* widget, gpointer data);
void close_custom_report_clicked_cb(GtkWidget* widget, gpointer data);
@@ -95,8 +96,8 @@ gboolean custom_report_query_tooltip_cb (GtkTreeView *view,
gpointer data);
static gboolean
-tree_model_free_guid (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter,
- gpointer data)
+tree_model_free (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter,
+ gpointer data)
{
GncGUID *guid;
gtk_tree_model_get (model, iter, COL_NUM, &guid, -1);
@@ -107,9 +108,16 @@ tree_model_free_guid (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter,
static void
empty_tree_model (GtkTreeModel *model)
{
- gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc)tree_model_free_guid,
- NULL);
- gtk_list_store_clear (GTK_LIST_STORE (model));
+ gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc)tree_model_free, NULL);
+ gtk_list_store_clear (GTK_LIST_STORE (model));
+}
+
+void
+custom_report_dialog_destroy_cb (GtkWidget* widget, gpointer data)
+{
+ CustomReportDialog *crd = data;
+ empty_tree_model (gtk_tree_view_get_model (GTK_TREE_VIEW(crd->reportview)));
+ g_free (crd);
}
void
@@ -119,7 +127,6 @@ custom_report_dialog_close_cb(GtkWidget* widget, gpointer data)
gnc_save_window_size(GNC_PREFS_GROUP_REPORT_SAVED_CONFIGS, GTK_WINDOW(crd->dialog));
gtk_widget_destroy(crd->dialog);
- g_free(crd);
}
void
@@ -508,6 +515,19 @@ custom_report_query_tooltip_cb (GtkTreeView *view,
return FALSE;
}
+static gboolean
+custom_report_event_cb (GtkWidget *widget, GdkEventKey *event,
+ gpointer user_data)
+{
+ if (event->keyval == GDK_KEY_Escape)
+ {
+ custom_report_dialog_close_cb (widget, user_data);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
/* Internal function that builds the dialog */
static CustomReportDialog *
gnc_ui_custom_report_internal(GncMainWindow * window)
@@ -553,6 +573,10 @@ gnc_ui_custom_report_internal(GncMainWindow * window)
gtk_widget_show_all(crd->dialog);
+ // Use this event to capture the escape key being pressed
+ g_signal_connect (crd->dialog, "key_press_event",
+ G_CALLBACK(custom_report_event_cb), crd);
+
/* check if there are currently saved reports available
* by checking if there is a first element */
model = gtk_tree_view_get_model (GTK_TREE_VIEW (crd->reportview));
diff --git a/gnucash/gtkbuilder/dialog-custom-report.glade b/gnucash/gtkbuilder/dialog-custom-report.glade
index a2e1bdb69..08c117742 100644
--- a/gnucash/gtkbuilder/dialog-custom-report.glade
+++ b/gnucash/gtkbuilder/dialog-custom-report.glade
@@ -11,6 +11,7 @@
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
<property name="skip_pager_hint">True</property>
+ <signal name="destroy" handler="custom_report_dialog_destroy_cb" swapped="no"/>
<signal name="close" handler="custom_report_dialog_close_cb" swapped="no"/>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
commit 62368a45dcf80bfaf6273406dfaed902200e18bd
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Wed Oct 13 06:32:37 2021 +0800
[dialog-custom-report] refactor empty_tree_model into static fn
to be reused by next commit
diff --git a/gnucash/gnome/dialog-custom-report.c b/gnucash/gnome/dialog-custom-report.c
index 386189dcc..98a9f0834 100644
--- a/gnucash/gnome/dialog-custom-report.c
+++ b/gnucash/gnome/dialog-custom-report.c
@@ -94,6 +94,24 @@ gboolean custom_report_query_tooltip_cb (GtkTreeView *view,
GtkTooltip *tooltip,
gpointer data);
+static gboolean
+tree_model_free_guid (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter,
+ gpointer data)
+{
+ GncGUID *guid;
+ gtk_tree_model_get (model, iter, COL_NUM, &guid, -1);
+ guid_free (guid);
+ return FALSE;
+}
+
+static void
+empty_tree_model (GtkTreeModel *model)
+{
+ gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc)tree_model_free_guid,
+ NULL);
+ gtk_list_store_clear (GTK_LIST_STORE (model));
+}
+
void
custom_report_dialog_close_cb(GtkWidget* widget, gpointer data)
{
@@ -133,26 +151,13 @@ update_report_list(GtkListStore *store, CustomReportDialog *crd)
int i;
GtkTreeIter iter;
GtkTreeModel *model = GTK_TREE_MODEL (store);
- gboolean valid_iter;
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store), COL_NAME, GTK_SORT_ASCENDING);
crd->reportlist = scm_call_0(get_rpt_guids);
rpt_guids = crd->reportlist;
- /* Empty current liststore */
- valid_iter = gtk_tree_model_get_iter_first (model, &iter);
- while (valid_iter)
- {
- GValue value = { 0, };
- GncGUID *row_guid;
- gtk_tree_model_get_value (model, &iter, COL_NUM, &value);
- row_guid = (GncGUID *) g_value_get_pointer (&value);
- guid_free (row_guid);
- g_value_unset (&value);
- valid_iter = gtk_tree_model_iter_next (model, &iter);
- }
- gtk_list_store_clear(store);
+ empty_tree_model (model);
if (scm_is_list(rpt_guids))
{
commit b4a0b4f09856da1127935af8226a31483476ad20
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Oct 12 22:10:45 2021 +0800
[dialog-custom-report] plug leaks
- g_free gchar*,
- guid_free GncGUID,
- gtk_tree_path_free a GtkTreePath
- don't guid_malloc a guid which will be overwritten
diff --git a/gnucash/gnome/dialog-custom-report.c b/gnucash/gnome/dialog-custom-report.c
index 4badfe983..386189dcc 100644
--- a/gnucash/gnome/dialog-custom-report.c
+++ b/gnucash/gnome/dialog-custom-report.c
@@ -343,25 +343,24 @@ get_custom_report_selection(CustomReportDialog *crd,
GtkTreeSelection *sel;
GtkTreeModel *model;
GtkTreeIter iter;
- GncGUID *guid = guid_malloc ();
+ GncGUID *guid;
gchar *guid_str;
+ SCM scm_guid;
sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(crd->reportview));
- if (gtk_tree_selection_get_selected(sel, &model, &iter))
- {
- gtk_tree_model_get(model, &iter, COL_NUM, &guid, -1);
- guid_str = g_new0 (gchar, GUID_ENCODING_LENGTH+1 );
- guid_to_string_buff (guid, guid_str);
- }
- else
+ if (!gtk_tree_selection_get_selected(sel, &model, &iter))
{
/* no selection, notify user */
gnc_error_dialog (GTK_WINDOW (crd->dialog), "%s", message);
return SCM_EOL;
-
}
- return scm_from_utf8_string (guid_str);
+
+ gtk_tree_model_get (model, &iter, COL_NUM, &guid, -1);
+ guid_str = guid_to_string (guid);
+ scm_guid = scm_from_utf8_string (guid_str);
+ g_free (guid_str);
+ return scm_guid;
}
/**************************************************************
@@ -385,7 +384,7 @@ custom_report_list_view_row_activated_cb(GtkTreeView *view, GtkTreePath *path,
{
if (column == crd->namecol)
{
- GncGUID *guid = guid_malloc ();
+ GncGUID *guid;
gchar *guid_str;
gtk_tree_model_get(model, &iter, COL_NUM, &guid, -1);
@@ -393,6 +392,7 @@ custom_report_list_view_row_activated_cb(GtkTreeView *view, GtkTreePath *path,
guid_to_string_buff (guid, guid_str);
custom_report_run_report(scm_from_utf8_string (guid_str), crd);
+ g_free (guid_str);
}
}
}
@@ -630,6 +630,7 @@ gnc_ui_custom_report_edit_name (GncMainWindow * window, SCM scm_guid)
gtk_tree_view_set_cursor_on_cell (GTK_TREE_VIEW (crd->reportview),
path, crd->namecol,
crd->namerenderer, TRUE);
+ gtk_tree_path_free (path);
break;
}
@@ -639,4 +640,5 @@ gnc_ui_custom_report_edit_name (GncMainWindow * window, SCM scm_guid)
cleanup:
guid_free (guid);
+ g_free (guid_str);
}
commit 763780114a5920ac7b6dab64ced227a9fd0136e1
Merge: 1354698b2 ff0c02dba
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Wed Oct 13 09:08:51 2021 +0800
Merge branch 'price_and_reconcile' into maint #1165
commit ff0c02dba5cc9e91389c09a1cb88b207098f8bd6
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Oct 12 18:22:49 2021 +0800
[reconcile-view][bug] dr/cr query tests amount instead of value
Because split->amount and split->value are generally of equal sign,
EXCEPT in stock transactions whereby split->value can be zero and
split->amount is non-zero. e.g. a stock split transaction.
Querying the split amount instead will allow stock accounts with
stock splits to be reconciled.
diff --git a/gnucash/gnome/reconcile-view.c b/gnucash/gnome/reconcile-view.c
index 489ff7a2b..289ca2f8d 100644
--- a/gnucash/gnome/reconcile-view.c
+++ b/gnucash/gnome/reconcile-view.c
@@ -313,6 +313,7 @@ gnc_reconcile_view_new (Account *account, GNCReconcileViewType type,
GList *accounts = NULL;
GList *splits;
Query *query;
+ QofNumericMatch sign;
g_return_val_if_fail (account, NULL);
g_return_val_if_fail ((type == RECLIST_DEBIT) ||
@@ -345,15 +346,11 @@ gnc_reconcile_view_new (Account *account, GNCReconcileViewType type,
g_list_free (accounts);
- /* limit the matches to CREDITs and DEBITs only, depending on the type */
- if (type == RECLIST_CREDIT)
- xaccQueryAddValueMatch(query, gnc_numeric_zero (),
- QOF_NUMERIC_MATCH_CREDIT,
- QOF_COMPARE_GTE, QOF_QUERY_AND);
- else
- xaccQueryAddValueMatch(query, gnc_numeric_zero (),
- QOF_NUMERIC_MATCH_DEBIT,
- QOF_COMPARE_GTE, QOF_QUERY_AND);
+ sign = (type == RECLIST_CREDIT) ?
+ QOF_NUMERIC_MATCH_CREDIT : QOF_NUMERIC_MATCH_DEBIT;
+
+ xaccQueryAddNumericMatch (query, gnc_numeric_zero (), sign, QOF_COMPARE_GTE,
+ QOF_QUERY_AND, SPLIT_AMOUNT, NULL);
/* limit the matches only to Cleared and Non-reconciled splits */
xaccQueryAddClearedMatch (query, CLEARED_NO | CLEARED_CLEARED, QOF_QUERY_AND);
commit 1354698b25fdbfe6883790be1bd26cb64645a704
Merge: c2a449356 81b48ee88
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Oct 12 11:09:10 2021 -0700
Merge Jean Laroche's '798327_ofx_import_terminates_too_early' into maint.
commit 203432c436d504ac86e2b392b39df7aa3aa11eae
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Oct 12 04:14:10 2021 +0800
[split-register-model.c] Hide price==1 for zero-amount splits
mainly of interest in zero-amount zero-value splits in the stock
register eg dividend splits.
diff --git a/gnucash/register/ledger-core/split-register-model.c b/gnucash/register/ledger-core/split-register-model.c
index c2146d4a7..c5f955a0a 100644
--- a/gnucash/register/ledger-core/split-register-model.c
+++ b/gnucash/register/ledger-core/split-register-model.c
@@ -1389,11 +1389,12 @@ gnc_split_register_get_price_entry (VirtualLocation virt_loc,
split = gnc_split_register_get_split (reg, virt_loc.vcell_loc);
- price = xaccSplitGetSharePrice (split);
- curr = xaccTransGetCurrency (xaccSplitGetParent (split));
- if (gnc_numeric_zero_p (price))
+ if (gnc_numeric_zero_p (xaccSplitGetAmount(split)) ||
+ gnc_numeric_zero_p (xaccSplitGetValue(split)))
return NULL;
+ price = xaccSplitGetSharePrice (split);
+ curr = xaccTransGetCurrency (xaccSplitGetParent (split));
return xaccPrintAmount (price, gnc_default_price_print_info (curr));
}
commit 2ace810e055249f5046c9226058d019abf9b4d5d
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Oct 12 04:14:55 2021 +0800
[split-register-model.c] more efficient acct->full_names constructor
don't repeatedly allocate
diff --git a/gnucash/register/ledger-core/split-register-model.c b/gnucash/register/ledger-core/split-register-model.c
index 04b211348..c2146d4a7 100644
--- a/gnucash/register/ledger-core/split-register-model.c
+++ b/gnucash/register/ledger-core/split-register-model.c
@@ -32,6 +32,7 @@
#include "gnc-prefs.h"
#include "gnc-ui.h"
#include "gnc-uri-utils.h"
+#include "gnc-glib-utils.h"
#include "gnc-filepath-utils.h"
#include "gnc-warnings.h"
#include "doclinkcell.h"
@@ -2191,37 +2192,27 @@ gnc_split_register_confirm (VirtualLocation virt_loc, gpointer user_data)
if (protected_trans_cell)
{
- GList* node;
+ GList* acc_g_list = NULL;
gchar* acc_list = NULL;
gchar* message_format;
- for (node = xaccTransGetSplitList (trans); node; node = node->next)
+ for (GList *node = xaccTransGetSplitList (trans); node; node = node->next)
{
Split* split = node->data;
-
if (xaccSplitGetReconcile (split) == YREC)
{
- Account* acc = xaccSplitGetAccount (split);
- gchar* name = gnc_account_get_full_name (acc);
-
- if (acc_list == NULL)
- acc_list = g_strconcat ("\n", name, NULL);
- else
- {
- gchar* acc_list_copy = g_strdup (acc_list);
- g_free (acc_list);
- acc_list = g_strconcat (acc_list_copy, "\n", name, NULL);
- g_free (acc_list_copy);
- }
- g_free (name);
+ gchar* name = gnc_account_get_full_name (xaccSplitGetAccount (split));
+ acc_g_list = g_list_prepend (acc_g_list, name);
}
}
+ acc_list = gnc_g_list_stringjoin (acc_g_list, "\n");
title = _ ("Change transaction containing a reconciled split?");
message_format =
_ ("The transaction you are about to change contains reconciled splits in the following accounts:\n%s"
"\n\nAre you sure you want to continue with this change?");
message = g_strdup_printf (message_format, acc_list);
+ g_list_free_full (acc_g_list, g_free);
g_free (acc_list);
}
commit 8940d9d8c603443d8539cc47b65a36e43296b182
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Oct 12 04:14:33 2021 +0800
[split-register-model.c] prepend parent account, faster
it's only required to accumulate account amounts. acct order is
irrelevant.
diff --git a/gnucash/register/ledger-core/split-register-model.c b/gnucash/register/ledger-core/split-register-model.c
index 6124da164..04b211348 100644
--- a/gnucash/register/ledger-core/split-register-model.c
+++ b/gnucash/register/ledger-core/split-register-model.c
@@ -89,7 +89,7 @@ gnc_split_register_get_rbaln (VirtualLocation virt_loc, gpointer user_data,
if (subaccounts)
{
children = gnc_account_get_descendants (account);
- children = g_list_append (children, account);
+ children = g_list_prepend (children, account);
}
/* Get the row number we're on, then start with the first row. */
@@ -1601,7 +1601,7 @@ get_trans_total_value_subaccounts (SplitRegister* reg, Transaction* trans)
return total;
children = gnc_account_get_descendants (parent);
- children = g_list_append (children, parent);
+ children = g_list_prepend (children, parent);
for (child = children; child; child = child->next)
{
commit 1b0bfa5da72c978c476c5592c75a27e894803c45
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Oct 9 20:11:07 2021 +0800
[reports] QofQuery must be qof_query_destroyed
diff --git a/gnucash/report/reports/standard/ifrs-cost-basis.scm b/gnucash/report/reports/standard/ifrs-cost-basis.scm
index af35c3f54..78f8d2846 100644
--- a/gnucash/report/reports/standard/ifrs-cost-basis.scm
+++ b/gnucash/report/reports/standard/ifrs-cost-basis.scm
@@ -194,11 +194,6 @@ commissions in cumulative average cost and gain/loss after commission")
(define cap-purch-costs? (opt-val gnc:pagename-general optname-cap-purch-costs))
(define document (gnc:make-html-document))
- (define (elt->cell split)
- (gnc:html-markup-anchor
- (gnc:split-anchor-text split)
- (amount->monetary (xaccSplitGetAmount split))))
-
(define large 10000000)
(define (get-fx db from to time)
(/ (gnc-pricedb-convert-balance-nearest-price-t64 db large from to time)
@@ -232,7 +227,9 @@ commissions in cumulative average cost and gain/loss after commission")
(let ((query (qof-query-create-for-splits)))
(qof-query-set-book query (gnc-get-current-book))
(xaccQueryAddSingleAccountMatch query stock-acct QOF-QUERY-AND)
- (xaccQueryGetSplitsUniqueTrans query))))
+ (let ((result (xaccQueryGetSplitsUniqueTrans query)))
+ (qof-query-destroy query)
+ result))))
(define (to-commodity amt)
(if format-cells
diff --git a/gnucash/report/reports/standard/lot-viewer.scm b/gnucash/report/reports/standard/lot-viewer.scm
index 4ffe9c040..0a09f0558 100644
--- a/gnucash/report/reports/standard/lot-viewer.scm
+++ b/gnucash/report/reports/standard/lot-viewer.scm
@@ -108,7 +108,9 @@
query (logand CLEARED-ALL (lognot CLEARED-VOIDED)) QOF-QUERY-AND)
(xaccQueryAddSingleAccountMatch query account QOF-QUERY-AND)
(xaccQueryAddDateMatchTT query #t from-date #t to-date QOF-QUERY-AND)
- (filter desc-filter? (qof-query-run query))))
+ (let ((result (filter desc-filter? (qof-query-run query))))
+ (qof-query-destroy query)
+ result)))
(transactions
(sort-and-delete-duplicates
(map xaccSplitGetParent splits)
diff --git a/gnucash/report/reports/standard/test/test-register.scm b/gnucash/report/reports/standard/test/test-register.scm
index 12d6d1d77..9805e5f6c 100644
--- a/gnucash/report/reports/standard/test/test-register.scm
+++ b/gnucash/report/reports/standard/test/test-register.scm
@@ -63,7 +63,8 @@
(qof-query-set-book query (gnc-get-current-book))
(xaccQueryAddAccountMatch query (list bank)
QOF-GUID-MATCH-ANY QOF-QUERY-AND)
- (set-option options "__reg" "query" (gnc-query2scm query)))
+ (set-option options "__reg" "query" (gnc-query2scm query))
+ (qof-query-destroy query))
(let ((sxml (options->sxml options "basic")))
;; this is a simplistic test - counts the number of populated
commit 81b48ee8822ebfcf6f88b2e1a22c5191d3009201
Author: jean <27791933+jeanlaroche at users.noreply.github.com>
Date: Sun Oct 3 20:46:15 2021 -0700
Bug 798327 - Ofx import stops too early for multi-account OFX and one account has no new transactions
info->response must show GTK_RESPONSE_OK for the import to pproceed, otherwise the code assumes the
user canceled.
diff --git a/gnucash/import-export/ofx/gnc-ofx-import.c b/gnucash/import-export/ofx/gnc-ofx-import.c
index f7e9b1de4..fa55d1cbc 100644
--- a/gnucash/import-export/ofx/gnc-ofx-import.c
+++ b/gnucash/import-export/ofx/gnc-ofx-import.c
@@ -1216,6 +1216,8 @@ runMatcher(ofx_info* info, char * selected_filename, gboolean go_to_next_file)
gnc_info_dialog (parent, _("While importing transactions from OFX file '%s' into account '%s', found %d previously imported transactions, no new transactions."),
selected_filename, acct_name, info->num_trans_processed);
g_free (acct_name);
+ // This is required to ensure we don't mistakenly assume the user canceled.
+ info->response = GTK_RESPONSE_OK;
gnc_ofx_match_done (NULL,info);
return;
}
commit c2a449356b9babf565830f45f1503e435b02ecb2
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date: Tue Oct 12 00:22:04 2021 +0200
Don't translate org.gnucash.GnuCash.deprecated.gschema.xml.in
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index d39aa195c..a769815d8 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -12,3 +12,6 @@ gnucash/import-export/qif/qif-parse.c
# These files are autogenerated, and hence not distributed
gnucash/gnome-utils/gnc-warnings.c
libgnucash/engine/iso-4217-currencies.c
+
+# This file containing @PROJECT_NAME@ shouldn't be translated.
+gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in
commit e5e46fa50915f163f5461189dabbb1eabfbb357a
Author: TianXing_Yi <ytx.cash at gmail.com>
Date: Sun Oct 10 08:03:55 2021 +0200
Translation update by TianXing_Yi <ytx.cash at gmail.com> using Weblate
po/zh_CN.po: 100.0% (5363 of 5363 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Chinese (Simplified))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hans/
Co-authored-by: TianXing_Yi <ytx.cash at gmail.com>
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 387b86f01..1b956d5e6 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -24,8 +24,8 @@ msgstr ""
"Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug."
"cgi?product=GnuCash&component=Translations\n"
"POT-Creation-Date: 2021-09-20 22:29+0200\n"
-"PO-Revision-Date: 2021-10-09 13:36+0000\n"
-"Last-Translator: J0kWang <lianjiefly at gmail.com>\n"
+"PO-Revision-Date: 2021-10-10 06:03+0000\n"
+"Last-Translator: TianXing_Yi <ytx.cash at gmail.com>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"gnucash/gnucash/zh_Hans/>\n"
"Language: zh_CN\n"
@@ -887,11 +887,11 @@ msgstr "æé¡¹ä»æ¬¾"
#: gnucash/gnome/assistant-loan.cpp:770
#, c-format
msgid "... pay \"%s\"?"
-msgstr "æ¯ä»â%sâï¼"
+msgstr "æ¯ä»â%sâ"
#: gnucash/gnome/assistant-loan.cpp:782
msgid "via Escrow account?"
-msgstr "éè¿æç®¡è´¦æ·ï¼"
+msgstr "éè¿æç®¡ç§ç®"
#: gnucash/gnome/assistant-loan.cpp:929
#: gnucash/gnome-utils/gnc-tree-model-split-reg.c:2894
@@ -2382,12 +2382,12 @@ msgstr "ç¼å·"
#: gnucash/gnome/dialog-invoice.c:3377 gnucash/gnome/dialog-invoice.c:3411
#: gnucash/gnome/dialog-invoice.c:3445
msgid "Is Paid?"
-msgstr "å·²æ¯ä»ï¼"
+msgstr "å·²æ¯ä»"
#: gnucash/gnome/dialog-invoice.c:3383 gnucash/gnome/dialog-invoice.c:3417
#: gnucash/gnome/dialog-invoice.c:3451
msgid "Is Posted?"
-msgstr "å·²å
¥è´¦ï¼"
+msgstr "å·²å
¥è´¦"
#: gnucash/gnome/dialog-invoice.c:3386 gnucash/gnome/dialog-invoice.c:3420
#: gnucash/gnome/dialog-invoice.c:3454 gnucash/gnome/dialog-order.c:876
@@ -2505,7 +2505,7 @@ msgstr "æ¥æ¾å票"
#, c-format
msgid "The following vendor document is due:"
msgid_plural "The following %d vendor documents are due:"
-msgstr[0] "%d 份尿åºä»ï¼"
+msgstr[0] "%d 份尿åºä»"
#: gnucash/gnome/dialog-invoice.c:3720
msgid "Due Bills Reminder"
@@ -2517,7 +2517,7 @@ msgstr "åºä»æé"
#, c-format
msgid "The following customer document is due:"
msgid_plural "The following %d customer documents are due:"
-msgstr[0] "%d ä»½å°æåºæ¶ï¼"
+msgstr[0] "%d ä»½å°æåºæ¶"
#: gnucash/gnome/dialog-invoice.c:3731
msgid "Due Invoices Reminder"
@@ -2557,7 +2557,7 @@ msgstr "对象åç§°"
#: gnucash/gnome/dialog-job.c:581
msgid "Only Active?"
-msgstr "ä»
éæ´»è·çï¼"
+msgstr "ä»
éæ´»è·"
#: gnucash/gnome/dialog-job.c:585 gnucash/gnome/dialog-job.c:598
#: gnucash/gnome-utils/gnc-tree-view-split-reg.c:2929
@@ -2717,7 +2717,7 @@ msgstr "é¢ä»"
msgid ""
"The transfer and post accounts are associated with different currencies. "
"Please specify the conversion rate."
-msgstr "转åºåå
¥è´¦çç§ç®è¢«æå®äºä¸åçå¸ç§ã请æå®è½¬æ¢æ±çã"
+msgstr "转åºåå
¥è´¦ç§ç®å¸ç§ä¸åï¼è¯·è®¾ç½®æ±çã"
#: gnucash/gnome/dialog-payment.c:1307 gnucash/gnome/search-owner.c:211
#: gnucash/gnome-search/dialog-search.c:1077
@@ -4174,14 +4174,13 @@ msgid ""
"\n"
"Move the subaccounts or delete them before attempting to delete this account."
msgstr ""
-"ç§ç®\"%s\"ä¸è¿æä¸ä¸ªæå¤ä¸ªåç§ç®ã\n"
-"\n"
-"å¨å é¤è¯¥ç§ç®å请å
å 餿æçåç§ç®ã"
+"\"%s\"æä¸ä¸ªæå¤ä¸ªåç§ç®ã\n"
+"å é¤è¯¥ç§ç®å请å
å 餿æçåç§ç®ã"
#: gnucash/gnome/gnc-plugin-page-account-tree.c:1728
#, c-format
msgid "The account %s will be deleted."
-msgstr "å°å é¤è´¦æ· %sã"
+msgstr "å°å é¤ %s,"
#: gnucash/gnome/gnc-plugin-page-account-tree.c:1737
#, c-format
@@ -4201,7 +4200,7 @@ msgstr "å°å®çææåç§ç®è½¬ç§»å°ç§ç® %s ä¸ã"
#: gnucash/gnome/gnc-plugin-page-account-tree.c:1759
#, c-format
msgid "Its subaccount will be deleted."
-msgstr "åæ¶å 餿æåç§ç®ã"
+msgstr "å 餿æåç§ç®ã"
#: gnucash/gnome/gnc-plugin-page-account-tree.c:1763
#, c-format
@@ -5551,7 +5550,7 @@ msgstr "ä¸è½ä½åºå·²å¯¹è´¦æå·²æ ¸å®åå½ç交æã"
#: gnucash/gnome-utils/gnc-tree-view-owner.c:1175
#, c-format
msgid "Filter %s by..."
-msgstr "çé %s..."
+msgstr "çé %s"
#. Translators: This is a menu item that will open the bill, invoice, or voucher
#. that is posted to the current transaction if there is one.
@@ -5685,7 +5684,7 @@ msgstr "æ°äº¤æä¿¡æ¯"
#: gnucash/gnome/gnc-plugin-page-register.c:4180
#, c-format
msgid "Sort %s by..."
-msgstr "å° %s æåº..."
+msgstr "æåº %s"
#. Translators: %s refer to the following in
#. order: invoice type, invoice ID, owner name,
@@ -5757,9 +5756,7 @@ msgstr "æ´æ°å½åæ¥è¡¨çå·²ä¿åé
ç½®ãæ¥è¡¨é
ç½®å°ä¿å卿件%s
msgid ""
"Add the current report's configuration to the 'Reports->Saved Report "
"Configurations' menu. The report configuration will be saved in the file %s."
-msgstr ""
-"å°å½åæ¥è¡¨çé
置添å å°'æ¥è¡¨->å·²ä¿åçèªå®ä¹æ¥è¡¨'èåä¸ãæ¥è¡¨é
ç½®å°è¢«ä¿å卿"
-"ä»¶%sä¸ã"
+msgstr "æ·»å å½åæ¥è¡¨é
ç½®å°\"æ¥è¡¨ -> å·²ä¿å模æ¿\"ï¼é
ç½®å°è¢«ä¿å卿件%sä¸ã"
#: gnucash/gnome/gnc-plugin-page-report.c:1205
msgid "_Print Report..."
@@ -5775,7 +5772,7 @@ msgstr "导åºä¸º PDF(_D)..."
#: gnucash/gnome/gnc-plugin-page-report.c:1211
msgid "Export the current report as a PDF document"
-msgstr "å°å½åæ¥å导åºä¸º PDF ææ¡£"
+msgstr "å°å½åæ¥è¡¨å¯¼åºä¸º PDF ææ¡£"
#: gnucash/gnome/gnc-plugin-page-report.c:1236
msgid "Save _Report Configuration"
@@ -6084,7 +6081,7 @@ msgstr "æ¤ç§ç®æ¯åªè¯»çã"
#: gnucash/gnome/gnc-split-reg2.c:938 gnucash/gnome/gnc-split-reg.c:2448
#, c-format
msgid "The '%s' account register is read-only."
-msgstr "'%s'ç§ç®åªè¯»ã"
+msgstr "'%s'ç§ç®åªè¯»"
#: gnucash/gnome/gnc-split-reg2.c:1003
msgid ""
@@ -8312,7 +8309,7 @@ msgstr "GnuCash æ æ³æ¾å°å¸®å©æä»¶ã"
msgid ""
"This is likely because the \"gnucash-docs\" package is not properly "
"installed."
-msgstr "GnuCash æ æ³æ¾å°å¸®å©æä»¶ãè¿å¾å¯è½æ¯å 为没æå®è£
âgnucash-docsâè¿ä¸ªå
ã"
+msgstr "è¿å¯è½æ¯å 为 \"gnucash-docs \"软件å
æ²¡ææ£ç¡®å®è£
ã"
#. Translators: URI of missing help files
#: gnucash/gnome-utils/gnc-gnome-utils.c:74
@@ -10054,8 +10051,8 @@ msgid ""
"removed in GnuCash 5.0. Please use 'gnucash-cli --quotes get <datafile>' "
"instead."
msgstr ""
-"gnucashç'--add-price-quotes'é项已被å¼ç¨ï¼å¹¶å°å¨GnuCash 5.0ä¸å é¤ã请æ¹"
-"ç¨'gnucash-cli --quotes get <datafile>'ã"
+"GnuCash 5.0 å°å é¤å·²å¼é项'--add-price-quotes'ï¼è¯·æ¹ç¨'gnucash-cli --quotes get "
+"<datafile>'ã"
#: gnucash/gnucash.cpp:348
msgid "Run '{1} --help' to see a full list of available command line options."
@@ -21641,7 +21638,7 @@ msgstr "sample:(x + 0.33 * y + (x+y) )"
msgid ""
"Could not determine the account currency. Using the default currency "
"provided by your system."
-msgstr "æ æ³ç¡®å®å¸æ·å¸ç§ãå°ä½¿ç¨ç³»ç»çé»è®¤è´§å¸ã"
+msgstr "æ æ³ç¡®å®ç§ç®å¸ç§ï¼å°ä½¿ç¨ç³»ç»é»è®¤çé项ã"
#: gnucash/register/ledger-core/split-register-model.c:253
msgid "Ref"
@@ -27890,7 +27887,7 @@ msgstr "æå®è¯¦ç»æ¾ç¤ºäºå¡çæ°éã"
#: gnucash/report/trep-engine.scm:978
msgid "One split per line"
-msgstr "æ¯ä¸ªåå½ä¸è¡"
+msgstr "æ¯ä¸ªå交æä¸è¡"
#: gnucash/report/trep-engine.scm:979
msgid "One transaction per line"
commit 651f33e9e634ca10fc147218567965cdefef8abf
Author: J0kWang <lianjiefly at gmail.com>
Date: Sun Oct 10 08:03:55 2021 +0200
Translation update by J0kWang <lianjiefly at gmail.com> using Weblate
po/zh_CN.po: 100.0% (5363 of 5363 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Chinese (Simplified))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hans/
Co-authored-by: J0kWang <lianjiefly at gmail.com>
diff --git a/po/zh_CN.po b/po/zh_CN.po
index b13014800..387b86f01 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -24,8 +24,8 @@ msgstr ""
"Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug."
"cgi?product=GnuCash&component=Translations\n"
"POT-Creation-Date: 2021-09-20 22:29+0200\n"
-"PO-Revision-Date: 2021-10-06 06:01+0000\n"
-"Last-Translator: TianXing_Yi <ytx.cash at gmail.com>\n"
+"PO-Revision-Date: 2021-10-09 13:36+0000\n"
+"Last-Translator: J0kWang <lianjiefly at gmail.com>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"gnucash/gnucash/zh_Hans/>\n"
"Language: zh_CN\n"
@@ -26787,7 +26787,7 @@ msgstr "è¡¨æ ¼å¤´è¾¹æ¡é¢è²"
#: gnucash/report/reports/standard/taxinvoice.scm:92
msgid "table-cell-border-color"
-msgstr "table-cell-border-color"
+msgstr "åå
æ ¼è¾¹æ¡é¢è²"
#: gnucash/report/reports/standard/taxinvoice.scm:93
msgid "Embedded CSS"
commit bda7d50b1fb28b336d6ff817ee75d0b5e66d8bf9
Merge: 59bd247db 8b82970c6
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Oct 11 10:17:15 2021 -0700
Merge Christian Wehling's 'trailing_spaces' into maint.
commit 59bd247db7b2feae8573c95788de5052c744e236
Merge: 23d964a6a d0d4d95e3
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Oct 11 09:48:42 2021 -0700
Merge Jean Laroche's '105334_ofx_multiple_accounts' into maint.
commit 23d964a6a477d0790d84f0435d2fe8b2bf2beedb
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Oct 9 12:03:11 2021 +0800
g_list_free_full requires a GDestroyNotify
error in f4941a5b0
diff --git a/bindings/guile/gnc-engine-guile.c b/bindings/guile/gnc-engine-guile.c
index 3873e0ea3..431acd301 100644
--- a/bindings/guile/gnc-engine-guile.c
+++ b/bindings/guile/gnc-engine-guile.c
@@ -334,7 +334,7 @@ gnc_scm2guid_glist (SCM guids_scm)
static inline void
gnc_guid_glist_free (GList *guids)
{
- g_list_free_full (guids, guid_free);
+ g_list_free_full (guids, (GDestroyNotify)guid_free);
}
static SCM
commit 0bce6a1d56857436af6060da8555e8696fed7796
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Wed Oct 6 09:19:14 2021 +0800
[core-utils] introduce gnc:format
(gnc:format str [binding value]...)
str will contain ${binding} which will be replaced to value.
diff --git a/bindings/guile/core-utils.scm b/bindings/guile/core-utils.scm
index 7b360cb81..d1bc46af6 100644
--- a/bindings/guile/core-utils.scm
+++ b/bindings/guile/core-utils.scm
@@ -32,6 +32,7 @@
(use-modules (srfi srfi-26))
(use-modules (ice-9 match))
(use-modules (ice-9 i18n))
+(use-modules (ice-9 regex))
(export N_)
(export G_)
@@ -41,6 +42,7 @@
(export gnc:string-locale<?)
(export gnc:string-locale>?)
(export gnc:version)
+(export gnc:format)
;; loads modules and re-exports all its public interface into the
;; current module
@@ -107,3 +109,16 @@
(_ (default-printer))))
(set-exception-printer! 'unbound-variable print-unbound-variable-error)
+
+;; format.
+(define %regex (make-regexp "[$][{]([[:alnum:]]+)[}]"))
+(define (gnc:format str . bindings)
+ (define hash (make-hash-table))
+ (define (substitute m)
+ (or (hashq-ref hash (string->symbol (match:substring m 1)))
+ (warn "invalid identifier" (match:substring m 0))))
+ (let lp ((bindings bindings))
+ (match bindings
+ (() (regexp-substitute/global #f %regex str 'pre substitute 'post))
+ (((? symbol? k) v . rest) (hashq-set! hash k (format #f "~a" v)) (lp rest))
+ (_ (error "gnc:format syntax error")))))
diff --git a/bindings/guile/test/test-core-utils.scm b/bindings/guile/test/test-core-utils.scm
index 2d0b0cfae..c36734c18 100644
--- a/bindings/guile/test/test-core-utils.scm
+++ b/bindings/guile/test/test-core-utils.scm
@@ -13,8 +13,37 @@
"foobar"
(N_ "foobar")))
+(define (gnc-format-tests)
+ (test-equal "null"
+ ""
+ (gnc:format ""))
+
+ (test-equal "basic"
+ "basic"
+ (gnc:format "basic"))
+
+ (test-equal "basic with unused symbols"
+ "basic"
+ (gnc:format "basic" 'task "testing"))
+
+ (test-equal "one substitution"
+ "basic test"
+ (gnc:format "basic ${job}" 'job "test"))
+
+ (test-equal "two substitutions out of order"
+ "basic test"
+ (gnc:format "${difficulty} ${job}" 'job "test" 'difficulty "basic"))
+
+ (test-equal "trying to reference invalid symbol"
+ "${symbol} does not exist"
+ (gnc:format "${symbol} does not exist" 'existence "none"))
+
+ (test-error "gnc:format syntax error"
+ (gnc:format "${symbol} does not exist" 'existence)))
+
(define (run-test)
(test-runner-factory gnc:test-runner)
(test-begin "test-core-utils")
(N_-tests)
+ (gnc-format-tests)
(test-end "test-core-utils"))
commit 3ff5bd824618aabfcfdbb0fdaafbe5aad1b578ad
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Thu Oct 7 09:37:24 2021 +0800
[test-core-utils] uses srfi-64
diff --git a/bindings/guile/test/CMakeLists.txt b/bindings/guile/test/CMakeLists.txt
index 904f9baca..ee48e6f49 100644
--- a/bindings/guile/test/CMakeLists.txt
+++ b/bindings/guile/test/CMakeLists.txt
@@ -25,7 +25,6 @@ gnc_add_test_with_guile(test-scm-query test-scm-query.cpp ENGINE_TEST_INCLUDE_DI
set(bindings_test_SCHEME
- test-core-utils.scm
test-create-account.scm
)
@@ -59,6 +58,7 @@ add_dependencies(check scm-test-engine)
gnc_add_scheme_tests("${engine_test_SCHEME}")
set (scm_tests_with_srfi64_SOURCES
+ test-core-utils.scm
test-business-core.scm
test-scm-engine.scm
)
diff --git a/bindings/guile/test/test-core-utils.scm b/bindings/guile/test/test-core-utils.scm
index 5de9dd0ff..2d0b0cfae 100644
--- a/bindings/guile/test/test-core-utils.scm
+++ b/bindings/guile/test/test-core-utils.scm
@@ -1,17 +1,20 @@
-(define exit-code 0)
(setenv "GNC_UNINSTALLED" "1")
+
+(use-modules (srfi srfi-64))
+(use-modules (tests srfi64-extras))
(use-modules (gnucash core-utils))
-(if (procedure? (module-ref (current-module) 'N_))
- (display "N_ defined\n")
- (begin
- (display "Failed - N_ not defined\n")
- (set! exit-code -1)))
+(define (N_-tests)
+
+ (test-assert "N_ defined"
+ (module-ref (current-module) 'N_))
-(if (string=? (N_ "foobar") "foobar")
- (display "N_ works properly\n")
- (begin
- (display "Failed - N_ doesn't work\n")
- (set! exit-code -1)))
+ (test-equal "N_ works properly"
+ "foobar"
+ (N_ "foobar")))
-(exit exit-code)
+(define (run-test)
+ (test-runner-factory gnc:test-runner)
+ (test-begin "test-core-utils")
+ (N_-tests)
+ (test-end "test-core-utils"))
commit f4941a5b01939aad152a36dc8deb6ef0a031ad9e
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Oct 9 10:24:45 2021 +0800
use g_list_free_full
diff --git a/bindings/guile/gnc-engine-guile.c b/bindings/guile/gnc-engine-guile.c
index 45a69ec24..3873e0ea3 100644
--- a/bindings/guile/gnc-engine-guile.c
+++ b/bindings/guile/gnc-engine-guile.c
@@ -331,15 +331,10 @@ gnc_scm2guid_glist (SCM guids_scm)
return g_list_reverse (guids);
}
-static void
+static inline void
gnc_guid_glist_free (GList *guids)
{
- GList *node;
-
- for (node = guids; node; node = node->next)
- guid_free (node->data);
-
- g_list_free (guids);
+ g_list_free_full (guids, guid_free);
}
static SCM
diff --git a/gnucash/gnome/dialog-tax-info.c b/gnucash/gnome/dialog-tax-info.c
index fcd0a3dc7..6b342adf9 100644
--- a/gnucash/gnome/dialog-tax-info.c
+++ b/gnucash/gnome/dialog-tax-info.c
@@ -168,7 +168,7 @@ initialize_getters (void)
}
static void
-destroy_tax_type_info (gpointer data, gpointer user_data)
+destroy_tax_type_info (gpointer data)
{
TaxTypeInfo *tax_type = data;
@@ -187,15 +187,14 @@ destroy_tax_type_info (gpointer data, gpointer user_data)
g_free (tax_type);
}
-static void
+static inline void
destroy_tax_type_infos (GList *types)
{
- g_list_foreach (types, destroy_tax_type_info, NULL);
- g_list_free (types);
+ g_list_free_full (types, destroy_tax_type_info);
}
static void
-destroy_txf_info (gpointer data, gpointer user_data)
+destroy_txf_info (gpointer data)
{
TXFInfo *txf_info = data;
@@ -217,11 +216,10 @@ destroy_txf_info (gpointer data, gpointer user_data)
g_free (txf_info);
}
-static void
+static inline void
destroy_txf_infos (GList *infos)
{
- g_list_foreach (infos, destroy_txf_info, NULL);
- g_list_free (infos);
+ g_list_free_full (infos, destroy_txf_info);
}
static void
commit e5027f91cbf2c0fa6edb5f20e2cbf4d2fa480162
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Fri Oct 8 22:48:42 2021 +0800
[test-transaction] option has been renamed
diff --git a/gnucash/report/reports/standard/test/test-transaction.scm b/gnucash/report/reports/standard/test/test-transaction.scm
index 5ea03413e..bb7df2156 100644
--- a/gnucash/report/reports/standard/test/test-transaction.scm
+++ b/gnucash/report/reports/standard/test/test-transaction.scm
@@ -378,19 +378,19 @@
(set! options (default-testing-options))
(set-option! options "General" "Start Date" (cons 'absolute (gnc-dmy2time64 01 01 1969)))
(set-option! options "General" "End Date" (cons 'absolute (gnc-dmy2time64 31 12 1970)))
- (set-option! options "Filter" "Reconcile Status" 'unreconciled)
+ (set-option! options "Filter" "Reconciled Status" 'unreconciled)
(let ((sxml (options->sxml options "unreconciled")))
(test-equal "filter unreconciled only, sum = -$20.00"
'("-$20.00")
(get-row-col sxml -1 -1)))
- (set-option! options "Filter" "Reconcile Status" 'cleared)
+ (set-option! options "Filter" "Reconciled Status" 'cleared)
(let ((sxml (options->sxml options "cleared")))
(test-equal "filter cleared only, sum = $29.00"
'("$29.00")
(get-row-col sxml -1 -1)))
- (set-option! options "Filter" "Reconcile Status" 'reconciled)
+ (set-option! options "Filter" "Reconciled Status" 'reconciled)
(let ((sxml (options->sxml options "reconciled")))
(test-equal "filter reconciled only, sum = -$8.00"
'("-$8.00")
commit 7692027bd5f521f37a75ff341846e68c37da38b9
Merge: 7c9c2eba3 be75a433f
Author: John Ralls <jralls at ceridwen.us>
Date: Fri Oct 8 14:26:08 2021 -0700
Merge Jean Laroche's 'fix_memory_leak_ofx' into maint.
commit 7c9c2eba3c4f1f59b84aa70ce3b2bd93b96d62c1
Author: John Ralls <jralls at ceridwen.us>
Date: Fri Oct 8 14:17:28 2021 -0700
Bug 798320 - Error message indicating a crash of GNUcash when closing...
application - MacOS 10.15.7 (19H1419)
Destruction order problem: The SX template accounts can't be destroyed
until after the template splts and transactions are.
Register them before the transactions and splits, as destruction occurs
in reverse order of registration.
diff --git a/libgnucash/engine/cashobjects.c b/libgnucash/engine/cashobjects.c
index fd3ae3426..e2f34d8d5 100644
--- a/libgnucash/engine/cashobjects.c
+++ b/libgnucash/engine/cashobjects.c
@@ -71,10 +71,10 @@ cashobjects_register(void)
{
g_return_val_if_fail(gnc_commodity_table_register(), FALSE);
g_return_val_if_fail(xaccAccountRegister(), FALSE);
- g_return_val_if_fail ( xaccTransRegister(), FALSE);
- g_return_val_if_fail ( xaccSplitRegister(), FALSE);
g_return_val_if_fail ( gnc_sxtt_register(), FALSE);
g_return_val_if_fail ( SXRegister (), FALSE);
+ g_return_val_if_fail ( xaccTransRegister(), FALSE);
+ g_return_val_if_fail ( xaccSplitRegister(), FALSE);
g_return_val_if_fail(gnc_pricedb_register(), FALSE);
g_return_val_if_fail (gnc_budget_register(), FALSE);
g_return_val_if_fail ( gnc_lot_register (), FALSE);
commit be75a433fcdcd5262397834484f1041ff6fddc4e
Author: jean <27791933+jeanlaroche at users.noreply.github.com>
Date: Fri Oct 8 13:38:00 2021 -0700
Fix memory leak when the user cancels the matching process
diff --git a/gnucash/import-export/ofx/gnc-ofx-import.c b/gnucash/import-export/ofx/gnc-ofx-import.c
index 6423ddbf3..f82c96800 100644
--- a/gnucash/import-export/ofx/gnc-ofx-import.c
+++ b/gnucash/import-export/ofx/gnc-ofx-import.c
@@ -1130,7 +1130,11 @@ gnc_ofx_match_done (GtkDialog *dialog, gpointer user_data)
/* The the user did not click OK, don't process the rest of the
* transaction, don't go to the next of xfile.
*/
- if (info->response != GTK_RESPONSE_OK) return;
+ if (info->response != GTK_RESPONSE_OK)
+ {
+ g_free (info);
+ return;
+ }
if (info->trans_list)
{
commit c321eae7cda36e7dff51432dcafbdf2f0072fd4d
Merge: 4c5b3658d 7b9ad5139
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Fri Oct 8 17:17:48 2021 +0800
Merge branch 'maint-import' into maint #1160
commit 4c5b3658de8f55a40f51723396c37e79a9da2aba
Author: TianXing_Yi <ytx.cash at gmail.com>
Date: Wed Oct 6 08:01:42 2021 +0200
Translation update by TianXing_Yi <ytx.cash at gmail.com> using Weblate
po/zh_CN.po: 100.0% (5363 of 5363 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Chinese (Simplified))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hans/
Co-authored-by: TianXing_Yi <ytx.cash at gmail.com>
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 83b434dac..b13014800 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -24,8 +24,8 @@ msgstr ""
"Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug."
"cgi?product=GnuCash&component=Translations\n"
"POT-Creation-Date: 2021-09-20 22:29+0200\n"
-"PO-Revision-Date: 2021-10-02 14:36+0000\n"
-"Last-Translator: J0kWang <lianjiefly at gmail.com>\n"
+"PO-Revision-Date: 2021-10-06 06:01+0000\n"
+"Last-Translator: TianXing_Yi <ytx.cash at gmail.com>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"gnucash/gnucash/zh_Hans/>\n"
"Language: zh_CN\n"
@@ -2770,9 +2770,7 @@ msgid ""
"You have no valid \"Post To\" accounts. Please create an account of type \"%s"
"\" before you continue to process this payment. Perhaps you want to create "
"an Invoice or Bill first?"
-msgstr ""
-"æ¨æ²¡æææçâå
¥è´¦âç§ç®ã请å¨ç»§ç»å¤çæ¤ä»æ¬¾åå建ä¸ä¸ªç±»å为â%sâçç§ç®ãä¹è®¸æ¨"
-"叿å
å建ä¸ä¸ªå票æè´¦åï¼"
+msgstr "å°æ ææçâå
¥è´¦âç§ç®ï¼è¯·å
å建ä¸ä¸ªãç±»å为â%sâï¼ä¹è®¸åºå
å建ä¸ä¸ªå票æè´¦åï¼"
#: gnucash/gnome/dialog-payment.c:1621
msgid ""
@@ -7188,7 +7186,7 @@ msgstr "å¯å¨ä½é¢çç®å¸å·²ä»¥æå®çè´§å¸åå¨ã"
#: gnucash/gnome-utils/dialog-account.c:1329
msgid "Cannot change currency"
-msgstr "æ æ³æ´æ¹è´§å¸"
+msgstr "æ æ³æ´æ¹å¸ç§"
#: gnucash/gnome-utils/dialog-account.c:1418
msgid ""
@@ -8638,7 +8636,7 @@ msgstr ""
"Aron Xu <happyaron.xu at gmail.com>, 2010\n"
"Tao Wang <dancefire at gmail.com>, 2010\n"
"Boyuan Yang <073plan at gmail.com>, 2019\n"
-"TianXing_Yi <ytx.cash at gmail.com>, 2021\n"
+"YTX <ytx.cash at gmail.com>, 2021\n"
"CJH <c at cjh0613.com>, 2021"
#: gnucash/gnome-utils/gnc-main-window.c:4740
commit 50fb1839775e81ae8470628b4c4c9cb8302c76e0
Author: J0kWang <lianjiefly at gmail.com>
Date: Wed Oct 6 08:01:41 2021 +0200
Translation update by J0kWang <lianjiefly at gmail.com> using Weblate
po/zh_CN.po: 100.0% (5363 of 5363 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Chinese (Simplified))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hans/
Co-authored-by: J0kWang <lianjiefly at gmail.com>
diff --git a/po/zh_CN.po b/po/zh_CN.po
index b850bfa5f..83b434dac 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -17,14 +17,15 @@
# TianXing_Yi <ytx.cash at gmail.com>, 2021.
# cjh <cjh at cjh0613.com>, 2021.
# Eric <spice2wolf at gmail.com>, 2021.
+# J0kWang <lianjiefly at gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: GnuCash 4.7-pre2\n"
"Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug."
"cgi?product=GnuCash&component=Translations\n"
"POT-Creation-Date: 2021-09-20 22:29+0200\n"
-"PO-Revision-Date: 2021-09-28 05:36+0000\n"
-"Last-Translator: TianXing_Yi <ytx.cash at gmail.com>\n"
+"PO-Revision-Date: 2021-10-02 14:36+0000\n"
+"Last-Translator: J0kWang <lianjiefly at gmail.com>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"gnucash/gnucash/zh_Hans/>\n"
"Language: zh_CN\n"
@@ -886,11 +887,11 @@ msgstr "æé¡¹ä»æ¬¾"
#: gnucash/gnome/assistant-loan.cpp:770
#, c-format
msgid "... pay \"%s\"?"
-msgstr "æ¯ä»â%sâ"
+msgstr "æ¯ä»â%sâï¼"
#: gnucash/gnome/assistant-loan.cpp:782
msgid "via Escrow account?"
-msgstr "éè¿æç®¡ç§ç®"
+msgstr "éè¿æç®¡è´¦æ·ï¼"
#: gnucash/gnome/assistant-loan.cpp:929
#: gnucash/gnome-utils/gnc-tree-model-split-reg.c:2894
@@ -2381,12 +2382,12 @@ msgstr "ç¼å·"
#: gnucash/gnome/dialog-invoice.c:3377 gnucash/gnome/dialog-invoice.c:3411
#: gnucash/gnome/dialog-invoice.c:3445
msgid "Is Paid?"
-msgstr "å·²æ¯ä»"
+msgstr "å·²æ¯ä»ï¼"
#: gnucash/gnome/dialog-invoice.c:3383 gnucash/gnome/dialog-invoice.c:3417
#: gnucash/gnome/dialog-invoice.c:3451
msgid "Is Posted?"
-msgstr "å·²å
¥è´¦"
+msgstr "å·²å
¥è´¦ï¼"
#: gnucash/gnome/dialog-invoice.c:3386 gnucash/gnome/dialog-invoice.c:3420
#: gnucash/gnome/dialog-invoice.c:3454 gnucash/gnome/dialog-order.c:876
@@ -2504,7 +2505,7 @@ msgstr "æ¥æ¾å票"
#, c-format
msgid "The following vendor document is due:"
msgid_plural "The following %d vendor documents are due:"
-msgstr[0] "%d 份尿åºä»"
+msgstr[0] "%d 份尿åºä»ï¼"
#: gnucash/gnome/dialog-invoice.c:3720
msgid "Due Bills Reminder"
@@ -2516,7 +2517,7 @@ msgstr "åºä»æé"
#, c-format
msgid "The following customer document is due:"
msgid_plural "The following %d customer documents are due:"
-msgstr[0] "%d ä»½å°æåºæ¶"
+msgstr[0] "%d ä»½å°æåºæ¶ï¼"
#: gnucash/gnome/dialog-invoice.c:3731
msgid "Due Invoices Reminder"
@@ -2556,7 +2557,7 @@ msgstr "对象åç§°"
#: gnucash/gnome/dialog-job.c:581
msgid "Only Active?"
-msgstr "ä»
éæ´»è·"
+msgstr "ä»
éæ´»è·çï¼"
#: gnucash/gnome/dialog-job.c:585 gnucash/gnome/dialog-job.c:598
#: gnucash/gnome-utils/gnc-tree-view-split-reg.c:2929
@@ -4175,11 +4176,14 @@ msgid ""
"\n"
"Move the subaccounts or delete them before attempting to delete this account."
msgstr ""
+"ç§ç®\"%s\"ä¸è¿æä¸ä¸ªæå¤ä¸ªåç§ç®ã\n"
+"\n"
+"å¨å é¤è¯¥ç§ç®å请å
å 餿æçåç§ç®ã"
#: gnucash/gnome/gnc-plugin-page-account-tree.c:1728
#, c-format
msgid "The account %s will be deleted."
-msgstr "å°å é¤ %sï¼"
+msgstr "å°å é¤è´¦æ· %sã"
#: gnucash/gnome/gnc-plugin-page-account-tree.c:1737
#, c-format
@@ -4199,7 +4203,7 @@ msgstr "å°å®çææåç§ç®è½¬ç§»å°ç§ç® %s ä¸ã"
#: gnucash/gnome/gnc-plugin-page-account-tree.c:1759
#, c-format
msgid "Its subaccount will be deleted."
-msgstr "åæ¶å 餿æåç§ç®ï¼"
+msgstr "åæ¶å 餿æåç§ç®ã"
#: gnucash/gnome/gnc-plugin-page-account-tree.c:1763
#, c-format
@@ -5549,7 +5553,7 @@ msgstr "ä¸è½ä½åºå·²å¯¹è´¦æå·²æ ¸å®åå½ç交æã"
#: gnucash/gnome-utils/gnc-tree-view-owner.c:1175
#, c-format
msgid "Filter %s by..."
-msgstr "çé %s"
+msgstr "çé %s..."
#. Translators: This is a menu item that will open the bill, invoice, or voucher
#. that is posted to the current transaction if there is one.
@@ -5683,7 +5687,7 @@ msgstr "æ°äº¤æä¿¡æ¯"
#: gnucash/gnome/gnc-plugin-page-register.c:4180
#, c-format
msgid "Sort %s by..."
-msgstr "æåº %s"
+msgstr "å° %s æåº..."
#. Translators: %s refer to the following in
#. order: invoice type, invoice ID, owner name,
@@ -6082,7 +6086,7 @@ msgstr "æ¤ç§ç®æ¯åªè¯»çã"
#: gnucash/gnome/gnc-split-reg2.c:938 gnucash/gnome/gnc-split-reg.c:2448
#, c-format
msgid "The '%s' account register is read-only."
-msgstr "'%s'ç§ç®åªè¯»"
+msgstr "'%s'ç§ç®åªè¯»ã"
#: gnucash/gnome/gnc-split-reg2.c:1003
msgid ""
@@ -22090,7 +22094,7 @@ msgstr "æç§ç®åç§°çåæ¯é¡ºåºæå"
#: gnucash/report/options-utilities.scm:205
msgid "Numerical by descending amount"
-msgstr ""
+msgstr "æé颿°åéåæå"
#: gnucash/report/options-utilities.scm:223
msgid "How to show the balances of parent accounts."
@@ -24182,7 +24186,7 @@ msgstr "å¨å·¦ä¾§æ¾ç¤ºèµäº§ï¼å³ä¾§æ¾ç¤ºè´åºåææè
æç"
#: gnucash/report/reports/standard/balsheet-eg.scm:224
msgid "Sign: -$10.00"
-msgstr ""
+msgstr "符å·: -$10.00"
#: gnucash/report/reports/standard/balsheet-eg.scm:225
msgid "Brackets: ($10.00)"
@@ -26203,7 +26207,7 @@ msgstr "æé´å¼å§"
#: gnucash/report/reports/standard/new-owner-report.scm:510
msgid ""
"* Amounts denoted thus are derived from, and do not match the transaction."
-msgstr ""
+msgstr "è¿äºéé¢æè¡¨ç¤ºçæ¯ç±æ¨ç®å¾åºï¼ä¸äº¤æä¸å¹é
ã"
#: gnucash/report/reports/standard/new-owner-report.scm:868
#: gnucash/report/reports/standard/owner-report.scm:535
@@ -26267,7 +26271,7 @@ msgstr "æ¾ç¤ºæä»¶é¾æ¥ï¼"
#: gnucash/report/reports/standard/new-owner-report.scm:1068
msgid "No valid account found"
-msgstr "æ¾ä¸å°å¹é
ç"
+msgstr "æ²¡æææçç§ç®"
#: gnucash/report/reports/standard/new-owner-report.scm:1069
msgid "This report requires a valid AP/AR account to be available."
@@ -27888,7 +27892,7 @@ msgstr "æå®è¯¦ç»æ¾ç¤ºäºå¡çæ°éã"
#: gnucash/report/trep-engine.scm:978
msgid "One split per line"
-msgstr ""
+msgstr "æ¯ä¸ªåå½ä¸è¡"
#: gnucash/report/trep-engine.scm:979
msgid "One transaction per line"
commit 6f33e8b1ff9b27b6a0f518afc11401afc809a879
Author: Giuseppe Foti <foti.giuseppe at gmail.com>
Date: Wed Oct 6 08:01:41 2021 +0200
Translation update by Giuseppe Foti <foti.giuseppe at gmail.com> using Weblate
po/it.po: 100.0% (5363 of 5363 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Italian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/it/
Co-authored-by: Giuseppe Foti <foti.giuseppe at gmail.com>
diff --git a/po/it.po b/po/it.po
index cd8b65454..c6ba570f4 100644
--- a/po/it.po
+++ b/po/it.po
@@ -52,10 +52,10 @@
msgid ""
msgstr ""
"Project-Id-Version: GnuCash 4.7-pre2\n"
-"Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug.cgi?"
-"product=GnuCash&component=Translations\n"
+"Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug."
+"cgi?product=GnuCash&component=Translations\n"
"POT-Creation-Date: 2021-09-20 22:29+0200\n"
-"PO-Revision-Date: 2021-08-30 15:32+0000\n"
+"PO-Revision-Date: 2021-10-02 06:36+0000\n"
"Last-Translator: Giuseppe Foti <foti.giuseppe at gmail.com>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/gnucash/gnucash/"
"it/>\n"
@@ -64,7 +64,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.8.1-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: bindings/guile/commodity-table.scm:44
msgid "ALL NON-CURRENCY"
@@ -4415,6 +4415,10 @@ msgid ""
"\n"
"Move the subaccounts or delete them before attempting to delete this account."
msgstr ""
+"Il conto «%s» ha più di un sottoconto.\n"
+"\n"
+"Sposta i sottoconti o eliminali prima di tentare l'eliminazione di questo "
+"conto."
#: gnucash/gnome/gnc-plugin-page-account-tree.c:1728
#, c-format
@@ -10477,16 +10481,12 @@ msgid "To find the last stable version, please refer to {1}"
msgstr "Per ottenere l'ultima versione stabile, fare riferimento a {1}"
#: gnucash/gnucash-core-app.cpp:102
-#, fuzzy
-#| msgid "Load report configuration"
msgid "Loading system scm configuration..."
-msgstr "Carica configurazione del resoconto"
+msgstr "Sto caricando la configurazione scm di sistema..."
#: gnucash/gnucash-core-app.cpp:114
-#, fuzzy
-#| msgid "Load report configuration"
msgid "Loading user scm configuration..."
-msgstr "Carica configurazione del resoconto"
+msgstr "Sto caricando la configurazione scm dell'utente..."
#: gnucash/gnucash-core-app.cpp:223
msgid "- GnuCash, accounting for personal and small business finance"
@@ -18706,22 +18706,16 @@ msgid "R_emind in advance"
msgstr "_Ricorda in anticipo di"
#: gnucash/gtkbuilder/dialog-sx.glade:724
-#, fuzzy
-#| msgid "_Review created transactions"
msgid "Re_view created transactions"
msgstr "_Controlla le transazioni create"
#: gnucash/gtkbuilder/dialog-sx.glade:728
-#, fuzzy
-#| msgid ""
-#| "Set \"Review Created Transactions\" as the default for the \"since last "
-#| "run\" dialog."
msgid ""
"Set 'Review created transactions' as the default in the \"since last run\" "
"dialog."
msgstr ""
-"Imposta «Controlla le transazioni create» come impostazione predefinita per "
-"la finestra «dall'ultimo avvio»."
+"Imposta «Controlla le transazioni create» come impostazione predefinita "
+"nella finestra «dall'ultimo avvio»."
#: gnucash/gtkbuilder/dialog-sx.glade:765
msgid "Edit Scheduled Transaction"
@@ -19968,31 +19962,6 @@ msgstr ""
#. See https://wiki.gnucash.org/wiki/AqBanking for the used terminology and replace the link, if a localized version exists.
#: gnucash/import-export/aqb/assistant-ab-initial.glade:47
-#, fuzzy
-#| msgid ""
-#| "The requirements for Online Banking vary between the different supported "
-#| "AqBanking backends, but usually you will need:\n"
-#| "* Your bank needs to grant you online access. See on their website or ask "
-#| "their customer service for how to obtain it.\n"
-#| "They should also tell you:\n"
-#| "* Your user ID that identifies you to their server, often your base "
-#| "account number;\n"
-#| "* The URL of their Online Banking server;\n"
-#| "* In some cases the routing number of your bank's branch is useful in "
-#| "this assistant;\n"
-#| "* Authentication methods vary by backend and choosen method:\n"
-#| " * FinTS PIN/TAN: Some methods require a specific gadget like a card "
-#| "reader or a mobile;\n"
-#| " * FinTS HBCI: You have to exchange the public parts of asymmetric keys "
-#| "with your bank (\"Ini-Letter\").\n"
-#| " * PayPal: registered email address, password, API signature;\n"
-#| "\n"
-#| "See https://wiki.gnucash.org/wiki/AqBanking for more details.\n"
-#| "\n"
-#| "Note: NO WARRANTIES FOR ANYTHING. Some banks run a poorly implemented "
-#| "Online Banking server. You should not rely on time-critical transfers "
-#| "through Online Banking, because sometimes the bank does not give you "
-#| "correct feedback when a transfer is rejected."
msgid ""
"The requirements for Online Banking vary between the different supported "
"AqBanking backends, but usually you will need:\n"
@@ -22393,16 +22362,13 @@ msgid "Unknown OFX investment account"
msgstr "Conto investimento OFX sconosciuto"
#: gnucash/import-export/ofx/gnc-ofx-import.c:1201
-#, fuzzy, c-format
-#| msgid ""
-#| "OFX file '%s' imported, %d transactions processed, no transactions to "
-#| "match"
+#, c-format
msgid ""
"OFX file '%s', imported transactions for account '%s'\n"
"%d transactions processed, no transactions to match"
msgstr ""
-"File OFX '%s' importato, processate %d transazioni, nessuna transazione da "
-"incrociare"
+"File OFX «%s», transazioni importate per il conto «%s», \n"
+"processate %d transazioni, nessuna transazione da incrociare"
#: gnucash/import-export/ofx/gnc-ofx-import.c:1302
msgid "Open/Quicken Financial Exchange file (*.ofx, *.qfx)"
@@ -28317,6 +28283,8 @@ msgstr "Totali periodo"
msgid ""
"* Amounts denoted thus are derived from, and do not match the transaction."
msgstr ""
+"* Gli importi così indicati sono derivati e non corrispondono alla "
+"transazione."
#: gnucash/report/reports/standard/new-owner-report.scm:868
#: gnucash/report/reports/standard/owner-report.scm:535
commit ad7bffaae1de20fd975097203ac4a5b2e1e2460d
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Thu Oct 7 19:21:00 2021 +0800
Run test-core-utils and test-create-account properly
diff --git a/bindings/guile/test/CMakeLists.txt b/bindings/guile/test/CMakeLists.txt
index 33c3a974a..904f9baca 100644
--- a/bindings/guile/test/CMakeLists.txt
+++ b/bindings/guile/test/CMakeLists.txt
@@ -53,6 +53,7 @@ gnc_add_scheme_test_targets(scm-test-engine
OUTPUT_DIR "tests"
DEPENDS "${GUILE_DEPENDS};scm-test-engine-extras")
+gnc_add_scheme_tests("${bindings_test_SCHEME}")
add_dependencies(check scm-test-engine)
gnc_add_scheme_tests("${engine_test_SCHEME}")
commit 34a4b652c1c2849624713e9f70bf7b8460146797
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Thu Oct 7 19:20:32 2021 +0800
[test-core-utils.scm] fix - N_ is no longer a macro
diff --git a/bindings/guile/test/test-core-utils.scm b/bindings/guile/test/test-core-utils.scm
index bad12914e..5de9dd0ff 100644
--- a/bindings/guile/test/test-core-utils.scm
+++ b/bindings/guile/test/test-core-utils.scm
@@ -2,16 +2,16 @@
(setenv "GNC_UNINSTALLED" "1")
(use-modules (gnucash core-utils))
-(if (macro? (module-ref (current-module) 'N_))
- (display "Macro N_ defined\n")
+(if (procedure? (module-ref (current-module) 'N_))
+ (display "N_ defined\n")
(begin
- (display "Failed - macro N_ not defined\n")
+ (display "Failed - N_ not defined\n")
(set! exit-code -1)))
(if (string=? (N_ "foobar") "foobar")
- (display "Macro N_ works properly\n")
+ (display "N_ works properly\n")
(begin
- (display "Failed - macro N_ doesn't work\n")
+ (display "Failed - N_ doesn't work\n")
(set! exit-code -1)))
(exit exit-code)
commit 7b9ad5139064f64aa27f3709d7a58c2b5186692b
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Oct 4 21:34:33 2021 +0800
[import-main-matcher] show destination acct for auto-match
diff --git a/gnucash/import-export/import-main-matcher.c b/gnucash/import-export/import-main-matcher.c
index e6c9df361..0c532b9fc 100644
--- a/gnucash/import-export/import-main-matcher.c
+++ b/gnucash/import-export/import-main-matcher.c
@@ -40,6 +40,7 @@
#include "import-main-matcher.h"
#include "dialog-utils.h"
+#include "gnc-glib-utils.h"
#include "gnc-ui.h"
#include "gnc-ui-util.h"
#include "gnc-engine.h"
@@ -1421,6 +1422,29 @@ update_child_row (GNCImportMatchInfo *sel_match, GtkTreeModel *model, GtkTreeIte
g_free (text);
}
+static gchar *
+get_peer_acct_names (Split *split)
+{
+ GList *names = NULL, *accounts_seen = NULL;
+ gchar *retval, *name;
+ for (GList *n = xaccTransGetSplitList (xaccSplitGetParent (split)); n; n = n->next)
+ {
+ Account *account = xaccSplitGetAccount (n->data);
+ if ((n->data == split) ||
+ (xaccAccountGetType (account) == ACCT_TYPE_TRADING) ||
+ (g_list_find (accounts_seen, account)))
+ continue;
+ name = gnc_account_get_full_name (account);
+ names = g_list_prepend (names, g_strdup_printf ("\"%s\"", name));
+ accounts_seen = g_list_prepend (accounts_seen, account);
+ g_free (name);
+ }
+ retval = gnc_g_list_stringjoin (names, ", ");
+ g_list_free_full (names, g_free);
+ g_list_free (accounts_seen);
+ return retval;
+}
+
static void
refresh_model_row (GNCImportMainMatcher *gui,
GtkTreeModel *model,
@@ -1550,15 +1574,19 @@ refresh_model_row (GNCImportMainMatcher *gui,
if (sel_match)
{
+ gchar *full_names = get_peer_acct_names (sel_match->split);
color = get_required_color (int_not_required_class);
if (gnc_import_TransInfo_get_match_selected_manually (info))
{
- ro_text = _("Reconcile (manual) match");
+ text = g_strdup_printf (_("Reconcile (manual) match to %s"),
+ full_names);
}
else
{
- ro_text = _("Reconcile (auto) match");
+ text = g_strdup_printf (_("Reconcile (auto) match to %s"),
+ full_names);
}
+ g_free (full_names);
update_child_row (sel_match, model, iter);
}
else
@@ -1576,15 +1604,19 @@ refresh_model_row (GNCImportMainMatcher *gui,
if (sel_match)
{
+ gchar *full_names = get_peer_acct_names (sel_match->split);
color = get_required_color (int_not_required_class);
if (gnc_import_TransInfo_get_match_selected_manually (info))
{
- ro_text = _("Update and reconcile (manual) match");
+ text = g_strdup_printf (_("Update and reconcile (manual) match to %s"),
+ full_names);
}
else
{
- ro_text = _("Update and reconcile (auto) match");
+ text = g_strdup_printf (_("Update and reconcile (auto) match to %s"),
+ full_names);
}
+ g_free (full_names);
update_child_row (sel_match, model, iter);
}
else
commit 3f501bb31b78aebcc47143553f061837d03d26a2
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sun Oct 3 21:16:56 2021 +0800
[gnc-gnome-utils] fix memory leak
from 9fb9868b
diff --git a/gnucash/gnome-utils/gnc-gnome-utils.c b/gnucash/gnome-utils/gnc-gnome-utils.c
index 6a44d38cf..2c3cfac02 100644
--- a/gnucash/gnome-utils/gnc-gnome-utils.c
+++ b/gnucash/gnome-utils/gnc-gnome-utils.c
@@ -268,7 +268,7 @@ gnc_gnome_help_yelp_anchor_fix (GtkWindow *parent, const char *file_name, const
gchar *filename = g_build_filename (help_path, *langs, help_file, NULL);
if (g_file_test (filename, G_FILE_TEST_EXISTS))
{
- full_path = g_strdup (filename);
+ full_path = filename;
break;
}
g_free (filename);
commit 8b82970c63743ea44f1f42b76bc66990c50bf555
Author: Christian Wehling <christian.wehling at web.de>
Date: Fri Oct 1 17:57:12 2021 +0200
Removed spaces at the end of translatable strings.
diff --git a/gnucash/gtkbuilder/dialog-commodity.glade b/gnucash/gtkbuilder/dialog-commodity.glade
index 4084c8a6e..3a130e972 100644
--- a/gnucash/gtkbuilder/dialog-commodity.glade
+++ b/gnucash/gtkbuilder/dialog-commodity.glade
@@ -143,8 +143,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_markup">Enter the ticker symbol for the commodity (e.g. CSCO or AAPL). If you are retrieving quotes online, this field must exactly match the ticker symbol used by the quote source (including case). </property>
- <property name="tooltip_text" translatable="yes">Enter the ticker symbol for the commodity (e.g. CSCO or AAPL). If you are retrieving quotes online, this field must exactly match the ticker symbol used by the quote source (including case). </property>
+ <property name="tooltip_markup">Enter the ticker symbol for the commodity (e.g. CSCO or AAPL). If you are retrieving quotes online, this field must exactly match the ticker symbol used by the quote source (including case).</property>
+ <property name="tooltip_text" translatable="yes">Enter the ticker symbol for the commodity (e.g. CSCO or AAPL). If you are retrieving quotes online, this field must exactly match the ticker symbol used by the quote source (including case).</property>
<property name="invisible_char">â</property>
<property name="activates_default">True</property>
<property name="primary_icon_activatable">False</property>
@@ -637,7 +637,7 @@
<object class="GtkDialog" id="security_selector_dialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Select security/currency </property>
+ <property name="title" translatable="yes">Select security/currency</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
diff --git a/gnucash/gtkbuilder/dialog-sx.glade b/gnucash/gtkbuilder/dialog-sx.glade
index 796a20b29..b5269df58 100644
--- a/gnucash/gtkbuilder/dialog-sx.glade
+++ b/gnucash/gtkbuilder/dialog-sx.glade
@@ -671,7 +671,7 @@
</child>
<child>
<object class="GtkCheckButton" id="pref/dialogs.sxs.transaction-editor/notify">
- <property name="label" translatable="yes">_Notify before transactions are created </property>
+ <property name="label" translatable="yes">_Notify before transactions are created</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
diff --git a/gnucash/register/ledger-core/gncEntryLedgerModel.c b/gnucash/register/ledger-core/gncEntryLedgerModel.c
index 81aa10a36..15cd3f2f9 100644
--- a/gnucash/register/ledger-core/gncEntryLedgerModel.c
+++ b/gnucash/register/ledger-core/gncEntryLedgerModel.c
@@ -759,7 +759,7 @@ static char * get_value_help (VirtualLocation virt_loc, gpointer user_data)
help = gnc_table_get_entry (ledger->table, virt_loc);
if (!help || *help == '\0')
- help = _("The subtotal value of this entry ");
+ help = _("The subtotal value of this entry");
return g_strdup (help);
}
diff --git a/gnucash/report/trep-engine.scm b/gnucash/report/trep-engine.scm
index fb0ea735b..93fbe6352 100644
--- a/gnucash/report/trep-engine.scm
+++ b/gnucash/report/trep-engine.scm
@@ -586,7 +586,7 @@ blank, which will disable the filter.")
"i2"
(G_ "By default the transaction filter will search substring only. Set this to true to \
enable full POSIX regular expressions capabilities. '#work|#family' will match both \
-tags within description, notes or memo. ")
+tags within description, notes or memo.")
#f))
(gnc:register-trep-option
commit d0d4d95e3ba01b13069df9fba2cfd30ca1336cd9
Author: jean <27791933+jeanlaroche at users.noreply.github.com>
Date: Wed Sep 22 23:53:46 2021 -0700
Change the wording of the dialog when no new transactions need to be reviewed
diff --git a/gnucash/import-export/ofx/gnc-ofx-import.c b/gnucash/import-export/ofx/gnc-ofx-import.c
index f75952345..c7de890bd 100644
--- a/gnucash/import-export/ofx/gnc-ofx-import.c
+++ b/gnucash/import-export/ofx/gnc-ofx-import.c
@@ -1199,7 +1199,7 @@ runMatcher(ofx_info* info, char * selected_filename, gboolean go_to_next_file)
if (info->num_trans_processed)
{
gchar* acct_name = gnc_get_account_name_for_register (first_account);
- gnc_info_dialog (parent, _("OFX file '%s', imported transactions for account '%s'\n%d transactions processed, no transactions to match"),
+ gnc_info_dialog (parent, _("While importing transactions from OFX file '%s' into account '%s', found %d previously imported transactions, no new transactions."),
selected_filename, acct_name, info->num_trans_processed);
g_free (acct_name);
gnc_ofx_match_done (NULL,info);
Summary of changes:
bindings/guile/core-utils.scm | 15 ++++
bindings/guile/gnc-engine-guile.c | 9 +--
bindings/guile/test/CMakeLists.txt | 10 ++-
bindings/guile/test/test-core-utils.scm | 56 +++++++++++---
gnucash/gnome-utils/gnc-gnome-utils.c | 2 +-
gnucash/gnome/dialog-custom-report.c | 88 ++++++++++++++--------
gnucash/gnome/dialog-tax-info.c | 14 ++--
gnucash/gnome/reconcile-view.c | 15 ++--
gnucash/gtkbuilder/dialog-commodity.glade | 6 +-
gnucash/gtkbuilder/dialog-custom-report.glade | 1 +
gnucash/gtkbuilder/dialog-sx.glade | 2 +-
gnucash/import-export/import-main-matcher.c | 40 +++++++++-
gnucash/import-export/ofx/gnc-ofx-import.c | 10 ++-
gnucash/register/ledger-core/gncEntryLedgerModel.c | 2 +-
.../register/ledger-core/split-register-model.c | 34 ++++-----
.../report/reports/standard/ifrs-cost-basis.scm | 9 +--
gnucash/report/reports/standard/lot-viewer.scm | 4 +-
.../report/reports/standard/test/test-register.scm | 3 +-
.../reports/standard/test/test-transaction.scm | 6 +-
gnucash/report/trep-engine.scm | 2 +-
libgnucash/engine/cashobjects.c | 4 +-
po/POTFILES.skip | 3 +
po/it.po | 66 +++++-----------
po/zh_CN.po | 45 ++++++-----
24 files changed, 257 insertions(+), 189 deletions(-)
More information about the gnucash-changes
mailing list