diff options
author | António Fernandes <antoniof@gnome.org> | 2021-12-31 19:10:47 +0000 |
---|---|---|
committer | António Fernandes <antoniojpfernandes@gmail.com> | 2022-01-05 01:44:35 +0000 |
commit | e004836ccfa6d7d4b430c465360217547eca32e2 (patch) | |
tree | fd4015ed0f661cb707cd1de2a24af7dc83a5454a | |
parent | 9e15ee29b24a3b3bc9644e9deeebd3bf29647205 (diff) | |
download | nautilus-e004836ccfa6d7d4b430c465360217547eca32e2.tar.gz |
files-view: Stop using gtk_widget_get_action_group()
The function is gone in GTK 4.
This has been introduced to fix https://bugzilla.gnome.org/show_bug.cgi?id=765489
By studying the code and testing, I seems that checking whether this
is the current active view is equivalent.
-rw-r--r-- | src/nautilus-files-view.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index eb2616a15..05c1bc090 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -9317,13 +9317,11 @@ on_parent_changed (GObject *object, else { remove_update_context_menus_timeout_callback (view); - /* Only remove the action group if it matchs the current view - * action group. If not, we can remove an action group set by - * a different view i.e. if the slot_active function is called - * before this one + /* Only remove the action group if this is still the active view. + * Otherwise we might be removing an action group set by a different + * view i.e. if slot_active_changed() is called before this one. */ - if (gtk_widget_get_action_group (GTK_WIDGET (window), "view") == - priv->view_action_group) + if (priv->active) { gtk_widget_insert_action_group (GTK_WIDGET (nautilus_files_view_get_window (view)), "view", |