gnucash master: Multiple changes pushed
Christopher Lam
clam at code.gnucash.org
Sat Jan 14 01:00:17 EST 2023
Updated via https://github.com/Gnucash/gnucash/commit/fe98b3bb (commit)
via https://github.com/Gnucash/gnucash/commit/0f0006e2 (commit)
from https://github.com/Gnucash/gnucash/commit/6faaf511 (commit)
commit fe98b3bb29a37de1ef4c8c9c7c657f9ca4075294
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Jan 14 12:05:24 2023 +0800
[html.scm] use load-and-reexport macro
diff --git a/gnucash/html/html.scm b/gnucash/html/html.scm
index 5d6d2a81a..0083e441a 100644
--- a/gnucash/html/html.scm
+++ b/gnucash/html/html.scm
@@ -26,14 +26,13 @@
(define-module (gnucash html))
+(use-modules (gnucash core-utils))
+
;; Guile 2 needs to find the symbols from the extension at compile time already
(eval-when
(compile load eval expand)
(load-extension "libgnc-html" "scm_init_sw_gnc_html_module"))
-(use-modules (sw_gnc_html))
-; Export the swig-wrapped symbols in the public interface of this module
-(let ((i (module-public-interface (current-module))))
- (module-use! i (resolve-interface '(sw_gnc_html))))
+(load-and-reexport (sw_gnc_html))
(gnc-html-initialize)
commit 0f0006e205177487dc8cdd020db628566a208564
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Jan 14 11:53:26 2023 +0800
Use g_object_set_data_full instead of g_object_set_data
when the data needs a destructor.
diff --git a/gnucash/gnome/gnc-plugin-page-account-tree.c b/gnucash/gnome/gnc-plugin-page-account-tree.c
index e5b1e9f12..86b6c93b8 100644
--- a/gnucash/gnome/gnc-plugin-page-account-tree.c
+++ b/gnucash/gnome/gnc-plugin-page-account-tree.c
@@ -1374,7 +1374,8 @@ account_delete_dialog (Account *account, GtkWindow *parent, Adopters* adopt)
gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
/* FIXME: Same account type used for subaccount. */
- g_object_set_data(G_OBJECT(dialog), DELETE_DIALOG_FILTER, filter);
+ g_object_set_data_full (G_OBJECT(dialog), DELETE_DIALOG_FILTER, filter,
+ (GDestroyNotify) g_list_free);
g_object_set_data(G_OBJECT(dialog), DELETE_DIALOG_ACCOUNT, account);
widget = GTK_WIDGET(gtk_builder_get_object (builder, "header"));
title = g_strdup_printf(_("Deleting account %s"), acct_name);
@@ -1531,11 +1532,7 @@ gnc_plugin_page_account_tree_cmd_delete_account (GSimpleAction *simple,
if (response != GTK_RESPONSE_ACCEPT)
{
- /* Account deletion is cancelled, so clean up and return. */
- filter = g_object_get_data (G_OBJECT (dialog),
- DELETE_DIALOG_FILTER);
gtk_widget_destroy(dialog);
- g_list_free(filter);
return;
}
adopter_set_account_and_match (&adopt.trans);
@@ -1547,9 +1544,7 @@ gnc_plugin_page_account_tree_cmd_delete_account (GSimpleAction *simple,
adopter_match (&adopt.subtrans, GTK_WINDOW (window)))
break;
}
- filter = g_object_get_data (G_OBJECT (dialog), DELETE_DIALOG_FILTER);
gtk_widget_destroy(dialog);
- g_list_free(filter);
if (confirm_delete_account (simple, page, adopt.trans.new_account,
adopt.subtrans.new_account,
adopt.subacct.new_account,
Summary of changes:
gnucash/gnome/gnc-plugin-page-account-tree.c | 9 ++-------
gnucash/html/html.scm | 7 +++----
2 files changed, 5 insertions(+), 11 deletions(-)
More information about the gnucash-changes
mailing list