You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 85c10f8
Browse filesBrowse the repository at this point in the historyBrowse files
Use g_signal_connect_object() instead of g_signal_connect() in cases where user_data is a GObject.
This ensures that the signal is disconnected if the user_data GObject
is destroyed. I don't think we would encounter that case here, but
it's good practice to do this regardless.
RpGtk.c: For GTK2/GTK3, use g_signal_connect_data() to ensure gfncbdata
is freed, even if the signal isn't called. It usually is, so this is
handling an edge case that probably won't ever happen, but better safe
than sorry. Don't free gfncbdata from within the signal handler.
ConfigDialog.cpp: Use g_clear_signal_handler() instead of g_signal_handler_disconnect().
- Don't use g_signal_connect_object() for this signal.
glib-compat.h: Add g_clear_signal_handler() and G_CONNECT_DEFAULT.
*MenuProvider.c: Use g_signal_connect_data() with a GClosureNotify
function that calls nautilus_file_info_list_free() or equivalent.
Don't free the list from rp_item_convert_to_png() or the ThreadFunc,
since it will be freed by the closure.
- NOTE: get_file_items() uses `transfer none` for the files list,
so we need to make a deep copy using nautilus_file_info_list_copy().
Reference: https://blogs.gnome.org/mcatanzaro/2022/07/27/common-glib-programming-errors/
0 commit comments