[Xfce4-commits] [xfce/thunar] 01/02: Wrap text of error dialog

noreply at xfce.org noreply at xfce.org
Sun Oct 6 20:46:10 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 f1c4a91b5949a5439936285a9de874e4f0dedce0
Author: Andre Miranda <andreldm at xfce.org>
Date:   Thu Oct 3 23:37:19 2019 -0300

    Wrap text of error dialog
---
 thunar/thunar-dialogs.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/thunar/thunar-dialogs.c b/thunar/thunar-dialogs.c
index c517790..0f7c80d 100644
--- a/thunar/thunar-dialogs.c
+++ b/thunar/thunar-dialogs.c
@@ -304,6 +304,8 @@ thunar_dialogs_show_error (gpointer      parent,
   GdkScreen *screen;
   va_list    args;
   gchar     *primary_text;
+  GList     *children;
+  GList     *lp;
 
   _thunar_return_if_fail (parent == NULL || GDK_IS_SCREEN (parent) || GTK_IS_WIDGET (parent));
 
@@ -335,12 +337,19 @@ 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)));
+
+  /* the assumption here is that all children are labels */
+  for (lp = children; lp != NULL; lp = lp->next)
+    gtk_label_set_line_wrap_mode (GTK_LABEL (lp->data), PANGO_WRAP_WORD_CHAR);
+
   /* display the dialog */
   gtk_dialog_run (GTK_DIALOG (dialog));
 
   /* cleanup */
   gtk_widget_destroy (dialog);
   g_free (primary_text);
+  g_list_free (children);
 }
 
 

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


More information about the Xfce4-commits mailing list