gnucash stable: Multiple changes pushed
Christopher Lam
clam at code.gnucash.org
Mon Jun 26 20:56:20 EDT 2023
Updated via https://github.com/Gnucash/gnucash/commit/fa3043a6 (commit)
via https://github.com/Gnucash/gnucash/commit/ff10b1d3 (commit)
from https://github.com/Gnucash/gnucash/commit/aba64c97 (commit)
commit fa3043a631a30b10c445e575f009e9e652ac8fa6
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Jun 26 21:26:44 2023 +0800
g_menu_item_new must be g_object_unreffed
Although gnome API usually insertions usually take ownership of the child
element, in this case the GMenuItem attributes are copied into the
GMenu.
From https://docs.gtk.org/gio/method.Menu.insert_item.html --
* Description
Inserts item into menu.
The “insertion†is actually done by copying all of the attribute and
link values of item and using them to form a new item within menu. As
such, item itself is not really inserted, but rather, a menu item that
is exactly the same as the one presently described by item.
This means that item is essentially useless after the insertion
occurs. Any changes you make to it are ignored unless it is inserted
again (at which point its updated values will be copied).
You should probably just free item once you’re done.
There are many convenience functions to take care of common cases. See
g_menu_insert(), g_menu_insert_section() and g_menu_insert_submenu()
as well as “prepend†and “append†variants of each of these functions.
Available since: 2.32
commit ff10b1d3149c14a222a0e26304a8d18e56e1b1f3
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Jun 26 21:49:32 2023 +0800
g_menu_model_iterate_item_attributes must be g_object_unreffed
Summary of changes:
gnucash/gnome-utils/gnc-gtk-utils.c | 2 ++
gnucash/gnome-utils/gnc-main-window.cpp | 1 +
gnucash/gnome-utils/gnc-plugin-file-history.c | 1 +
gnucash/gnome-utils/gnc-plugin-menu-additions.c | 2 +-
4 files changed, 5 insertions(+), 1 deletion(-)
More information about the gnucash-patches
mailing list