mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 14:50:06 +00:00
Merge branch 'wip/chergert/action-critical-fixes' into 'main'
various action muxer correctness fixes See merge request GNOME/gtk!4719
This commit is contained in:
commit
900a23e2bb
@ -991,13 +991,15 @@ gtk_action_muxer_unregister_observer (GtkActionObservable *observable,
|
||||
GtkActionObserver *observer)
|
||||
{
|
||||
GtkActionMuxer *muxer = GTK_ACTION_MUXER (observable);
|
||||
Action *action;
|
||||
Action *action = find_observers (muxer, name);
|
||||
|
||||
action = find_observers (muxer, name);
|
||||
if (action)
|
||||
{
|
||||
g_object_weak_unref (G_OBJECT (observer), gtk_action_muxer_weak_notify, action);
|
||||
gtk_action_muxer_unregister_internal (action, observer);
|
||||
if (g_slist_find (action->watchers, observer) != NULL)
|
||||
{
|
||||
g_object_weak_unref (G_OBJECT (observer), gtk_action_muxer_weak_notify, action);
|
||||
gtk_action_muxer_unregister_internal (action, observer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1269,7 +1271,7 @@ gtk_action_muxer_insert (GtkActionMuxer *muxer,
|
||||
if (!muxer->groups)
|
||||
muxer->groups = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, gtk_action_muxer_free_group);
|
||||
|
||||
group = g_slice_new (Group);
|
||||
group = g_slice_new0 (Group);
|
||||
group->muxer = muxer;
|
||||
group->group = g_object_ref (action_group);
|
||||
group->prefix = g_strdup (prefix);
|
||||
|
Loading…
Reference in New Issue
Block a user