[balsa] Check that a child is a GtkLabel



commit 95666b4fd9ae350b05ba27b23fda54e40713bcce
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Mon Jul 17 10:26:59 2017 -0400

    Check that a child is a GtkLabel
    
        * src/balsa-mime-widget-message.c (foreach_label): the only
        children that have a "populate-popup" signal are GtkLabels.

 ChangeLog                       |    5 +++++
 src/balsa-mime-widget-message.c |    5 ++---
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index af59c90..fb1425c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-07-17  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       * src/balsa-mime-widget-message.c (foreach_label): the only
+       children that have a "populate-popup" signal are GtkLabels.
+
 2017-07-16  Peter Bloomfield  <pbloomfield bellsouth net>
 
        * libbalsa/server.c (libbalsa_server_load_config): dereference
diff --git a/src/balsa-mime-widget-message.c b/src/balsa-mime-widget-message.c
index 7da9371..9a023d8 100644
--- a/src/balsa-mime-widget-message.c
+++ b/src/balsa-mime-widget-message.c
@@ -679,10 +679,9 @@ foreach_label(GtkWidget * widget, LibBalsaMessageBody * part)
     g_assert(widget != NULL);
 
     if (GTK_IS_CONTAINER(widget))
-        gtk_container_foreach(GTK_CONTAINER(widget),
+        gtk_container_foreach((GtkContainer *) widget,
                               (GtkCallback) foreach_label, part);
-    else if (g_signal_lookup("populate-popup",
-                             G_TYPE_FROM_INSTANCE(widget)))
+    else if (GTK_IS_LABEL(widget))
         g_signal_connect(widget, "populate-popup",
                          G_CALLBACK(bm_header_extend_popup), part);
 }


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