[nautilus: 2/2] files-view: remove action group only matches view group
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus: 2/2] files-view: remove action group only matches view group
- Date: Mon, 25 Apr 2016 15:59:24 +0000 (UTC)
commit c48d702439350450fd3fd9abb8638da8433d8023
Author: Carlos Soriano <csoriano gnome org>
Date: Mon Apr 25 17:04:46 2016 +0200
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
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 0605ac7..7a09095 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);
+
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]