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
Bug 339876 complains that the splash screen is useless because the desktop
environment should indicate that the application is loading. This is only
partly true because the desktop environment can't indicate the progress
made when the application takes several seconds to load. There is now a
preference to disable the splash screen.
Bug 350993 states that the splash screen should remain until the main
window is completely ready (which it currently does). There's also a
complaint that the splash screen is annoying because it obscures other
windows. The solution to this would be to allow it to be moved or minimise
it.
Bug 366418 asks for the splash screen to disappear when clicked, without
really explaining why (except that other applications can do it). This is
the current implementation.
Clicking the splash screen is effectively a temporary "disable splash
screen" because it closes it. This avoids the "obscures other windows"
problem but it makes it unclear what is going on because it actively works
against the desktop environment by making it appear as if the application
has exited.
We can avoid that problem by minimising the splash screen instead of
closing it. This is primarily a splash screen not a loading screen (and it
can't be aborted, despite what closing it might imply). Without a redesign
it will look odd for it to have a title bar.
Minimise the splash screen when clicked instead of closing it early. It
will then be possible to restore the splash screen window instead of
losing it completely.
The "placeholder" variable in dialog-account-picker.c:dialog_response_cb() may
be uninitialised before use if gtk_tree_selection_get_selected() returns
false.
Initialise it to true:
"jralls: The signal is blocked if the account is a placeholder, meaning
that one can't post splits to it. One also can't post splits to no account,
so the signal should be blocked in that case too."
It shouldn't be possible for the number of columns to be different between
the header cursor and the other cursors but the return value from
g_table_index() is checked just in case this happens.
If this did happen, the width would be set using an uninitialised value
so initialise them all to 0.
If the "transfer" cell has been changed while cutting or copying a split
then it'll dereference the NULL "ft" value.
Check that "ft" is not NULL. This is equivalent to the original behaviour
before cb273b13a1 when the number of splits
would have been determined to be 0 for the SCM_UNDEFINED value of
"trans_scm".
The column value appears to be unused by gnc_split_register_show_trans()
but vc_loc.virt_col is an int so its value will not have been default
initialised. Set it to 0 to be consistent with other callers.
gtk_entry_get_text() should never return null but "prefix" is checked for
null on the first string and then dereferenced unconditionally on the
second string. Change this to be consistent and check twice.
If "test for valid value" is false, errmsg is set which means there is then
a read of "toclear_value" which has not been initialised.
Initialise it to indicate an error with the value.
ACCT_TYPE_NONE is -1 but it should always be masked out by compat;
explicitly check for this instead of relying on that.
Add parenthesis to be clear that the default precedence is what's intended.
Return a gnc_numeric instead of allocations that every caller has to free.
This makes it easier to fix the use after free in the unit test function
equals_node_val_vs_split_internal() where the expression in the return
statement wants to use the allocated gnc_numeric.