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




commit 9fd937a8038737e2cc64377ffb98d00962927cf2
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 cee8aa250..3ef3b6653 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -1467,5 +1467,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]