[balsa/popover: 49/65] balsa-mime-widget-text: Simplify popping down




commit 4b7dd0da6440eb29fbd97e05569edc852b508d80
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]