diff options
author | Carlos Soriano <csoriano@gnome.org> | 2016-04-25 17:04:46 +0200 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2016-04-28 11:40:26 +0200 |
commit | 2ae11252ac13609e6e3278bfc64d7aca06b26733 (patch) | |
tree | a7a907d210742eb26cc9ba175afdd07a31bc04f5 | |
parent | 2d44dfb813a8589156de7d99786a8817032e6c77 (diff) | |
download | nautilus-2ae11252ac13609e6e3278bfc64d7aca06b26733.tar.gz |
files-view: remove action group only matches view group
We were removing the action group when the parent is unset.
However, this removes the action group from the window unconditionally,
meaning that if the view that the parent is unset for is not the current
view it will remove the action group of the actual current view, making
the actions unreachable outside of the view.
This was causing the action menu in the toolbar to have non activatable
actions.
To fix it, make sure we remove the action group only if it matches the
current one attached to the window.
https://bugzilla.gnome.org/show_bug.cgi?id=765489
-rw-r--r-- | src/nautilus-files-view.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index b6fd47520..caf39cb0c 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -7794,9 +7794,18 @@ nautilus_files_view_parent_set (GtkWidget *widget, view); } else { remove_update_context_menus_timeout_callback (view); - gtk_widget_insert_action_group (GTK_WIDGET (nautilus_files_view_get_window (view)), - "view", - NULL); + /* 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 + */ + if (gtk_widget_get_action_group (GTK_WIDGET (window), "view") == + view->details->view_action_group) { + gtk_widget_insert_action_group (GTK_WIDGET (nautilus_files_view_get_window (view)), + "view", + NULL); + + } } } |