[nautilus/wip/antoniof/gtk4-preparation-discontinued-api: 11/12] toolbar: Stop using GtkToggleButton method on GtkMenuButton




commit 4e8e6fd060550d8d69d1e281502f33ef0f18e00d
Author: António Fernandes <antoniof gnome org>
Date:   Fri Dec 24 00:03:52 2021 +0000

    toolbar: Stop using GtkToggleButton method on GtkMenuButton
    
    In GTK 4 the later is not a subclass of the former and it has got no
    equivalent method.
    
    So, check whether the popover is visible, should be equivalent, I hope.

 src/nautilus-toolbar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index c6b927280..f34d789e1 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -1507,5 +1507,5 @@ nautilus_toolbar_is_menu_visible (NautilusToolbar *self)
 gboolean
 nautilus_toolbar_is_operations_button_active (NautilusToolbar *self)
 {
-    return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (self->operations_button));
+    return gtk_widget_is_visible (GTK_WIDGET (self->operations_popover));
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]