gnucash master: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Fri Oct 1 11:42:03 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/d9f918f4 (commit)
via https://github.com/Gnucash/gnucash/commit/c77aac2b (commit)
via https://github.com/Gnucash/gnucash/commit/e64bcfe6 (commit)
via https://github.com/Gnucash/gnucash/commit/9a465fc3 (commit)
via https://github.com/Gnucash/gnucash/commit/64576f7d (commit)
via https://github.com/Gnucash/gnucash/commit/71722c46 (commit)
via https://github.com/Gnucash/gnucash/commit/28501779 (commit)
via https://github.com/Gnucash/gnucash/commit/29e7b07e (commit)
via https://github.com/Gnucash/gnucash/commit/d561cc61 (commit)
via https://github.com/Gnucash/gnucash/commit/96db26cc (commit)
via https://github.com/Gnucash/gnucash/commit/8bfa5a63 (commit)
via https://github.com/Gnucash/gnucash/commit/c96024ab (commit)
via https://github.com/Gnucash/gnucash/commit/dee4f5e5 (commit)
via https://github.com/Gnucash/gnucash/commit/a84891a4 (commit)
via https://github.com/Gnucash/gnucash/commit/caa6bcd1 (commit)
via https://github.com/Gnucash/gnucash/commit/bdb5f3d8 (commit)
via https://github.com/Gnucash/gnucash/commit/b7001b52 (commit)
via https://github.com/Gnucash/gnucash/commit/10c1223d (commit)
via https://github.com/Gnucash/gnucash/commit/2a7566cc (commit)
via https://github.com/Gnucash/gnucash/commit/cb4d9529 (commit)
via https://github.com/Gnucash/gnucash/commit/8bfcc982 (commit)
via https://github.com/Gnucash/gnucash/commit/d82bb7b8 (commit)
via https://github.com/Gnucash/gnucash/commit/b8c9b1a6 (commit)
from https://github.com/Gnucash/gnucash/commit/67191203 (commit)
commit d9f918f40ccc6a973e8a37a3e37f2958c594ceae
Author: Geert Janssens <geert at kobaltwit.be>
Date: Fri Oct 1 17:41:48 2021 +0200
Obsolete preferences that were deprecated/migrated in the 4.x cycle
diff --git a/gnucash/gschemas/pref_transformations.xml b/gnucash/gschemas/pref_transformations.xml
index 3710df5c3..2961c6905 100644
--- a/gnucash/gschemas/pref_transformations.xml
+++ b/gnucash/gschemas/pref_transformations.xml
@@ -1373,4 +1373,783 @@
</release>
+<release version="5000">
+<obsolete old-path="org.gnucash.general"
+ old-key="prefs-version"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="save-window-geometry"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="account-separator"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="assoc-head"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="file-compression"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="autosave-show-explanation"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="autosave-interval-minutes"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="save-on-close-expires"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="save-on-close-wait-time"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="negative-in-red"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="auto-decimal-point"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="auto-decimal-places"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="force-price-decimal"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="retain-type-never"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="retain-type-days"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="retain-type-forever"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="retain-days"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="reversed-accounts-none"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="reversed-accounts-credit"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="reversed-accounts-incomeexpense"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="show-account-color"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="show-account-color-tabs"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="use-accounting-labels"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="tab-close-buttons"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="tab-width"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="tab-open-adjacent"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="currency-choice-locale"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="currency-choice-other"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="currency-other"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="clock-24h"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="date-format"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="date-completion-thisyear"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="date-completion-sliding"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="date-backmonths"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="grid-lines-horizontal"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="grid-lines-vertical"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="show-splash-screen"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="tab-position-top"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="tab-position-bottom"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="tab-position-left"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="tab-position-right"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="summarybar-position-top"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="summarybar-position-bottom"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="tab-next-recent"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="num-source"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="use-gnucash-color-theme"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="use-theme-colors"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="enter-moves-to-end"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="auto-raise-lists"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="tab-to-transfer-on-memorised"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="use-new-window"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="alternate-color-by-transaction"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="draw-horizontal-lines"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="draw-vertical-lines"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="future-after-blank-transaction"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="default-style-ledger"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="default-style-autoledger"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="default-style-journal"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="double-line-mode"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="show-leaf-account-names"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="show-extra-dates"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="show-extra-dates-on-selection"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="show-calendar-buttons"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="selection-to-blank-on-expand"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="max-transactions"/>
+
+<obsolete old-path="org.gnucash.general.register"
+ old-key="key-length"/>
+
+<obsolete old-path="org.gnucash.general.report"
+ old-key="use-new-window"/>
+
+<obsolete old-path="org.gnucash.general.report"
+ old-key="currency-choice-locale"/>
+
+<obsolete old-path="org.gnucash.general.report"
+ old-key="currency-choice-other"/>
+
+<obsolete old-path="org.gnucash.general.report"
+ old-key="currency-other"/>
+
+<obsolete old-path="org.gnucash.general.report"
+ old-key="default-zoom"/>
+
+<obsolete old-path="org.gnucash.general.report.pdf-export"
+ old-key="filename-format"/>
+
+<obsolete old-path="org.gnucash.general.report.pdf-export"
+ old-key="filename-date-format"/>
+
+<obsolete old-path="org.gnucash.dev"
+ old-key="allow-file-incompatibility"/>
+
+<obsolete old-path="org.gnucash.dialogs.account"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.imap-editor"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.find-account"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.preferences"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.price-editor"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.pricedb-editor"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.reset-warnings"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.tax-info"
+ old-key="paned-position"/>
+
+<obsolete old-path="org.gnucash.dialogs.tax-info"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.fincalc"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.find"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.find"
+ old-key="search-for-active-only"/>
+
+<obsolete old-path="org.gnucash.dialogs.export-accounts"
+ old-key="last-path"/>
+
+<obsolete old-path="org.gnucash.dialogs.log-replay"
+ old-key="last-path"/>
+
+<obsolete old-path="org.gnucash.dialogs.open-save"
+ old-key="last-path"/>
+
+<obsolete old-path="org.gnucash.dialogs.report"
+ old-key="last-path"/>
+
+<obsolete old-path="org.gnucash.dialogs.report-saved-configs"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.lot-viewer"
+ old-key="hpane-position"/>
+
+<obsolete old-path="org.gnucash.dialogs.lot-viewer"
+ old-key="vpane-position"/>
+
+<obsolete old-path="org.gnucash.dialogs.lot-viewer"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.new-user"
+ old-key="first-startup"/>
+
+<obsolete old-path="org.gnucash.dialogs.new-hierarchy"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.new-hierarchy"
+ old-key="show-on-new-file"/>
+
+<obsolete old-path="org.gnucash.dialogs.search"
+ old-key="new-search-limit"/>
+
+<obsolete old-path="org.gnucash.dialogs.transfer"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.business-doclink"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.trans-doclink"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.style-sheet"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.options"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.customer-search"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.customer-search"
+ old-key="search-for-active-only"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.employee-search"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.employee-search"
+ old-key="search-for-active-only"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.invoice-search"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.invoice-search"
+ old-key="search-for-active-only"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.job-search"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.job-search"
+ old-key="search-for-active-only"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.order-search"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.order-search"
+ old-key="search-for-active-only"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.vendor-search"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.vendor-search"
+ old-key="search-for-active-only"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.invoice"
+ old-key="tax-included"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.invoice"
+ old-key="auto-pay"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.invoice"
+ old-key="notify-when-due"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.invoice"
+ old-key="days-in-advance"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.invoice"
+ old-key="enable-toolbuttons"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.invoice"
+ old-key="invoice-printreport"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.invoice"
+ old-key="use-new-window"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.invoice"
+ old-key="accumulate-splits"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.bill"
+ old-key="tax-included"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.bill"
+ old-key="auto-pay"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.bill"
+ old-key="notify-when-due"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.bill"
+ old-key="days-in-advance"/>
+
+<obsolete old-path="org.gnucash.dialogs.business.tax-tables"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="check-format-guid"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="check-position"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="first-page-count"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="date-format"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="date-format-user"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="custom-units"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="custom-payee"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="custom-date"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="custom-amount-words"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="custom-amount-number"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="custom-address"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="custom-notes"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="custom-memo"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="custom-translation"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="custom-rotation"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="splits-amount"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="splits-memo"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="splits-account"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="print-date-format"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="default-font"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="blocking-chars"/>
+
+<obsolete old-path="org.gnucash.dialogs.checkprinting"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.commodities"
+ old-key="include-iso"/>
+
+<obsolete old-path="org.gnucash.dialogs.commodities"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.export.csv"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.export.csv"
+ old-key="last-path"/>
+
+<obsolete old-path="org.gnucash.dialogs.export.csv"
+ old-key="paned-position"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.csv"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.csv"
+ old-key="last-path"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic"
+ old-key="enable-skip"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic"
+ old-key="enable-update"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic"
+ old-key="use-bayes"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic"
+ old-key="match-threshold"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic"
+ old-key="match-date-threshold"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic"
+ old-key="match-date-not-threshold"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic"
+ old-key="auto-add-threshold"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic"
+ old-key="auto-clear-threshold"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic"
+ old-key="atm-fee-threshold"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic"
+ old-key="auto-create-commodity"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic.match-picker"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic.match-picker"
+ old-key="display-reconciled"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic.account-picker"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.generic.transaction-list"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.qif"
+ old-key="default-status-notcleared"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.qif"
+ old-key="default-status-cleared"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.qif"
+ old-key="default-status-reconciled"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.qif"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.qif"
+ old-key="last-path"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.qif"
+ old-key="show-doc"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.qif.account-picker"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.reconcile"
+ old-key="check-cleared"/>
+
+<obsolete old-path="org.gnucash.dialogs.reconcile"
+ old-key="auto-interest-transfer"/>
+
+<obsolete old-path="org.gnucash.dialogs.reconcile"
+ old-key="auto-cc-payment"/>
+
+<obsolete old-path="org.gnucash.dialogs.reconcile"
+ old-key="always-reconcile-to-today"/>
+
+<obsolete old-path="org.gnucash.dialogs.reconcile"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.sxs.since-last-run"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.sxs.since-last-run"
+ old-key="show-at-file-open"/>
+
+<obsolete old-path="org.gnucash.dialogs.sxs.since-last-run"
+ old-key="show-notify-window-at-file-open"/>
+
+<obsolete old-path="org.gnucash.dialogs.sxs.since-last-run"
+ old-key="review-transactions"/>
+
+<obsolete old-path="org.gnucash.dialogs.sxs.transaction-editor"
+ old-key="create-auto"/>
+
+<obsolete old-path="org.gnucash.dialogs.sxs.transaction-editor"
+ old-key="create-days"/>
+
+<obsolete old-path="org.gnucash.dialogs.sxs.transaction-editor"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.sxs.transaction-editor"
+ old-key="notify"/>
+
+<obsolete old-path="org.gnucash.dialogs.sxs.transaction-editor"
+ old-key="remind-days"/>
+
+<obsolete old-path="org.gnucash.dialogs.totd"
+ old-key="current-tip"/>
+
+<obsolete old-path="org.gnucash.dialogs.totd"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.totd"
+ old-key="show-at-startup"/>
+
+<obsolete old-path="org.gnucash.general.finance-quote"
+ old-key="alphavantage-api-key"/>
+
+<obsolete old-path="org.gnucash.history"
+ old-key="maxfiles"/>
+
+<obsolete old-path="org.gnucash.history"
+ old-key="file0"/>
+
+<obsolete old-path="org.gnucash.history"
+ old-key="file1"/>
+
+<obsolete old-path="org.gnucash.history"
+ old-key="file2"/>
+
+<obsolete old-path="org.gnucash.history"
+ old-key="file3"/>
+
+<obsolete old-path="org.gnucash.history"
+ old-key="file4"/>
+
+<obsolete old-path="org.gnucash.history"
+ old-key="file5"/>
+
+<obsolete old-path="org.gnucash.history"
+ old-key="file6"/>
+
+<obsolete old-path="org.gnucash.history"
+ old-key="file7"/>
+
+<obsolete old-path="org.gnucash.history"
+ old-key="file8"/>
+
+<obsolete old-path="org.gnucash.history"
+ old-key="file9"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="checkprinting-multi-acct"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="closing-window-question"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="inv-entry-mod"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="inv-entry-dup"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="price-comm-del"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="price-comm-del-quotes"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="price-quotes-del"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="price-quotes-replace"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="reg-is-acct-pay-rec"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="reg-is-read-only"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="reg-recd-split-mod"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="reg-recd-split-unrec"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="reg-split-del"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="reg-split-del-recd"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="reg-split-del-all"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="reg-split-del-all-recd"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="reg-trans-del"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="reg-trans-del-recd"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="reg-trans-dup"/>
+
+<obsolete old-path="org.gnucash.warnings.permanent"
+ old-key="reg-trans-mod"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="checkprinting-multi-acct"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="closing-window-question"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="inv-entry-mod"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="inv-entry-dup"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="price-comm-del"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="price-comm-del-quotes"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="price-quotes-del"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="price-quotes-replace"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="reg-is-acct-pay-rec"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="reg-is-read-only"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="reg-recd-split-mod"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="reg-recd-split-unrec"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="reg-split-del"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="reg-split-del-recd"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="reg-split-del-all"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="reg-split-del-all-recd"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="reg-trans-del"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="reg-trans-del-recd"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="reg-trans-dup"/>
+
+<obsolete old-path="org.gnucash.warnings.temporary"
+ old-key="reg-trans-mod"/>
+
+<obsolete old-path="org.gnucash.window.pages"
+ old-key="account-code-visible"/>
+
+<obsolete old-path="org.gnucash.window.pages"
+ old-key="account-code-width"/>
+
+<obsolete old-path="org.gnucash.window.pages.account-tree.summary"
+ old-key="grand-total"/>
+
+<obsolete old-path="org.gnucash.window.pages.account-tree.summary"
+ old-key="non-currency"/>
+
+<obsolete old-path="org.gnucash.window.pages.account-tree.summary"
+ old-key="start-choice-relative"/>
+
+<obsolete old-path="org.gnucash.window.pages.account-tree.summary"
+ old-key="start-choice-absolute"/>
+
+<obsolete old-path="org.gnucash.window.pages.account-tree.summary"
+ old-key="start-date"/>
+
+<obsolete old-path="org.gnucash.window.pages.account-tree.summary"
+ old-key="start-period"/>
+
+<obsolete old-path="org.gnucash.window.pages.account-tree.summary"
+ old-key="end-choice-relative"/>
+
+<obsolete old-path="org.gnucash.window.pages.account-tree.summary"
+ old-key="end-choice-absolute"/>
+
+<obsolete old-path="org.gnucash.window.pages.account-tree.summary"
+ old-key="end-date"/>
+
+<obsolete old-path="org.gnucash.window.pages.account-tree.summary"
+ old-key="end-period"/>
+
+</release>
diff --git a/gnucash/import-export/aqb/gschemas/pref_transformations.xml b/gnucash/import-export/aqb/gschemas/pref_transformations.xml
index 2c12d75ac..6056724f7 100644
--- a/gnucash/import-export/aqb/gschemas/pref_transformations.xml
+++ b/gnucash/import-export/aqb/gschemas/pref_transformations.xml
@@ -1,3 +1,15 @@
+<!-- GSettings preference transformation rules
+
+ Refer to gnucash/gschemas/pref_transformations.xml for more information
+ about this file.
+
+
+ Note
+ ====
+ Do not remove this file from the GnuCash sources even if there are
+ currently no active rules. Instead keep this introductory comment in
+ place and remove all other content.
+-->
<release version="4007">
@@ -62,3 +74,43 @@
new-key="last-geometry"/>
</release>
+
+<release version="5000">
+
+<obsolete old-path="org.gnucash.dialogs.flicker"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.ab-initial"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.hbci"
+ old-key="close-on-finish"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.hbci"
+ old-key="remember-pin"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.hbci"
+ old-key="use-ns-transaction-text"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.hbci"
+ old-key="verbose-debug"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.hbci"
+ old-key="format-dtaus"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.hbci"
+ old-key="format-csv"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.hbci"
+ old-key="format-swift-mt940"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.hbci"
+ old-key="format-swift-mt942"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.hbci"
+ old-key="last-path"/>
+
+<obsolete old-path="org.gnucash.dialogs.import.hbci.connection-dialog"
+ old-key="last-geometry"/>
+
+</release>
diff --git a/gnucash/import-export/ofx/gschemas/pref_transformations.xml b/gnucash/import-export/ofx/gschemas/pref_transformations.xml
index 439f75ecb..50b938002 100644
--- a/gnucash/import-export/ofx/gschemas/pref_transformations.xml
+++ b/gnucash/import-export/ofx/gschemas/pref_transformations.xml
@@ -1,3 +1,15 @@
+<!-- GSettings preference transformation rules
+
+ Refer to gnucash/gschemas/pref_transformations.xml for more information
+ about this file.
+
+
+ Note
+ ====
+ Do not remove this file from the GnuCash sources even if there are
+ currently no active rules. Instead keep this introductory comment in
+ place and remove all other content.
+-->
<release version="4007">
@@ -6,3 +18,10 @@
new-path="org.gnucash.GnuCash.dialogs.import.ofx"
new-key="last-path"/>
</release>
+
+<release version="5000">
+
+<obsolete old-path="org.gnucash.dialogs.import.ofx"
+ old-key="last-path"/>
+</release>
+
commit c77aac2b168e036824eb74ffdd7de3516ac032a4
Author: Geert Janssens <geert at kobaltwit.be>
Date: Fri Oct 1 15:02:46 2021 +0200
Fully remove preferences that were obsoleted in the 4.x cycle
diff --git a/gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in b/gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in
index 19bbcb794..7e626fd75 100644
--- a/gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in
+++ b/gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in
@@ -5,12 +5,6 @@
</schema>
<schema id="org.gnucash.general" path="/org/gnucash/general/">
- <key name="migrate-prefs-done" type="b">
- <default>false</default>
- <summary>-Obsolete-</summary>
- <description>This setting is obsolete and will be removed in the next major @PROJECT_NAME@ release series.</description>
- </key>
-
<key name="prefs-version" type="i">
<default>0</default>
<summary>The version of these settings</summary>
@@ -425,26 +419,6 @@ For example setting this to 2.0 will display reports at twice their typical size
<child name="options" schema="org.gnucash.dialogs.options"/>
</schema>
- <schema id="org.gnucash.dialogs.business-assoc" path="/org/gnucash/dialogs/business-assoc/">
- <key type="(iiii)" name="last-geometry">
- <default>(-1,-1,-1,-1)</default>
- <summary>Last window position and size</summary>
- <description>This setting describes the size and position of the window when it was last closed.
- The numbers are the X and Y coordinates of the top left corner of the window
- followed by the width and height of the window.</description>
- </key>
- </schema>
-
- <schema id="org.gnucash.dialogs.trans-assoc" path="/org/gnucash/dialogs/trans-assoc/">
- <key type="(iiii)" name="last-geometry">
- <default>(-1,-1,-1,-1)</default>
- <summary>Last window position and size</summary>
- <description>This setting describes the size and position of the window when it was last closed.
- The numbers are the X and Y coordinates of the top left corner of the window
- followed by the width and height of the window.</description>
- </key>
- </schema>
-
<schema id="org.gnucash.dialogs.account" path="/org/gnucash/dialogs/account/">
<key name="last-geometry" type="(iiii)">
<default>(-1,-1,-1,-1)</default>
diff --git a/gnucash/gschemas/pref_transformations.xml b/gnucash/gschemas/pref_transformations.xml
index 66f4a0191..3710df5c3 100644
--- a/gnucash/gschemas/pref_transformations.xml
+++ b/gnucash/gschemas/pref_transformations.xml
@@ -1373,15 +1373,4 @@
</release>
-<release version="4009">
-<obsolete old-path="org.gnucash.dialogs.business-assoc"
- old-key="last-geometry"/>
-
-<obsolete old-path="org.gnucash.dialogs.trans-assoc"
- old-key="last-geometry"/>
-
-<obsolete old-path="org.gnucash.general"
- old-key="migrate-prefs-done"/>
-
-</release>
commit e64bcfe620047d41dd8bd1a638dcf71e2f4aa9cd
Merge: 67191203a 9a465fc35
Author: Geert Janssens <geert at kobaltwit.be>
Date: Fri Oct 1 14:51:04 2021 +0200
Merge branch 'maint'
commit 9a465fc359d96ac267aa129cf96126def59ff45e
Author: Geert Janssens <geert at kobaltwit.be>
Date: Thu Sep 30 21:57:48 2021 +0200
GSettings - add 'deprecate' and 'obsolete' conversions for user preferences
'deprecate' is technically a noop. It serves to remind maintainers
the 'deprecated' preference is to be obsoleted in the next major
release.
'obsolete' goes one step further in that it will cause gnucash to reset
the preference, effectively clearing the value stored in the preferences
backend. This is the final phase of a preference. Following this it
will be completely removed from the GSettings schema in the next
major release.
Notes
* 'deprecate' and 'migrate' are related. Both are a reminder the
preference is to be obsoleted in the next major release. 'deprecate'
does only that though while 'migrate' will also trigger a copy of
the old value to a new location in the databse.
* This commit readds a couple of preferences that had been removed
in the past to be able to properly obsolete them (and to test
the obsoleting code)
diff --git a/gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in b/gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in
index 7e626fd75..19bbcb794 100644
--- a/gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in
+++ b/gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in
@@ -5,6 +5,12 @@
</schema>
<schema id="org.gnucash.general" path="/org/gnucash/general/">
+ <key name="migrate-prefs-done" type="b">
+ <default>false</default>
+ <summary>-Obsolete-</summary>
+ <description>This setting is obsolete and will be removed in the next major @PROJECT_NAME@ release series.</description>
+ </key>
+
<key name="prefs-version" type="i">
<default>0</default>
<summary>The version of these settings</summary>
@@ -419,6 +425,26 @@ For example setting this to 2.0 will display reports at twice their typical size
<child name="options" schema="org.gnucash.dialogs.options"/>
</schema>
+ <schema id="org.gnucash.dialogs.business-assoc" path="/org/gnucash/dialogs/business-assoc/">
+ <key type="(iiii)" name="last-geometry">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
+ </schema>
+
+ <schema id="org.gnucash.dialogs.trans-assoc" path="/org/gnucash/dialogs/trans-assoc/">
+ <key type="(iiii)" name="last-geometry">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
+ </schema>
+
<schema id="org.gnucash.dialogs.account" path="/org/gnucash/dialogs/account/">
<key name="last-geometry" type="(iiii)">
<default>(-1,-1,-1,-1)</default>
diff --git a/gnucash/gschemas/org.gnucash.GnuCash.gschema.xml.in b/gnucash/gschemas/org.gnucash.GnuCash.gschema.xml.in
index 385ece719..c772b7c78 100644
--- a/gnucash/gschemas/org.gnucash.GnuCash.gschema.xml.in
+++ b/gnucash/gschemas/org.gnucash.GnuCash.gschema.xml.in
@@ -230,6 +230,7 @@
<summary>Set book option on new files to use split "action" field for "Num" field on registers/reports</summary>
<description>If selected, the default book option for new files is set so that the 'Num' cell on registers shows/updates the split 'action' field and the transaction 'num' field is shown on the second line in double line mode (and is not visible in single line mode). Otherwise, the default book option for new files is set so that the 'Num' cell on registers shows/updates the transaction 'num' field.</description>
</key>
+
<child name="register" schema="org.gnucash.GnuCash.general.register"/>
<child name="report" schema="org.gnucash.GnuCash.general.report"/>
</schema>
diff --git a/gnucash/gschemas/pref_transformations.xml b/gnucash/gschemas/pref_transformations.xml
index cd1dcbbe8..66f4a0191 100644
--- a/gnucash/gschemas/pref_transformations.xml
+++ b/gnucash/gschemas/pref_transformations.xml
@@ -29,12 +29,42 @@
Within a release node the following rules are currently supported:
+ <deprecate ... /> : does nothing other than informing GnuCash devs this
+ preference will eventually be removed with no
+ replacement. The preference should not be used anymore
+ in GnuCash code directly.
+ It takes two arguments (old-path and old-key) that
+ together define the preference
+ <migrate ... /> : informs GnuCash a preference has moved or has been
+ renamed. The old preference should be treated as
+ deprecated and should not be used anymore in GnuCash
+ code directly.
+ It takes four arguments (old-path, old-key and
+ new-path, new-key). The first two define the deprecated
+ preference the last two the replacement preference.
+ <obsolete ... /> : informs GnuCash this preference is ready to be removed
+ in the next major release and will be unset in this
+ major release series. This intermediary step is to
+ clean up the settings database over time.
+ It takes two arguments (old-path and old-key) that
+ together define the preference
+ Example
+ =======
+
+ <release version="4007">
+
+ <deprecate old-path="org.gnucash.GnuCash.general"
+ old-key="prefname" />
+
<migrate old-path="org.gnucash.general"
old-key="prefs-version"
new-path="org.gnucash.GnuCash.general"
new-key="prefs-version" />
- This will migrate the preference at old-path:old-key to new-path:new-key.
+ <obsolete old-path="org.gnucash.general"
+ old-key="migrate-prefs-done" />
+
+ </release>
Note
@@ -1342,3 +1372,16 @@
new-key="end-period"/>
</release>
+
+<release version="4009">
+
+<obsolete old-path="org.gnucash.dialogs.business-assoc"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.dialogs.trans-assoc"
+ old-key="last-geometry"/>
+
+<obsolete old-path="org.gnucash.general"
+ old-key="migrate-prefs-done"/>
+
+</release>
diff --git a/libgnucash/app-utils/gnc-gsettings.cpp b/libgnucash/app-utils/gnc-gsettings.cpp
index 35fdf5646..17b25114b 100644
--- a/libgnucash/app-utils/gnc-gsettings.cpp
+++ b/libgnucash/app-utils/gnc-gsettings.cpp
@@ -655,15 +655,51 @@ gnc_gsettings_get_user_value (const gchar *schema,
}
}
+using opt_str_vec = boost::optional<std::string>;
+
+static void
+deprecate_one_key (const opt_str_vec &oldpath, const opt_str_vec &oldkey)
+{
+ if (!oldpath || !oldkey )
+ {
+ DEBUG ("Skipping <deprecate> node - missing attribute (old-path or old-key)");
+ return;
+ }
+
+ PINFO ("'%s:%s' has been marked deprecated", oldpath->c_str(), oldkey->c_str());
+ /* This does nothing really, but is a reminder for future maintainers
+ * to mark this pref as obsolete in the next major release. */
+}
+
static void
-migrate_one_key (const std::string &oldpath, const std::string &oldkey,
- const std::string &newpath, const std::string &newkey)
+migrate_one_key (const opt_str_vec &oldpath, const opt_str_vec &oldkey,
+ const opt_str_vec &newpath, const opt_str_vec &newkey)
{
- PINFO ("Migrating '%s:%s' to '%s:%s'", oldpath.c_str(), oldkey.c_str(),
- newpath.c_str(), newkey.c_str());
- auto user_value = gnc_gsettings_get_user_value (oldpath.data(), oldkey.data());
+ if (!oldpath || !oldkey || !newpath || !newkey)
+ {
+ DEBUG ("Skipping <migrate> node - missing attribute (old-path, old-key, new-path or new-key)");
+ return;
+ }
+
+ PINFO ("Migrating '%s:%s' to '%s:%s'", oldpath->c_str(), oldkey->c_str(),
+ newpath->c_str(), newkey->c_str());
+
+ auto user_value = gnc_gsettings_get_user_value (oldpath->c_str(), oldkey->c_str());
if (user_value)
- gnc_gsettings_set_value (newpath.data(), newkey.data(), user_value);
+ gnc_gsettings_set_value (newpath->c_str(), newkey->c_str(), user_value);
+}
+
+static void
+obsolete_one_key (const opt_str_vec &oldpath, const opt_str_vec &oldkey)
+{
+ if (!oldpath || !oldkey )
+ {
+ DEBUG ("Skipping <obsolete> node - missing attribute (old-path or old-key)");
+ return;
+ }
+
+ PINFO ("Resetting obsolete '%s:%s'", oldpath->c_str(), oldkey->c_str());
+ gnc_gsettings_reset (oldpath->c_str(), oldkey->c_str());
}
static void
@@ -675,19 +711,17 @@ parse_one_release_node (bpt::ptree &pt)
{
if (node.first == "<xmlattr>")
return;
- if (node.first == "migrate")
- {
- auto oldpath = node.second.get_optional<std::string> ("<xmlattr>.old-path");
- auto oldkey = node.second.get_optional<std::string> ("<xmlattr>.old-key");
- auto newpath = node.second.get_optional<std::string> ("<xmlattr>.new-path");
- auto newkey = node.second.get_optional<std::string> ("<xmlattr>.new-key");
- if (!oldpath || !oldkey || !newpath || !newkey)
- {
- DEBUG ("Skipping migration node - missing attribute (old-path, old-key, new-path or new-key)");
- return;
- }
- migrate_one_key (*oldpath, *oldkey, *newpath, *newkey);
- }
+ else if (node.first == "deprecate")
+ deprecate_one_key (node.second.get_optional<std::string> ("<xmlattr>.old-path"),
+ node.second.get_optional<std::string> ("<xmlattr>.old-key"));
+ else if (node.first == "migrate")
+ migrate_one_key (node.second.get_optional<std::string> ("<xmlattr>.old-path"),
+ node.second.get_optional<std::string> ("<xmlattr>.old-key"),
+ node.second.get_optional<std::string> ("<xmlattr>.new-path"),
+ node.second.get_optional<std::string> ("<xmlattr>.new-key"));
+ else if (node.first == "obsolete")
+ obsolete_one_key (node.second.get_optional<std::string> ("<xmlattr>.old-path"),
+ node.second.get_optional<std::string> ("<xmlattr>.old-key"));
else
{
DEBUG ("Skipping unknown node <%s>", node.first.c_str());
commit 64576f7d27fdc3636a5fff621db22a64f8d3b7cf
Author: Geert Janssens <geert at kobaltwit.be>
Date: Thu Sep 30 18:26:01 2021 +0200
GSettings - widen scope from 'migration' to 'transformation'
This commit mostly changes descriptions and variable names to
use the more generic terms 'transformations' or 'conversions'.
'migration' is only one possible transform, future commits will
add others.
There are no functional changes in this commit other than
a logic inversion in parse_one_release_node. It now checks
for nodes named 'migrate' rather than for nodes not named
'migrate' (the code is adapted accordingly to match this
logic change).
diff --git a/gnucash/CMakeLists.txt b/gnucash/CMakeLists.txt
index 01d3c27ff..8e6e339d1 100644
--- a/gnucash/CMakeLists.txt
+++ b/gnucash/CMakeLists.txt
@@ -4,7 +4,7 @@
set(SCHEMADIR_BUILD ${DATADIR_BUILD}/glib-2.0/schemas)
file(MAKE_DIRECTORY ${SCHEMADIR_BUILD})
unset(gschema_depends CACHE)
-unset(gschema_migration_files CACHE)
+unset(gschema_preftrans_files CACHE)
# The subdirectories
add_subdirectory (gnome)
add_subdirectory (gnome-utils)
diff --git a/gnucash/gschemas/CMakeLists.txt b/gnucash/gschemas/CMakeLists.txt
index 8b81a0161..30609736b 100644
--- a/gnucash/gschemas/CMakeLists.txt
+++ b/gnucash/gschemas/CMakeLists.txt
@@ -22,20 +22,21 @@ set(gschema_SOURCES
add_gschema_targets("${gschema_SOURCES}")
-set(local_migration_files ${gschema_migration_files})
-list(APPEND local_migration_files ${CMAKE_CURRENT_SOURCE_DIR}/migratable-prefs.xml)
-set(gschema_migration_files ${local_migration_files} CACHE INTERNAL "gschema migration files")
+set(local_preftrans_files ${gschema_preftrans_files})
+list(APPEND local_preftrans_files ${CMAKE_CURRENT_SOURCE_DIR}/pref_transformations.xml)
+set(gschema_preftrans_files ${local_preftrans_files} CACHE INTERNAL "files describing transformations for our gsettings based preferences")
-# Provide gnucash runtime with a list of migratable preferences
+# Provide gnucash runtime with a list of potential transformations to user set preferences
+# following GSettings schema changes between gnucash releases
add_custom_command(
- OUTPUT ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml
- COMMAND cat ${gschema_migration_files} > ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml
- DEPENDS ${gschema_migration_files}
+ OUTPUT ${DATADIR_BUILD}/${PROJECT_NAME}/pref_transformations.xml
+ COMMAND cat ${gschema_preftrans_files} > ${DATADIR_BUILD}/${PROJECT_NAME}/pref_transformations.xml
+ DEPENDS ${gschema_preftrans_files}
)
-add_custom_target(migratable-prefs ALL DEPENDS ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml)
+add_custom_target(pref_transformations ALL DEPENDS ${DATADIR_BUILD}/${PROJECT_NAME}/pref_transformations.xml)
-install(FILES ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml
+install(FILES ${DATADIR_BUILD}/${PROJECT_NAME}/pref_transformations.xml
DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
# Handle gschemas.compiled
@@ -65,7 +66,7 @@ if (COMPILE_GSCHEMAS)
${GLIB_COMPILE_SCHEMAS} --strict \$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_DATADIR}/glib-2.0/schemas\")")
endif()
-set(gschemas_DIST_local migratable-prefs.xml)
+set(gschemas_DIST_local pref_transformations.xml)
foreach(file ${gschema_SOURCES})
list(APPEND gschemas_DIST_local ${file}.in)
endforeach()
diff --git a/gnucash/gschemas/migratable-prefs.xml b/gnucash/gschemas/pref_transformations.xml
similarity index 96%
rename from gnucash/gschemas/migratable-prefs.xml
rename to gnucash/gschemas/pref_transformations.xml
index 02b86cb8d..cd1dcbbe8 100644
--- a/gnucash/gschemas/migratable-prefs.xml
+++ b/gnucash/gschemas/pref_transformations.xml
@@ -1,3 +1,48 @@
+<!-- GSettings preference transformation rules
+
+ This xml file describes rules to transform the user's GSettings based
+ preferences following schema changes between GnuCash versions. These
+ rules are evaluated and (optionally) executed at runtime in order to
+ dynamically make changes to the user's preferences to adapt them to the
+ current version of GnuCash.
+
+ An example of such a transformation is changing the name of a preference.
+ While the user may have set a value for the old name, without any
+ additional work the new name would only be set to the default. As a result
+ the user would experience a reset of the preference.
+ By adding a migration rule here, GnuCash will copy the value from the old
+ name to the new name at startup and hence for the user the name change
+ becomes transparent.
+
+ All rules are grouped within 'release' nodes. Such nodes describe the
+ GnuCash version in which the related schema changes first happened.
+ GnuCash will use this information to check at runtime whether the enclosed
+ rules should still be executed.
+ The format of a release node is as follows:
+
+ <release version="encoded_version">
+ ...
+ </releaase>
+
+ encoded_version = gnucash_major * 1000 + gnucash_minor
+ For example for gnucash 4.7 encoded_version becomes 4 * 1000 + 7 = 4007
+
+ Within a release node the following rules are currently supported:
+
+ <migrate old-path="org.gnucash.general"
+ old-key="prefs-version"
+ new-path="org.gnucash.GnuCash.general"
+ new-key="prefs-version" />
+
+ This will migrate the preference at old-path:old-key to new-path:new-key.
+
+
+ Note
+ ====
+ Do not remove this file from the GnuCash sources even if there are
+ currently no active rules. Instead keep this introductory comment in
+ place and remove all other content.
+-->
<release version="4007">
diff --git a/gnucash/import-export/aqb/gschemas/CMakeLists.txt b/gnucash/import-export/aqb/gschemas/CMakeLists.txt
index db4016a3b..315cd284d 100644
--- a/gnucash/import-export/aqb/gschemas/CMakeLists.txt
+++ b/gnucash/import-export/aqb/gschemas/CMakeLists.txt
@@ -4,13 +4,13 @@ if (WITH_AQBANKING)
add_gschema_targets("${aqb_GSCHEMA}")
- set(local_migration_files ${gschema_migration_files})
- list(APPEND local_migration_files ${CMAKE_CURRENT_SOURCE_DIR}/migratable-prefs.xml)
- set(gschema_migration_files ${local_migration_files} CACHE INTERNAL "gschema migration files")
+ set(local_preftrans_files ${gschema_preftrans_files})
+ list(APPEND local_preftrans_files ${CMAKE_CURRENT_SOURCE_DIR}/pref_transformations.xml)
+ set(gschema_preftrans_files ${local_preftrans_files} CACHE INTERNAL "files describing transformations for our gsettings based preferences")
endif()
set_dist_list(aqbanking_gschema_DIST
CMakeLists.txt
- migratable-prefs.xml
+ pref_transformations.xml
org.gnucash.GnuCash.dialogs.import.hbci.gschema.xml.in
org.gnucash.GnuCash.dialogs.flicker.gschema.xml.in)
diff --git a/gnucash/import-export/aqb/gschemas/migratable-prefs.xml b/gnucash/import-export/aqb/gschemas/pref_transformations.xml
similarity index 100%
rename from gnucash/import-export/aqb/gschemas/migratable-prefs.xml
rename to gnucash/import-export/aqb/gschemas/pref_transformations.xml
diff --git a/gnucash/import-export/ofx/gschemas/CMakeLists.txt b/gnucash/import-export/ofx/gschemas/CMakeLists.txt
index 30626519c..6dfa158ea 100644
--- a/gnucash/import-export/ofx/gschemas/CMakeLists.txt
+++ b/gnucash/import-export/ofx/gschemas/CMakeLists.txt
@@ -4,12 +4,12 @@ if (WITH_OFX)
add_gschema_targets("${ofx_GSCHEMA}")
- set(local_migration_files ${gschema_migration_files})
- list(APPEND local_migration_files ${CMAKE_CURRENT_SOURCE_DIR}/migratable-prefs.xml)
- set(gschema_migration_files ${local_migration_files} CACHE INTERNAL "gschema migration files")
+ set(local_preftrans_files ${gschema_preftrans_files})
+ list(APPEND local_preftrans_files ${CMAKE_CURRENT_SOURCE_DIR}/pref_transformations.xml)
+ set(gschema_preftrans_files ${local_preftrans_files} CACHE INTERNAL "files describing transformations for our gsettings based preferences")
endif()
set_dist_list(ofx_gschema_DIST
CMakeLists.txt
- migratable-prefs.xml
+ pref_transformations.xml
org.gnucash.GnuCash.dialogs.import.ofx.gschema.xml.in)
diff --git a/gnucash/import-export/ofx/gschemas/migratable-prefs.xml b/gnucash/import-export/ofx/gschemas/pref_transformations.xml
similarity index 100%
rename from gnucash/import-export/ofx/gschemas/migratable-prefs.xml
rename to gnucash/import-export/ofx/gschemas/pref_transformations.xml
diff --git a/libgnucash/app-utils/gnc-gsettings.cpp b/libgnucash/app-utils/gnc-gsettings.cpp
index e7b0d5fb0..35fdf5646 100644
--- a/libgnucash/app-utils/gnc-gsettings.cpp
+++ b/libgnucash/app-utils/gnc-gsettings.cpp
@@ -667,7 +667,7 @@ migrate_one_key (const std::string &oldpath, const std::string &oldkey,
}
static void
-migrate_one_node (bpt::ptree &pt)
+parse_one_release_node (bpt::ptree &pt)
{
/* loop over top-level property tree */
std::for_each (pt.begin(), pt.end(),
@@ -675,53 +675,55 @@ migrate_one_node (bpt::ptree &pt)
{
if (node.first == "<xmlattr>")
return;
- if (node.first != "migrate")
+ if (node.first == "migrate")
{
- DEBUG ("Skipping non-<migrate> node <%s>", node.first.c_str());
- return;
+ auto oldpath = node.second.get_optional<std::string> ("<xmlattr>.old-path");
+ auto oldkey = node.second.get_optional<std::string> ("<xmlattr>.old-key");
+ auto newpath = node.second.get_optional<std::string> ("<xmlattr>.new-path");
+ auto newkey = node.second.get_optional<std::string> ("<xmlattr>.new-key");
+ if (!oldpath || !oldkey || !newpath || !newkey)
+ {
+ DEBUG ("Skipping migration node - missing attribute (old-path, old-key, new-path or new-key)");
+ return;
+ }
+ migrate_one_key (*oldpath, *oldkey, *newpath, *newkey);
}
-
- auto oldpath = node.second.get_optional<std::string> ("<xmlattr>.old-path");
- auto oldkey = node.second.get_optional<std::string> ("<xmlattr>.old-key");
- auto newpath = node.second.get_optional<std::string> ("<xmlattr>.new-path");
- auto newkey = node.second.get_optional<std::string> ("<xmlattr>.new-key");
- if (!oldpath || !oldkey || !newpath || !newkey)
+ else
{
- DEBUG ("Skipping migration node - missing attribute (old-path, old-key, new-path or new-key)");
+ DEBUG ("Skipping unknown node <%s>", node.first.c_str());
return;
}
- migrate_one_key (*oldpath, *oldkey, *newpath, *newkey);
});
}
static void
-migrate_settings (int old_maj_min)
+transform_settings (int old_maj_min)
{
bpt::ptree pt;
auto pkg_data_dir = gnc_path_get_pkgdatadir();
- auto migrate_file = std::string (pkg_data_dir) + "/migratable-prefs.xml";
+ auto transform_file = std::string (pkg_data_dir) + "/pref_transformations.xml";
g_free (pkg_data_dir);
- std::ifstream migrate_stream {migrate_file};
- if (!migrate_stream.is_open())
+ std::ifstream transform_stream {transform_file};
+ if (!transform_stream.is_open())
{
- PWARN("Failed to load settings migration file '%s'", migrate_file.c_str());
+ PWARN("Failed to load preferences transformation file '%s'", transform_file.c_str());
return;
}
try
{
- bpt::read_xml (migrate_stream, pt);
+ bpt::read_xml (transform_stream, pt);
}
catch (bpt::xml_parser_error &e) {
- PWARN ("Failed to parse GnuCash settings migration file.\n");
+ PWARN ("Failed to parse GnuCash preferences transformation file.\n");
PWARN ("Error message:\n");
PWARN ("%s\n", e.what());
return;
}
catch (...) {
- PWARN ("Unknown error while parsing GnuCash settings migration file.\n");
+ PWARN ("Unknown error while parsing GnuCash preferences transformation file.\n");
return;
}
@@ -747,27 +749,36 @@ migrate_settings (int old_maj_min)
}
DEBUG ("Retrieved version value '%i'", *version);
- migrate_one_node (node.second);
+ parse_one_release_node (node.second);
});
}
void gnc_gsettings_version_upgrade (void)
{
- /* Use versioning to ensure this routine will only sync once for each
- * superseded setting
- * At first run of GnuCash 4.7 or more recent *all* settings will be migrated
- * from prefix org.gnucash to org.gnucash.GnuCash, including our GNC_PREF_VERSION setting.
- * As the logic to determine whether or not to upgrade depends on it we have to do
- * some extra tests to figure when exactly to start doing migrations.
- * - if GNC_PREF_VERSION is not set under old nor new prefix, that means
- * gnucash has never run before on this system = no migration necessary
- * - if GNC_PREF_VERSION is set under old prefix, but not new prefix
- * => full migration from old to new prefix should still be run
+ /* This routine will conditionally execute conversion rules from
+ * prefs_transformations.xml to adapt the user's existing preferences to
+ * the current preferences schema. The rules in this file are versioned and
+ * only rules still relevant to the user's existing preferences and for
+ * this version of GnuCash will be executed.
+ *
+ * Starting with GnuCash 4.7 the code expects all preferences to be stored
+ * under prefix org.gnucash instead of org.gnucash.GnuCash, including our
+ * GNC_PREF_VERSION setting.
+ * As the logic to determine whether or not settings conversions are needed
+ * depends on this preference, we have to test for its value in two
+ * locations:
+ * - if GNC_PREF_VERSION is not set under old nor new prefix
+ * => GnuCash has never run before so no conversion run necessary
+ * - if GNC_PREF_VERSION is set under old prefix and not new prefix
+ * => user's preferences weren't moved yet from old to new prefix. Use old
+ * prefix GNC_PREF_VERSION to determine which conversions may be needed
* - if GNC_PREF_VERSION is set under both prefixes
- * => ignore old prefix and use new prefix result to determine which
- * migrations would still be needed.
+ * => ignore old prefix and use new prefix GNC_PREF_VERSION to determine
+ * which conversions may be needed.
+ * Sometime in the future (GnuCash 6.0) the old prefix will be fully removed
+ * and the test will be simplified to only check in the new prefix.
*/
- ENTER("Start of settings migration routine.");
+ ENTER("Start of settings transform routine.");
auto ogG_maj_min = gnc_gsettings_get_user_value (GNC_PREFS_GROUP_GENERAL, GNC_PREF_VERSION);
auto og_maj_min = gnc_gsettings_get_user_value (GSET_SCHEMA_OLD_PREFIX "." GNC_PREFS_GROUP_GENERAL, GNC_PREF_VERSION);
@@ -790,7 +801,7 @@ void gnc_gsettings_version_upgrade (void)
PINFO ("Previous setting compatibility level: %i", old_maj_min);
- migrate_settings (old_maj_min);
+ transform_settings (old_maj_min);
/* Only write current version if it's more recent than what was set */
auto cur_maj_min = PROJECT_VERSION_MAJOR * 1000 + PROJECT_VERSION_MINOR;
commit 71722c46ada74632afa590642e827d3eaf8dd3fd
Author: TianXing_Yi <ytx.cash at gmail.com>
Date: Tue Sep 28 07:36:18 2021 +0200
Translation update by TianXing_Yi <ytx.cash at gmail.com> using Weblate
po/zh_CN.po: 99.9% (5358 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 07ed40b4e..b850bfa5f 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -23,8 +23,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-09-21 03:37+0000\n"
-"Last-Translator: Eric <spice2wolf at gmail.com>\n"
+"PO-Revision-Date: 2021-09-28 05:36+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"
@@ -17231,13 +17231,13 @@ msgstr "æåæé(_E)"
#: gnucash/gtkbuilder/dialog-sx.glade:724
msgid "Re_view created transactions"
-msgstr "夿 ¸å建ç交æ(_v)"
+msgstr "夿 ¸å建ç交æ(_V)"
#: gnucash/gtkbuilder/dialog-sx.glade:728
msgid ""
"Set 'Review created transactions' as the default in the \"since last run\" "
"dialog."
-msgstr "å¨âèªä¸æ¬¡è¿è¡ä»¥æ¥âå¯¹è¯æ¡ä¸å°âå®¡æ ¸å·²å建ç交æâ设置为é»è®¤å¼ã"
+msgstr "âå¾
æ§è¡âå¯¹è¯æ¡ä¸ï¼é»è®¤éæ©â夿 ¸å建ç交æâã"
#: gnucash/gtkbuilder/dialog-sx.glade:765
msgid "Edit Scheduled Transaction"
@@ -21390,7 +21390,7 @@ msgstr "å°è®¡"
#: gnucash/report/reports/standard/owner-report.scm:56
#: libgnucash/app-utils/business-options.scm:78
msgid "Tax"
-msgstr "ç¨é¢"
+msgstr "ç¨å¡"
#: gnucash/register/ledger-core/gncEntryLedgerModel.c:127
msgid "Billable?"
commit 285017793d2c0c9f5a8d52b3db42944480e3f557
Author: John Ralls <jralls at ceridwen.us>
Date: Wed Sep 29 10:35:19 2021 -0700
Use plain cat instead of cmake -E cat to join the migratable-prefs.
Cmake -E's cat is too new.
diff --git a/gnucash/gschemas/CMakeLists.txt b/gnucash/gschemas/CMakeLists.txt
index 63da362f4..8b81a0161 100644
--- a/gnucash/gschemas/CMakeLists.txt
+++ b/gnucash/gschemas/CMakeLists.txt
@@ -29,7 +29,7 @@ set(gschema_migration_files ${local_migration_files} CACHE INTERNAL "gschema mig
# Provide gnucash runtime with a list of migratable preferences
add_custom_command(
OUTPUT ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml
- COMMAND ${CMAKE_COMMAND} -E cat ${gschema_migration_files} > ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml
+ COMMAND cat ${gschema_migration_files} > ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml
DEPENDS ${gschema_migration_files}
)
commit 29e7b07ed350daec1df43aa36bfc79446dfb24ff
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Sep 28 17:17:23 2021 -0700
Remove superflous schema_source left over from pasting.
diff --git a/libgnucash/app-utils/gnc-gsettings.cpp b/libgnucash/app-utils/gnc-gsettings.cpp
index 4476d7dc8..e7b0d5fb0 100644
--- a/libgnucash/app-utils/gnc-gsettings.cpp
+++ b/libgnucash/app-utils/gnc-gsettings.cpp
@@ -101,7 +101,7 @@ static GSettings * gnc_gsettings_get_settings_ptr (const gchar *schema_str)
gset = static_cast<GSettings*> (g_hash_table_lookup (schema_hash, full_name));
DEBUG ("Looking for schema %s returned gsettings %p", full_name, gset);
- auto schema_source{g_settings_schema_source_get_default( )};
+
if (!gset)
{
auto schema_source {g_settings_schema_source_get_default()};
commit d561cc61881666485ba268d319e06a6c1309bb87
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Sep 28 12:03:48 2021 -0700
Revert "Revert "[gnc-plugin-page-register] when reversing reversed txn, offer jump""
This reverts commit c96024ab3df0a77ff35d6e65dc98e4086cf8c9f1.
GnuCash 4.8a having been tagged.
diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index ff7ade8d4..989593cef 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -4072,13 +4072,6 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
if (trans == NULL)
return;
- if (xaccTransGetReversedBy (trans))
- {
- gnc_error_dialog (GTK_WINDOW (window), "%s",
- _ ("A reversing entry has already been created for this transaction."));
- return;
- }
-
split = gnc_split_register_get_current_split (reg);
account = xaccSplitGetAccount (split);
@@ -4088,6 +4081,17 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
return;
}
+ new_trans = xaccTransGetReversedBy (trans);
+ if (new_trans)
+ {
+ const char *rev = _("A reversing entry has already been created for this transaction.");
+ const char *jump = _("Jump to the transaction?");
+ if (gnc_verify_dialog (GTK_WINDOW (window), TRUE, "%s\n\n%s", rev, jump))
+ goto jump_to_trans;
+ else
+ return;
+ }
+
if (!gnc_dup_time64_dialog (window, _("Reverse Transaction"),
_("New Transaction Information"), &date))
{
@@ -4104,6 +4108,7 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
gnc_resume_gui_refresh();
+ jump_to_trans:
/* Now jump to new trans */
gsr = gnc_plugin_page_register_get_gsr (GNC_PLUGIN_PAGE (page));
split = xaccTransFindSplitByAccount(new_trans, account);
commit 96db26cc1d79e6afc2b267df74cd4511dfa2bd41
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Sep 28 11:27:04 2021 -0700
Retag 4.8 for more GSettings crash repairs.
diff --git a/NEWS b/NEWS
index 9737ffe2b..60a287cb9 100644
--- a/NEWS
+++ b/NEWS
@@ -3,8 +3,10 @@ Version history:
4.8 - 28 September 2021
The ninth release of the 4.x stable series.
-This is a snap release to fix a crasher bug on Linux. The only change is
- GSettings hotfix - resolve crash due to bad schema reference
+This is a snap release to fix a crasher bug on Linux. The only changes are
+ [gsettings] Avoid crash from settings schema not being registered.
+ Rethink how gsettings migration file is constructed
+ GSettings hotfix - resolve crash due to bad schema reference
4.7 - 26 September 2021
The eighth release of the 4.x stable series.
commit 8bfa5a63f2d9fa80f9985821f61ac289a243e609
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Sep 28 11:00:05 2021 -0700
[gsettings] Avoid crash from settings schema not being registered.
diff --git a/libgnucash/app-utils/gnc-gsettings.cpp b/libgnucash/app-utils/gnc-gsettings.cpp
index 9288f6f51..4476d7dc8 100644
--- a/libgnucash/app-utils/gnc-gsettings.cpp
+++ b/libgnucash/app-utils/gnc-gsettings.cpp
@@ -101,9 +101,13 @@ static GSettings * gnc_gsettings_get_settings_ptr (const gchar *schema_str)
gset = static_cast<GSettings*> (g_hash_table_lookup (schema_hash, full_name));
DEBUG ("Looking for schema %s returned gsettings %p", full_name, gset);
+ auto schema_source{g_settings_schema_source_get_default( )};
if (!gset)
{
- gset = g_settings_new (full_name);
+ auto schema_source {g_settings_schema_source_get_default()};
+ auto schema {g_settings_schema_source_lookup(schema_source, full_name,
+ FALSE)};
+ gset = g_settings_new_full (schema, nullptr, nullptr);
DEBUG ("Created gsettings object %p for schema %s", gset, full_name);
if (G_IS_SETTINGS(gset))
g_hash_table_insert (schema_hash, full_name, gset);
@@ -114,7 +118,6 @@ static GSettings * gnc_gsettings_get_settings_ptr (const gchar *schema_str)
{
g_free(full_name);
}
-
LEAVE("");
return gset;
}
commit c96024ab3df0a77ff35d6e65dc98e4086cf8c9f1
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Sep 28 10:23:55 2021 -0700
Revert "[gnc-plugin-page-register] when reversing reversed txn, offer jump"
This reverts commit b8c9b1a6ce0e1e4c6740e1de450859b90cbadcec.
Because I need to re-tag 4.8 after more work on g_settings.
diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index 989593cef..ff7ade8d4 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -4072,6 +4072,13 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
if (trans == NULL)
return;
+ if (xaccTransGetReversedBy (trans))
+ {
+ gnc_error_dialog (GTK_WINDOW (window), "%s",
+ _ ("A reversing entry has already been created for this transaction."));
+ return;
+ }
+
split = gnc_split_register_get_current_split (reg);
account = xaccSplitGetAccount (split);
@@ -4081,17 +4088,6 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
return;
}
- new_trans = xaccTransGetReversedBy (trans);
- if (new_trans)
- {
- const char *rev = _("A reversing entry has already been created for this transaction.");
- const char *jump = _("Jump to the transaction?");
- if (gnc_verify_dialog (GTK_WINDOW (window), TRUE, "%s\n\n%s", rev, jump))
- goto jump_to_trans;
- else
- return;
- }
-
if (!gnc_dup_time64_dialog (window, _("Reverse Transaction"),
_("New Transaction Information"), &date))
{
@@ -4108,7 +4104,6 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
gnc_resume_gui_refresh();
- jump_to_trans:
/* Now jump to new trans */
gsr = gnc_plugin_page_register_get_gsr (GNC_PLUGIN_PAGE (page));
split = xaccTransFindSplitByAccount(new_trans, account);
commit dee4f5e511011ed3b7d52553071943d60e9398e2
Author: Geert Janssens <geert at kobaltwit.be>
Date: Tue Sep 28 11:57:53 2021 +0200
Rethink how gsettings migration file is constructed
The order in which cmake processes subdirectories in gnucash
matters because that also defines the order in which install
rules will be executed.
We have an install rule to compile the install gschema files.
That rule has to be run after all gschema files are installed.
Considering how our code is organized that means directory
gnucash/gschema should be processed after gnucash/import-export.
That requirement was incompatible with how migratable-prefs.xml
was generated (it required the exact opposite processing order).
This conflict causes gnucash to crash on startup because not
all gschema files are compiled as they should.
The changes in this commit should fix this.
diff --git a/gnucash/CMakeLists.txt b/gnucash/CMakeLists.txt
index 2973dcc48..01d3c27ff 100644
--- a/gnucash/CMakeLists.txt
+++ b/gnucash/CMakeLists.txt
@@ -4,11 +4,11 @@
set(SCHEMADIR_BUILD ${DATADIR_BUILD}/glib-2.0/schemas)
file(MAKE_DIRECTORY ${SCHEMADIR_BUILD})
unset(gschema_depends CACHE)
+unset(gschema_migration_files CACHE)
# The subdirectories
add_subdirectory (gnome)
add_subdirectory (gnome-utils)
add_subdirectory (gnome-search)
-add_subdirectory (gschemas)
add_subdirectory (gtkbuilder)
add_subdirectory (html)
add_subdirectory (import-export)
@@ -16,6 +16,9 @@ add_subdirectory (python)
add_subdirectory (register)
add_subdirectory (report)
add_subdirectory (ui)
+# gschemas directory goes last to ensure all schema files are installed
+# before glib-compile-schemas is called
+add_subdirectory (gschemas)
add_definitions (-DHAVE_CONFIG_H)
diff --git a/gnucash/gschemas/CMakeLists.txt b/gnucash/gschemas/CMakeLists.txt
index 57dcf69f7..63da362f4 100644
--- a/gnucash/gschemas/CMakeLists.txt
+++ b/gnucash/gschemas/CMakeLists.txt
@@ -22,8 +22,19 @@ set(gschema_SOURCES
add_gschema_targets("${gschema_SOURCES}")
+set(local_migration_files ${gschema_migration_files})
+list(APPEND local_migration_files ${CMAKE_CURRENT_SOURCE_DIR}/migratable-prefs.xml)
+set(gschema_migration_files ${local_migration_files} CACHE INTERNAL "gschema migration files")
+
# Provide gnucash runtime with a list of migratable preferences
-configure_file(migratable-prefs.xml ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml COPYONLY)
+add_custom_command(
+ OUTPUT ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml
+ COMMAND ${CMAKE_COMMAND} -E cat ${gschema_migration_files} > ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml
+ DEPENDS ${gschema_migration_files}
+)
+
+add_custom_target(migratable-prefs ALL DEPENDS ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml)
+
install(FILES ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml
DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
diff --git a/gnucash/import-export/aqb/gschemas/CMakeLists.txt b/gnucash/import-export/aqb/gschemas/CMakeLists.txt
index 0265a2237..db4016a3b 100644
--- a/gnucash/import-export/aqb/gschemas/CMakeLists.txt
+++ b/gnucash/import-export/aqb/gschemas/CMakeLists.txt
@@ -4,8 +4,9 @@ if (WITH_AQBANKING)
add_gschema_targets("${aqb_GSCHEMA}")
- file(READ migratable-prefs.xml migratable-prefs)
- file(APPEND ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml ${migratable-prefs})
+ set(local_migration_files ${gschema_migration_files})
+ list(APPEND local_migration_files ${CMAKE_CURRENT_SOURCE_DIR}/migratable-prefs.xml)
+ set(gschema_migration_files ${local_migration_files} CACHE INTERNAL "gschema migration files")
endif()
set_dist_list(aqbanking_gschema_DIST
diff --git a/gnucash/import-export/ofx/gschemas/CMakeLists.txt b/gnucash/import-export/ofx/gschemas/CMakeLists.txt
index 3dea7b61b..30626519c 100644
--- a/gnucash/import-export/ofx/gschemas/CMakeLists.txt
+++ b/gnucash/import-export/ofx/gschemas/CMakeLists.txt
@@ -4,8 +4,9 @@ if (WITH_OFX)
add_gschema_targets("${ofx_GSCHEMA}")
- file(READ migratable-prefs.xml migratable-prefs)
- file(APPEND ${DATADIR_BUILD}/${PROJECT_NAME}/migratable-prefs.xml ${migratable-prefs})
+ set(local_migration_files ${gschema_migration_files})
+ list(APPEND local_migration_files ${CMAKE_CURRENT_SOURCE_DIR}/migratable-prefs.xml)
+ set(gschema_migration_files ${local_migration_files} CACHE INTERNAL "gschema migration files")
endif()
set_dist_list(ofx_gschema_DIST
commit a84891a43c9bca060e2e1dd3672f7676b6a9f231
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Sep 27 18:12:31 2021 -0700
Revert "Revert "[gnc-plugin-page-register] when reversing reversed txn, offer jump""
This reverts commit bdb5f3d87133139d798d62702b059939524e83e6, restoring
the new jump-to-transaction facility post-4.8 release.
diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index ff7ade8d4..989593cef 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -4072,13 +4072,6 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
if (trans == NULL)
return;
- if (xaccTransGetReversedBy (trans))
- {
- gnc_error_dialog (GTK_WINDOW (window), "%s",
- _ ("A reversing entry has already been created for this transaction."));
- return;
- }
-
split = gnc_split_register_get_current_split (reg);
account = xaccSplitGetAccount (split);
@@ -4088,6 +4081,17 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
return;
}
+ new_trans = xaccTransGetReversedBy (trans);
+ if (new_trans)
+ {
+ const char *rev = _("A reversing entry has already been created for this transaction.");
+ const char *jump = _("Jump to the transaction?");
+ if (gnc_verify_dialog (GTK_WINDOW (window), TRUE, "%s\n\n%s", rev, jump))
+ goto jump_to_trans;
+ else
+ return;
+ }
+
if (!gnc_dup_time64_dialog (window, _("Reverse Transaction"),
_("New Transaction Information"), &date))
{
@@ -4104,6 +4108,7 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
gnc_resume_gui_refresh();
+ jump_to_trans:
/* Now jump to new trans */
gsr = gnc_plugin_page_register_get_gsr (GNC_PLUGIN_PAGE (page));
split = xaccTransFindSplitByAccount(new_trans, account);
commit caa6bcd1ce44171cdd9d36de1cec700eb1d24222
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Sep 27 17:46:56 2021 -0700
Release GnuCash 4.8
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b377d97cb..de10b7390 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,7 +6,7 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14.0)
endif()
project (gnucash
- VERSION 4.7
+ VERSION 4.8
)
enable_testing()
diff --git a/NEWS b/NEWS
index 30f8f6270..9737ffe2b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,11 @@
Version history:
------- -------
+4.8 - 28 September 2021
+The ninth release of the 4.x stable series.
+
+This is a snap release to fix a crasher bug on Linux. The only change is
+ GSettings hotfix - resolve crash due to bad schema reference
+
4.7 - 26 September 2021
The eighth release of the 4.x stable series.
commit bdb5f3d87133139d798d62702b059939524e83e6
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Sep 27 15:35:35 2021 -0700
Revert "[gnc-plugin-page-register] when reversing reversed txn, offer jump"
This reverts commit b8c9b1a6ce0e1e4c6740e1de450859b90cbadcec so that
we can release 4.8 without any translatable string changes.
diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index 989593cef..ff7ade8d4 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -4072,6 +4072,13 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
if (trans == NULL)
return;
+ if (xaccTransGetReversedBy (trans))
+ {
+ gnc_error_dialog (GTK_WINDOW (window), "%s",
+ _ ("A reversing entry has already been created for this transaction."));
+ return;
+ }
+
split = gnc_split_register_get_current_split (reg);
account = xaccSplitGetAccount (split);
@@ -4081,17 +4088,6 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
return;
}
- new_trans = xaccTransGetReversedBy (trans);
- if (new_trans)
- {
- const char *rev = _("A reversing entry has already been created for this transaction.");
- const char *jump = _("Jump to the transaction?");
- if (gnc_verify_dialog (GTK_WINDOW (window), TRUE, "%s\n\n%s", rev, jump))
- goto jump_to_trans;
- else
- return;
- }
-
if (!gnc_dup_time64_dialog (window, _("Reverse Transaction"),
_("New Transaction Information"), &date))
{
@@ -4108,7 +4104,6 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
gnc_resume_gui_refresh();
- jump_to_trans:
/* Now jump to new trans */
gsr = gnc_plugin_page_register_get_gsr (GNC_PLUGIN_PAGE (page));
split = xaccTransFindSplitByAccount(new_trans, account);
commit b7001b52cf2842f056b7ad919791734462f2b1a4
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Sep 27 09:20:10 2021 +0200
GSettings hotfix - resolve crash due to bad schema reference
diff --git a/gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in b/gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in
index 7050d4da1..7e626fd75 100644
--- a/gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in
+++ b/gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in
@@ -1668,7 +1668,7 @@ For example setting this to 2.0 will display reports at twice their typical size
<summary>Last pathname used</summary>
<description>This field contains the last pathname used by this window. It will be used as the initial filename/pathname the next time this window is opened.</description>
</key>
- <child name="connection-dialog" schema="org.gnucash.GnuCash.dialogs.import.hbci.connection-dialog"/>
+ <child name="connection-dialog" schema="org.gnucash.dialogs.import.hbci.connection-dialog"/>
</schema>
<schema id="org.gnucash.dialogs.import.hbci.connection-dialog" path="/org/gnucash/dialogs/import/hbci/connection-dialog/">
commit 10c1223df209666538caf0a7050aa726dd9719ac
Merge: 2a7566cc4 cb4d9529d
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Sep 27 08:10:02 2021 +0800
Merge branch 'maint-progress' into maint #1150
commit 2a7566cc4002b5a0d1a894c5ebf9df1a8d5652ab
Author: Geert Janssens <geert at kobaltwit.be>
Date: Sun Sep 26 22:58:08 2021 +0200
Win32 - drop conditional code never reached
We had hardcoded HAVE_HTMLHELPW to always be true so the fallback
code that's only reached when it is false was never reached.
Time to drop this dead code.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index baa0f8df7..b377d97cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -668,12 +668,11 @@ install(FILES ${gnucash_DOCS} DESTINATION ${CMAKE_INSTALL_DOCDIR})
# Create config.h
if (WIN32)
-if (MINGW)
-set (HAVE_SCANF_LLD 1)
-else ()
-set (HAVE_SCANF_I64D 1)
-endif()
-set (HAVE_HTMLHELPW 1)
+ if (MINGW)
+ set (HAVE_SCANF_LLD 1)
+ else ()
+ set (HAVE_SCANF_I64D 1)
+ endif()
endif()
check_include_files (dirent.h HAVE_DIRENT_H)
diff --git a/common/config.h.cmake.in b/common/config.h.cmake.in
index feb0a98f9..979f03572 100644
--- a/common/config.h.cmake.in
+++ b/common/config.h.cmake.in
@@ -117,9 +117,6 @@
/* System has gnome-keyring 0.6 or better */
#cmakedefine HAVE_GNOME_KEYRING 1
-/* System has HtmlHelpW */
-#cmakedefine HAVE_HTMLHELPW 1
-
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1
diff --git a/libgnucash/app-utils/gnc-help-utils.c b/libgnucash/app-utils/gnc-help-utils.c
index ad5530b37..53e696751 100644
--- a/libgnucash/app-utils/gnc-help-utils.c
+++ b/libgnucash/app-utils/gnc-help-utils.c
@@ -24,15 +24,11 @@
#include <config.h>
#include <glib.h>
-#ifdef HAVE_HTMLHELPW
-# include <windows.h>
-# include <htmlhelp.h>
-#endif
+#include <windows.h>
+#include <htmlhelp.h>
#include "gnc-help-utils.h"
-#ifdef HAVE_HTMLHELPW
-
static GHashTable *
parse_hhmap_file(const gchar *chmfile)
{
@@ -137,24 +133,3 @@ gnc_show_htmlhelp(const gchar *chmfile, const gchar *anchor)
HtmlHelpW(GetDesktopWindow(), wpath, HH_HELP_CONTEXT, id);
g_free(wpath);
}
-
-#else /* !HAVE_HTMLHELPW */
-void
-gnc_show_htmlhelp(const gchar *chmfile, const gchar *anchor)
-{
- gchar *argv[3];
-
- g_return_if_fail(chmfile);
-
- argv[0] = "hh";
- argv[1] = g_strdup(chmfile);
- argv[2] = NULL;
-
- if (!g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH,
- NULL, NULL, NULL, NULL))
- if (g_file_test(chmfile, G_FILE_TEST_IS_REGULAR))
- g_warning("Found CHM help file, but could not spawn hh to open it");
-
- g_free(argv[1]);
-}
-#endif /* HAVE_HTMLHELPW */
commit cb4d9529dcb27bafa18fa5cb98715170974f247b
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sun Sep 26 23:33:33 2021 +0800
[gnc-plugin-page-register] call invoice editor with parent window
diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index ba913dd49..989593cef 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -4733,6 +4733,7 @@ gnc_plugin_page_register_cmd_jump_linked_invoice (GtkAction* action,
SplitRegister* reg;
GncInvoice* invoice;
Transaction *txn;
+ GtkWidget *window;
ENTER ("(action %p, plugin_page %p)", action, plugin_page);
@@ -4741,6 +4742,7 @@ gnc_plugin_page_register_cmd_jump_linked_invoice (GtkAction* action,
reg = gnc_ledger_display_get_split_register (priv->gsr->ledger);
txn = gnc_split_register_get_current_trans (reg);
invoice = invoice_from_split (gnc_split_register_get_current_split (reg));
+ window = GNC_PLUGIN_PAGE(plugin_page)->window;
if (!invoice)
{
@@ -4775,7 +4777,7 @@ gnc_plugin_page_register_cmd_jump_linked_invoice (GtkAction* action,
}
details = g_list_reverse (details);
choice = gnc_choose_radio_option_dialog
- (GNC_PLUGIN_PAGE (plugin_page)->window, _("Select document"),
+ (window, _("Select document"),
_("Several documents are linked with this transaction. \
Please choose one:"), _("Select"), 0, details);
if (choice >= 0)
@@ -4786,7 +4788,10 @@ Please choose one:"), _("Select"), 0, details);
}
if (invoice)
- gnc_ui_invoice_edit (NULL, invoice);
+ {
+ GtkWindow *gtk_window = gnc_window_get_gtk_window (GNC_WINDOW (window));
+ gnc_ui_invoice_edit (gtk_window, invoice);
+ }
LEAVE (" ");
}
commit 8bfcc982ddc7be09fba57238c4b7b7439ec3b703
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Sep 25 19:34:16 2021 +0800
[assistant-stock-split] set parent window properly
without this commit, the assistant-stock-split window will be hidden
if the register is activated.
diff --git a/gnucash/gnome/assistant-stock-split.c b/gnucash/gnome/assistant-stock-split.c
index 7328da94c..5c6b0cd90 100644
--- a/gnucash/gnome/assistant-stock-split.c
+++ b/gnucash/gnome/assistant-stock-split.c
@@ -789,6 +789,7 @@ gnc_stock_split_dialog (GtkWidget *parent, Account * initial)
return;
}
+ gtk_window_set_transient_for (GTK_WINDOW (info->window), GTK_WINDOW(parent));
gtk_widget_show_all (info->window);
gnc_window_adjust_for_screen (GTK_WINDOW(info->window));
diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index 9f0eba207..ba913dd49 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -4563,13 +4563,15 @@ gnc_plugin_page_register_cmd_stock_split (GtkAction* action,
GncPluginPageRegister* page)
{
Account* account;
+ GtkWindow* window;
ENTER ("(action %p, plugin_page %p)", action, page);
g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER (page));
account = gnc_plugin_page_register_get_account (page);
- gnc_stock_split_dialog (NULL, account);
+ window = gnc_window_get_gtk_window (GNC_WINDOW (GNC_PLUGIN_PAGE (page)->window));
+ gnc_stock_split_dialog (GTK_WIDGET (window), account);
LEAVE (" ");
}
commit d82bb7b8a221c7cf1649217b26db1396d034cc56
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Sep 25 00:09:47 2021 +0800
[Transaction.c] use is_unset static to denote uncached readonly_reason
tests in 128c8d6f8864790ffe4bba9be2349d991fda4c8c
diff --git a/libgnucash/engine/Transaction.c b/libgnucash/engine/Transaction.c
index 7f12f80a2..489e883b9 100644
--- a/libgnucash/engine/Transaction.c
+++ b/libgnucash/engine/Transaction.c
@@ -274,8 +274,7 @@ gnc_transaction_init(Transaction* trans)
trans->date_posted = 0;
trans->marker = 0;
trans->orig = NULL;
- trans->readonly_reason = NULL;
- trans->reason_cache_valid = FALSE;
+ trans->readonly_reason = (char*) is_unset;
trans->isClosingTxn_cached = -1;
trans->notes = (char*) is_unset;
trans->doclink = (char*) is_unset;
@@ -818,7 +817,8 @@ xaccFreeTransaction (Transaction *trans)
/* free up transaction strings */
CACHE_REMOVE(trans->num);
CACHE_REMOVE(trans->description);
- g_free (trans->readonly_reason);
+ if (trans->readonly_reason != is_unset)
+ g_free (trans->readonly_reason);
if (trans->doclink != is_unset)
g_free (trans->doclink);
if (trans->void_reason != is_unset)
@@ -832,7 +832,6 @@ xaccFreeTransaction (Transaction *trans)
trans->date_entered = 0;
trans->date_posted = 0;
trans->readonly_reason = NULL;
- trans->reason_cache_valid = FALSE;
trans->doclink = NULL;
trans->notes = NULL;
trans->void_reason = NULL;
@@ -2130,9 +2129,9 @@ void xaccTransClearReadOnly (Transaction *trans)
qof_instance_set_dirty(QOF_INSTANCE(trans));
xaccTransCommitEdit(trans);
- g_free (trans->readonly_reason);
+ if (trans->readonly_reason != is_unset)
+ g_free (trans->readonly_reason);
trans->readonly_reason = NULL;
- trans->reason_cache_valid = TRUE;
}
}
@@ -2150,9 +2149,9 @@ xaccTransSetReadOnly (Transaction *trans, const char *reason)
g_value_unset (&v);
xaccTransCommitEdit(trans);
- g_free (trans->readonly_reason);
+ if (trans->readonly_reason != is_unset)
+ g_free (trans->readonly_reason);
trans->readonly_reason = g_strdup (reason);
- trans->reason_cache_valid = TRUE;
}
}
@@ -2570,22 +2569,13 @@ xaccTransGetReadOnly (Transaction *trans)
if (!trans)
return NULL;
- if (!trans->reason_cache_valid)
+ if (trans->readonly_reason == is_unset)
{
GValue v = G_VALUE_INIT;
qof_instance_get_kvp (QOF_INSTANCE(trans), &v, 1, TRANS_READ_ONLY_REASON);
-
- /* Clear possible old cache value first */
- g_free (trans->readonly_reason);
- trans->readonly_reason = NULL;
-
- /* Then set the new one */
- if (G_VALUE_HOLDS_STRING (&v))
- {
- trans->readonly_reason = g_value_dup_string (&v);
- g_value_unset (&v);
- }
- trans->reason_cache_valid = TRUE;
+ trans->readonly_reason = G_VALUE_HOLDS_STRING (&v) ?
+ g_value_dup_string (&v) : NULL;
+ g_value_unset (&v);
}
return trans->readonly_reason;
}
diff --git a/libgnucash/engine/TransactionP.h b/libgnucash/engine/TransactionP.h
index f7c455381..d7b141d0c 100644
--- a/libgnucash/engine/TransactionP.h
+++ b/libgnucash/engine/TransactionP.h
@@ -114,11 +114,9 @@ struct transaction_s
/* The readonly_reason is a string that indicates why a transaction
* is marked as read-only. If NULL, the transaction is read-write.
* This value is stored in kvp, but we cache a copy here for
- * performance reasons. reason_cache_valid indicates whether the
- * cached value is valid.
+ * performance reasons.
*/
char * readonly_reason;
- gboolean reason_cache_valid;
char * doclink;
char * void_reason;
diff --git a/libgnucash/engine/mocks/gmock-Transaction.h b/libgnucash/engine/mocks/gmock-Transaction.h
index 61fc4a4ae..ce82437fa 100644
--- a/libgnucash/engine/mocks/gmock-Transaction.h
+++ b/libgnucash/engine/mocks/gmock-Transaction.h
@@ -33,7 +33,6 @@ public:
marker = 0;
orig = nullptr;
readonly_reason = nullptr;
- reason_cache_valid = FALSE;
isClosingTxn_cached = -1;
}
void* operator new(size_t size)
commit b8c9b1a6ce0e1e4c6740e1de450859b90cbadcec
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Fri Sep 24 21:41:27 2021 +0800
[gnc-plugin-page-register] when reversing reversed txn, offer jump
When reversing a transaction which is already reversed, offer a jump
to the reversal transaction.
diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index 6ed0f4d84..9f0eba207 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -4072,13 +4072,6 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
if (trans == NULL)
return;
- if (xaccTransGetReversedBy (trans))
- {
- gnc_error_dialog (GTK_WINDOW (window), "%s",
- _ ("A reversing entry has already been created for this transaction."));
- return;
- }
-
split = gnc_split_register_get_current_split (reg);
account = xaccSplitGetAccount (split);
@@ -4088,6 +4081,17 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
return;
}
+ new_trans = xaccTransGetReversedBy (trans);
+ if (new_trans)
+ {
+ const char *rev = _("A reversing entry has already been created for this transaction.");
+ const char *jump = _("Jump to the transaction?");
+ if (gnc_verify_dialog (GTK_WINDOW (window), TRUE, "%s\n\n%s", rev, jump))
+ goto jump_to_trans;
+ else
+ return;
+ }
+
if (!gnc_dup_time64_dialog (window, _("Reverse Transaction"),
_("New Transaction Information"), &date))
{
@@ -4104,6 +4108,7 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
gnc_resume_gui_refresh();
+ jump_to_trans:
/* Now jump to new trans */
gsr = gnc_plugin_page_register_get_gsr (GNC_PLUGIN_PAGE (page));
split = xaccTransFindSplitByAccount(new_trans, account);
Summary of changes:
CMakeLists.txt | 11 +-
NEWS | 8 +
common/config.h.cmake.in | 3 -
gnucash/CMakeLists.txt | 5 +-
gnucash/gnome/assistant-stock-split.c | 1 +
gnucash/gnome/gnc-plugin-page-register.c | 32 +-
gnucash/gschemas/CMakeLists.txt | 20 +-
.../org.gnucash.GnuCash.deprecated.gschema.xml.in | 2 +-
.../gschemas/org.gnucash.GnuCash.gschema.xml.in | 1 +
...gratable-prefs.xml => pref_transformations.xml} | 856 +++++++++++++++++++++
gnucash/import-export/aqb/gschemas/CMakeLists.txt | 7 +-
...gratable-prefs.xml => pref_transformations.xml} | 52 ++
gnucash/import-export/ofx/gschemas/CMakeLists.txt | 7 +-
.../ofx/gschemas/migratable-prefs.xml | 8 -
.../ofx/gschemas/pref_transformations.xml | 27 +
libgnucash/app-utils/gnc-gsettings.cpp | 138 ++--
libgnucash/app-utils/gnc-help-utils.c | 29 +-
libgnucash/engine/Transaction.c | 32 +-
libgnucash/engine/TransactionP.h | 4 +-
libgnucash/engine/mocks/gmock-Transaction.h | 1 -
po/zh_CN.po | 10 +-
21 files changed, 1113 insertions(+), 141 deletions(-)
rename gnucash/gschemas/{migratable-prefs.xml => pref_transformations.xml} (63%)
rename gnucash/import-export/aqb/gschemas/{migratable-prefs.xml => pref_transformations.xml} (60%)
delete mode 100644 gnucash/import-export/ofx/gschemas/migratable-prefs.xml
create mode 100644 gnucash/import-export/ofx/gschemas/pref_transformations.xml
More information about the gnucash-changes
mailing list