summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2016-04-25 17:04:46 +0200
committerCarlos Soriano <csoriano@gnome.org>2016-04-25 17:08:29 +0200
commitc48d702439350450fd3fd9abb8638da8433d8023 (patch)
tree90a36df93dac4c77f54895892ada4d64bed45c93
parent7e24f1b2a2b3b7860ee29820d69f5a1511fee994 (diff)
downloadnautilus-c48d702439350450fd3fd9abb8638da8433d8023.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.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 0605ac7c0..7a090951c 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -7726,9 +7726,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);
+
+ }
}
}