[balsa/gtk4: 56/289] balsa-mime-widget-text: Simplify popping down




commit bd3e12044ae141883b1d062f5ba4c56b3281aeb0
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Mon Jun 22 11:41:11 2020 -0400

    balsa-mime-widget-text: Simplify popping down

 src/balsa-mime-widget-text.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/balsa-mime-widget-text.c b/src/balsa-mime-widget-text.c
index 3f9a57984..86fbe8d13 100644
--- a/src/balsa-mime-widget-text.c
+++ b/src/balsa-mime-widget-text.c
@@ -1174,13 +1174,12 @@ bmwt_html_open_with_change_state(GSimpleAction *action,
 {
     GtkWidget *html = user_data;
     gpointer mime_body = g_object_get_data(G_OBJECT(html), "mime-body");
+    GtkWidget *popup_widget = g_object_get_data(G_OBJECT(html), "popup-widget");
 
     open_with_change_state(action, parameter, mime_body);
 
-    if (libbalsa_use_popover()) {
-        GtkPopover *popover = g_object_get_data(G_OBJECT(html), "popup-widget");
-        gtk_popover_popdown(popover);
-    }
+    if (GTK_IS_POPOVER(popup_widget))
+        gtk_popover_popdown((GtkPopover *) popup_widget);
 }
 
 static void


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