[Xfce4-commits] [xfce/thunar] 02/02: Safer code

noreply at xfce.org noreply at xfce.org
Sun Oct 6 20:46:11 CEST 2019


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       x   f   c   e   -   4   .   1   4   
   in repository xfce/thunar.

commit fa90bc83716118f093a4508a5772635b194eb598
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sun Oct 6 15:44:56 2019 -0300

    Safer code
---
 thunar/thunar-dialogs.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/thunar/thunar-dialogs.c b/thunar/thunar-dialogs.c
index 0f7c80d..c6ac70a 100644
--- a/thunar/thunar-dialogs.c
+++ b/thunar/thunar-dialogs.c
@@ -337,11 +337,13 @@ thunar_dialogs_show_error (gpointer      parent,
   if (G_LIKELY (error != NULL))
     gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s.", error->message);
 
-  children = gtk_container_get_children (GTK_CONTAINER (gtk_message_dialog_get_message_area (dialog)));
+  children = gtk_container_get_children (
+    GTK_CONTAINER (gtk_message_dialog_get_message_area (GTK_MESSAGE_DIALOG (dialog))));
 
-  /* the assumption here is that all children are labels */
+  /* enable wrap for labels */
   for (lp = children; lp != NULL; lp = lp->next)
-    gtk_label_set_line_wrap_mode (GTK_LABEL (lp->data), PANGO_WRAP_WORD_CHAR);
+    if (GTK_IS_LABEL (lp->data))
+      gtk_label_set_line_wrap_mode (GTK_LABEL (lp->data), PANGO_WRAP_WORD_CHAR);
 
   /* display the dialog */
   gtk_dialog_run (GTK_DIALOG (dialog));

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list