[nautilus/wip/antoniof/gtk4-preparation-discontinued-api: 8/12] files-view: Stop using gtk_widget_get_action_group()
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/gtk4-preparation-discontinued-api: 8/12] files-view: Stop using gtk_widget_get_action_group()
- Date: Sat, 1 Jan 2022 21:58:00 +0000 (UTC)
commit 74f7f3b9124772bea58b0e27ce2b791978bdf57b
Author: António Fernandes <antoniof gnome org>
Date: Fri Dec 31 19:10:47 2021 +0000
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.
src/nautilus-files-view.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index ed7cfc7cb..1c789d65f 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -9297,13 +9297,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",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]