gnucash master: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Mon Aug 29 20:03:29 EDT 2022
Updated via https://github.com/Gnucash/gnucash/commit/92915486 (commit)
via https://github.com/Gnucash/gnucash/commit/0d0ab002 (commit)
via https://github.com/Gnucash/gnucash/commit/70abdbd1 (commit)
via https://github.com/Gnucash/gnucash/commit/6d15e924 (commit)
via https://github.com/Gnucash/gnucash/commit/44915861 (commit)
via https://github.com/Gnucash/gnucash/commit/d98b1767 (commit)
via https://github.com/Gnucash/gnucash/commit/4e980567 (commit)
from https://github.com/Gnucash/gnucash/commit/d5e93204 (commit)
commit 92915486677f953abe3406d0cbd22a267c811b58
Merge: d5e93204e 0d0ab002f
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Aug 29 14:59:18 2022 -0700
Merge branch 'maint'
commit 0d0ab002f5c817253940b96532cdd1847314976c
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Aug 29 12:47:38 2022 -0700
Fix use-after-free crash in gnc_set_busy_cursor.
diff --git a/gnucash/gnome-utils/cursors.c b/gnucash/gnome-utils/cursors.c
index e787a0525..5a626a141 100644
--- a/gnucash/gnome-utils/cursors.c
+++ b/gnucash/gnome-utils/cursors.c
@@ -83,9 +83,16 @@ gnc_set_busy_cursor (GtkWidget *w, gboolean update_now)
gnc_ui_set_cursor (gtk_widget_get_window(w), GNC_CURSOR_BUSY, update_now);
else
{
- GList *containerstop, *node;
-
- for (containerstop = node = gtk_window_list_toplevels (); node; node = node->next)
+ /* gnc_ui_set_cursor runs the event loop and if there's an
+ * idle waiting that destroys a toplevel further down the list
+ * then we'll get a use after free crash unless we have our
+ * own reference, so take a reference to all of the toplevels
+ * and release them all after the loop finishes.
+ */
+ GList *containerstop = gtk_window_list_toplevels (), *node;
+ g_list_foreach (containerstop, (GFunc)g_object_ref, NULL);
+
+ for (node = containerstop; node; node = node->next)
{
w = node->data;
@@ -94,7 +101,7 @@ gnc_set_busy_cursor (GtkWidget *w, gboolean update_now)
gnc_ui_set_cursor (gtk_widget_get_window(w), GNC_CURSOR_BUSY, update_now);
}
- g_list_free (containerstop);
+ g_list_free_full (containerstop, (GDestroyNotify)g_object_unref);
}
}
commit 70abdbd1aed80815978694127ffb3b885a216186
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Aug 29 13:48:57 2022 +0800
[assistant-stock-transaction] send stock_amt | stock_val fieldmask
because the stock_value may be FieldMask::DISABLED with a stock split
in a short position. The | operator ensures FieldMask::ENABLED_CREDIT
is used, which negates the stock amount.
diff --git a/gnucash/gnome/assistant-stock-transaction.cpp b/gnucash/gnome/assistant-stock-transaction.cpp
index fc1928594..798757beb 100644
--- a/gnucash/gnome/assistant-stock-transaction.cpp
+++ b/gnucash/gnome/assistant-stock-transaction.cpp
@@ -1005,7 +1005,7 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
auto date = gnc_date_edit_get_date (GNC_DATE_EDIT (info->date_edit));
xaccTransSetDatePostedSecsNormalized (trans, date);
- create_split (trans, info->txn_type->stock_value,
+ create_split (trans, info->txn_type->stock_amount | info->txn_type->stock_value,
NC_ ("Stock Assistant: Action field", "Stock"),
info->acct, account_commits, info->stock_memo_edit,
info->txn_type->stock_amount != FieldMask::DISABLED ? info->stock_amount_edit : nullptr,
commit 6d15e924dba01e74e73b107c00ef5a040d36d8f5
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Aug 29 13:35:13 2022 +0800
[assistant-stock-transaction] rename capital gains to capital gain
because in each stock transaction there's a singular capital gain or loss
diff --git a/gnucash/gnome/assistant-stock-transaction.cpp b/gnucash/gnome/assistant-stock-transaction.cpp
index 3875fb434..fc1928594 100644
--- a/gnucash/gnome/assistant-stock-transaction.cpp
+++ b/gnucash/gnome/assistant-stock-transaction.cpp
@@ -180,9 +180,9 @@ static const TxnTypeVec long_types
FieldMask::DISABLED, // dividend_amt
FieldMask::ENABLED_CREDIT | FieldMask::ALLOW_ZERO | FieldMask::ALLOW_NEGATIVE, // capgains_amt
// Translators: this is a stock transaction describing sale of
- // stock, and recording capital gains/loss
+ // stock, and recording capital gain/loss
N_("Sell"),
- N_("Selling stock, and record capital gains/loss")
+ N_("Selling stock, and record capital gain/loss")
},
{
FieldMask::DISABLED, // stock_amt
@@ -314,7 +314,7 @@ static const TxnTypeVec short_types
FieldMask::DISABLED, // dividend_amt
FieldMask::ENABLED_DEBIT | FieldMask::ALLOW_ZERO | FieldMask::ALLOW_NEGATIVE, // capg_amt
// Translators: this is a stock transaction describing cover
- // buying stock, and recording capital gains/loss
+ // buying stock, and recording capital gain/loss
N_("Buy to cover short"),
N_("Buy back stock to cover short and record capital gain/loss")
},
@@ -1041,14 +1041,14 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
if (info->txn_type->capgains_value != FieldMask::DISABLED)
{
create_split (trans, info->txn_type->capgains_value,
- NC_ ("Stock Assistant: Action field", "Capital Gains"),
+ NC_ ("Stock Assistant: Action field", "Capital Gain"),
gas_account (info->capgains_account),
account_commits, info->capgains_memo_edit,
info->capgains_value, info->capgains_value, false);
create_split (trans,
info->txn_type->capgains_value ^ (FieldMask::ENABLED_CREDIT | FieldMask::ENABLED_DEBIT),
- NC_ ("Stock Assistant: Action field", "Capital Gains"),
+ NC_ ("Stock Assistant: Action field", "Capital Gain"),
info->acct, account_commits, info->capgains_memo_edit,
nullptr, info->capgains_value, false);
}
commit 44915861c83c67979cf8d630f4f824dc1e40776b
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Aug 29 13:34:39 2022 +0800
[assistant-stock-transaction] rename "Cover buy" to "Buy to cover short"
more accurate
diff --git a/gnucash/gnome/assistant-stock-transaction.cpp b/gnucash/gnome/assistant-stock-transaction.cpp
index 5763143ba..3875fb434 100644
--- a/gnucash/gnome/assistant-stock-transaction.cpp
+++ b/gnucash/gnome/assistant-stock-transaction.cpp
@@ -315,8 +315,8 @@ static const TxnTypeVec short_types
FieldMask::ENABLED_DEBIT | FieldMask::ALLOW_ZERO | FieldMask::ALLOW_NEGATIVE, // capg_amt
// Translators: this is a stock transaction describing cover
// buying stock, and recording capital gains/loss
- N_("Cover buy"),
- N_("Cover buying stock, and record capital gains/loss")
+ N_("Buy to cover short"),
+ N_("Buy back stock to cover short and record capital gain/loss")
},
{
FieldMask::DISABLED, // stock_amt
commit d98b1767c031fc96073e029c1c2860446655c0da
Author: Vik <xasertop at gmail.com>
Date: Sat Aug 27 15:17:19 2022 +0200
Translation update by Vik <xasertop at gmail.com> using Weblate
po/ru.po: 77.9% (4210 of 5400 strings; 815 fuzzy)
223 failing checks (4.1%)
Translation: GnuCash/Program (Russian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/ru/
Co-authored-by: Vik <xasertop at gmail.com>
diff --git a/po/ru.po b/po/ru.po
index 623523d12..e1a5c2c68 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -14,14 +14,15 @@
# Artem <KovalevArtem.ru at gmail.com>, 2021.
# ÐÐÐ69Ð <weblate at mah69k.net>, 2022.
# Nikita Samoilov <n.p.samoilov at gmail.com>, 2022.
+# Vik <xasertop at gmail.com>, 2022.
msgid ""
msgstr ""
"Project-Id-Version: GnuCash 4.11-2\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: 2022-07-22 06:33+0200\n"
-"PO-Revision-Date: 2022-06-27 17:20+0000\n"
-"Last-Translator: Nikita Samoilov <n.p.samoilov at gmail.com>\n"
+"PO-Revision-Date: 2022-08-27 13:17+0000\n"
+"Last-Translator: Vik <xasertop at gmail.com>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/gnucash/gnucash/"
"ru/>\n"
"Language: ru\n"
@@ -30,7 +31,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
-"X-Generator: Weblate 4.13.1-dev\n"
+"X-Generator: Weblate 4.14.1-dev\n"
"X-Source-Language: C\n"
# For the translation in '../borrowed/goffice/go-charmap-sel.c' see
@@ -431,7 +432,7 @@ msgstr "ÐÐ°Ð¿Ð°Ð´Ð½Ð°Ñ (Windows-1252)"
#: borrowed/goffice/go-charmap-sel.c:441
msgid "Locale: "
-msgstr "ÐокалÑ:"
+msgstr "ÐокалÑ: "
#: borrowed/goffice/go-charmap-sel.c:476
msgid "Conversion Direction"
@@ -465,8 +466,8 @@ msgid ""
"at https://wiki.gnucash.org/wiki/Mailing_Lists"
msgstr ""
"СпиÑки ÑаÑÑÑлки ÑвлÑÑÑÑÑ Ð¿ÑедпоÑÑиÑелÑной ÑоÑмой коммÑникаÑии в ÑообÑеÑÑве "
-"GnuCash. ÐбÑÑÐ²Ð»ÐµÐ½Ð¸Ñ Ð¾ новÑÑ
вÑпÑÑкаÑ
, гÑÑппаÑ
полÑзоваÑелей и Ñ.д. Ñм. в "
-"ÑаблиÑе https://wiki.gnucash.org/wiki/Mailing_Lists"
+"GnuCash. ÐбÑÑÐ²Ð»ÐµÐ½Ð¸Ñ Ð¾ новÑÑ
вÑпÑÑкаÑ
, гÑÑÐ¿Ð¿Ñ Ð¿Ð¾Ð»ÑзоваÑелей и Ñ. д. ÑмоÑÑиÑе "
+"в ÑаблиÑе на https://wiki.gnucash.org/wiki/Mailing_Lists"
#: doc/tip_of_the_day.list.c:11
msgid ""
@@ -558,12 +559,12 @@ msgid ""
"select \"View\" in the menu bar and check \"Double Line\" or\n"
"check \"Double Line Mode\" in Preferences:Register Defaults."
msgstr ""
-"ÐÐ°Ð¶Ð´Ð°Ñ Ð¿Ñоводка Ð¸Ð¼ÐµÐµÑ Ð¿Ð¾Ð»Ðµ \"ÐÑимеÑаниÑ\", кÑда можно помеÑÑиÑÑ Ð¿Ð¾Ð»ÐµÐ·Ð½ÑÑ "
-"инÑоÑмаÑиÑ.\n"
+"У каждой пÑоводки еÑÑÑ Ð¿Ð¾Ð»Ðµ \"ÐÑимеÑаниÑ\", кÑда Ð²Ñ Ð¼Ð¾Ð¶ÐµÑе помеÑÑиÑÑ "
+"полезнÑÑ Ð¸Ð½ÑоÑмаÑиÑ. \n"
"\n"
"ЧÑÐ¾Ð±Ñ ÑделаÑÑ ÐµÐ³Ð¾ видимÑм\n"
"вÑбеÑиÑе \"Ðид\" в ÑÑÑоке Ð¼ÐµÐ½Ñ Ð¸ ÑÑÑановиÑе Ñлажок \"Ðве ÑÑÑоки\" или\n"
-"ÑÑÑановиÑе Ñлажок \"ÐвÑÑÑÑоÑнÑй Ñежим\" в ÐаÑÑÑойки:ÐаÑÑÑойки жÑÑнала."
+"Ñлажок \"ÐвÑÑÑÑоÑнÑй Ñежим\" в ÐаÑÑÑойки: ÐаÑÑÑойки жÑÑнала."
#: doc/tip_of_the_day.list.c:50
msgid ""
@@ -796,7 +797,7 @@ msgstr[2] ""
#. Translators: Run the assistant in your language to see GTK's translation of the button labels.
#: gnucash/gnome/assistant-acct-period.c:371
-#, fuzzy, c-format
+#, c-format
msgid ""
"You have asked for a book to be created. This book will contain all "
"transactions up to midnight %s (for a total of %d transactions spread over "
@@ -808,7 +809,7 @@ msgstr ""
"ÐÑ Ð·Ð°Ð¿ÑоÑили Ñоздание новой книги. ÐÑа книга бÑÐ´ÐµÑ ÑодеÑжаÑÑ Ð²Ñе пÑоводки "
"вплоÑÑ Ð´Ð¾ полÑноÑи %s (вÑего %d пÑоводок, ÑаÑпÑеделеннÑÑ
по %d ÑÑеÑам).\n"
"\n"
-"ÐнеÑиÑе пÑавки в название и замеÑки или ÐажмиÑе \"ÐпеÑÑд\" Ð´Ð»Ñ Ð¿ÑодолжениÑ.\n"
+"ÐнеÑиÑе пÑавки в название и замеÑки или нажмиÑе \"ÐпеÑÑд\" Ð´Ð»Ñ Ð¿ÑодолжениÑ.\n"
"ÐажмиÑе \"Ðазад\" Ð´Ð»Ñ ÐºÐ¾ÑÑекÑиÑовки Ð´Ð°Ñ Ð¸Ð»Ð¸ \"ÐÑмена\"."
#: gnucash/gnome/assistant-acct-period.c:388
@@ -817,12 +818,12 @@ msgid "Period %s - %s"
msgstr "ÐеÑиод Ñ %s по %s"
#: gnucash/gnome/assistant-acct-period.c:406
-#, fuzzy, c-format
+#, c-format
msgid ""
"The book will be created with the title %s when you click on \"Apply\". "
"Click on \"Back\" to adjust, or \"Cancel\" to not create any book."
msgstr ""
-"Ðнига бÑÐ´ÐµÑ Ñоздана Ñ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸ÐµÐ¼ %s когда Ð²Ñ Ð½Ð°Ð¶Ð¼ÐµÑе \"ÐÑимениÑÑ\". ÐажмиÑе "
+"Ðнига бÑÐ´ÐµÑ Ñоздана Ñ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸ÐµÐ¼ %s, когда Ð²Ñ Ð½Ð°Ð¶Ð¼ÐµÑе \"ÐÑимениÑÑ\". ÐажмиÑе "
"\"Ðазад\" Ð´Ð»Ñ Ð²Ð½ÐµÑÐµÐ½Ð¸Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ð¹ или \"ÐÑмена\" Ð´Ð»Ñ Ð¾ÑÐ¼ÐµÐ½Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ ÐºÐ½Ð¸Ð³Ð¸."
#: gnucash/gnome/assistant-acct-period.c:525
@@ -1086,7 +1087,6 @@ msgstr "ÐепоненÑнÑй плаÑÑж"
#: gnucash/gnome/assistant-stock-split.c:391
#: gnucash/gnome-utils/gnc-tree-model-split-reg.c:2946
#: gnucash/register/ledger-core/split-register.c:2639
-#, fuzzy
msgctxt "Action Column"
msgid "Split"
msgstr "РазделиÑÑ"
commit 4e98056782a116a755510ebf47a666abcd70e1b0
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Aug 27 22:22:35 2022 +0800
Bug 798598 - Selecting a line in a Vendor Credit Note changes display of Subtotal cell to 0.00
Because some more ledger types don't have discounts.
diff --git a/gnucash/register/ledger-core/gncEntryLedger.c b/gnucash/register/ledger-core/gncEntryLedger.c
index 6bcfb8d0c..11266c2e4 100644
--- a/gnucash/register/ledger-core/gncEntryLedger.c
+++ b/gnucash/register/ledger-core/gncEntryLedger.c
@@ -720,11 +720,16 @@ gnc_entry_ledger_compute_value (GncEntryLedger *ledger,
disc_type = gnc_entry_ledger_get_type (ledger, ENTRY_DISTYPE_CELL);
disc_how = gnc_entry_ledger_get_type (ledger, ENTRY_DISHOW_CELL);
- /* Bills and exp-vouchers don't have discounts */
+ /* Some ledger types (see full list in gnc_entry_ledger_set_cells)
+ don't have discounts */
if (ledger->type == GNCENTRY_BILL_ENTRY ||
- ledger->type == GNCENTRY_BILL_VIEWER ||
- ledger->type == GNCENTRY_EXPVOUCHER_ENTRY ||
- ledger->type == GNCENTRY_EXPVOUCHER_VIEWER)
+ ledger->type == GNCENTRY_BILL_VIEWER ||
+ ledger->type == GNCENTRY_VEND_CREDIT_NOTE_ENTRY ||
+ ledger->type == GNCENTRY_VEND_CREDIT_NOTE_VIEWER ||
+ ledger->type == GNCENTRY_EXPVOUCHER_ENTRY ||
+ ledger->type == GNCENTRY_EXPVOUCHER_VIEWER ||
+ ledger->type == GNCENTRY_EMPL_CREDIT_NOTE_ENTRY ||
+ ledger->type == GNCENTRY_EMPL_CREDIT_NOTE_VIEWER)
{
g_assert (gnc_numeric_zero_p (discount));
disc_type = GNC_AMT_TYPE_VALUE;
Summary of changes:
gnucash/gnome-utils/cursors.c | 15 +++++++++----
gnucash/gnome/assistant-stock-transaction.cpp | 16 +++++++-------
gnucash/register/ledger-core/gncEntryLedger.c | 13 +++++++----
po/ru.po | 32 +++++++++++++--------------
4 files changed, 44 insertions(+), 32 deletions(-)
More information about the gnucash-changes
mailing list