Blame SOURCES/zenity-3.32.0-msgdialog-label.patch

0fb702
From 1fd887b793bead92b018498625bda041a6c1601d Mon Sep 17 00:00:00 2001
0fb702
From: David King <amigadave@amigadave.com>
0fb702
Date: Mon, 25 Apr 2022 13:42:41 +0100
0fb702
Subject: [PATCH 1/2] msg: Fix maximum width to 60 characters
0fb702
0fb702
Commit 3b64d05e8a1aae1581d2bec7288d80ac4699e1b1 mentioned that labels in
0fb702
message dialogs were set to a maximum width of 60 characters, with
0fb702
inspiration from GtkMessageDialog, but in fact a typo meant that they
0fb702
were set to both a width and maximum width of just 10 characters. This
0fb702
lead to text layout problems, which can be fixed by using the intended
0fb702
maximum of 60 characters.
0fb702
0fb702
https://bugzilla.redhat.com/show_bug.cgi?id=2053530
0fb702
---
0fb702
 src/msg.c | 10 ++++------
0fb702
 1 file changed, 4 insertions(+), 6 deletions(-)
0fb702
0fb702
diff --git a/src/msg.c b/src/msg.c
0fb702
index ca14d86..9265152 100644
0fb702
--- a/src/msg.c
0fb702
+++ b/src/msg.c
0fb702
@@ -202,12 +202,10 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data) {
0fb702
 	if (data->width > -1)
0fb702
 		gtk_widget_set_size_request (GTK_WIDGET (text), data->width, -1);
0fb702
 	else if (!msg_data->ellipsize && !msg_data->no_wrap) {
0fb702
-		// the magic number 60 is picked from gtk+/gtk/ui/gtkmessagedialog.ui
0fb702
-		// however, 60 would increase the distance between the icon and the
0fb702
-		// text,
0fb702
-		// decreasing to 10 fix it.
0fb702
-		gtk_label_set_width_chars (text, 10);
0fb702
-		gtk_label_set_max_width_chars (text, 10);
0fb702
+		/* The magic number 60 is taken from gtk+/gtk/ui/gtkmessagedialog.ui
0fb702
+		   with 10 as a minimum width. */
0fb702
+		gtk_label_set_width_chars (GTK_LABEL (text), 10);
0fb702
+		gtk_label_set_max_width_chars (GTK_LABEL (text), 60);
0fb702
 	}
0fb702
 
0fb702
 	if (data->modal)
0fb702
-- 
0fb702
2.36.1
0fb702
0fb702
0fb702
From ca21da303b468744540c1a7e803850c656415dd0 Mon Sep 17 00:00:00 2001
0fb702
From: David King <amigadave@amigadave.com>
0fb702
Date: Tue, 26 Apr 2022 08:18:18 +0100
0fb702
Subject: [PATCH 2/2] zenity.ui: make message dialogs non-resizable
0fb702
0fb702
Use the approach of GtkMessageDialog, to avoid problems with narrow
0fb702
labels when the dialog text is long.
0fb702
---
0fb702
 src/zenity.ui | 4 ++++
0fb702
 1 file changed, 4 insertions(+)
0fb702
0fb702
diff --git a/src/zenity.ui b/src/zenity.ui
0fb702
index 1359442..546a622 100644
0fb702
--- a/src/zenity.ui
0fb702
+++ b/src/zenity.ui
0fb702
@@ -465,6 +465,7 @@
0fb702
     <property name="title" translatable="yes">Error</property>
0fb702
     <property name="window_position">center</property>
0fb702
     <property name="type_hint">dialog</property>
0fb702
+    <property name="resizable">false</property>
0fb702
     <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
0fb702
     <child internal-child="vbox">
0fb702
       <object class="GtkBox" id="dialog-vbox7">
0fb702
@@ -681,6 +682,7 @@
0fb702
     <property name="title" translatable="yes">Information</property>
0fb702
     <property name="window_position">center</property>
0fb702
     <property name="type_hint">dialog</property>
0fb702
+    <property name="resizable">false</property>
0fb702
     <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
0fb702
     <child internal-child="vbox">
0fb702
       <object class="GtkBox" id="dialog-vbox9">
0fb702
@@ -882,6 +884,7 @@
0fb702
     <property name="title" translatable="yes">Question</property>
0fb702
     <property name="window_position">center</property>
0fb702
     <property name="type_hint">dialog</property>
0fb702
+    <property name="resizable">false</property>
0fb702
     <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
0fb702
     <child internal-child="vbox">
0fb702
       <object class="GtkBox" id="dialog-vbox3">
0fb702
@@ -1064,6 +1067,7 @@
0fb702
     <property name="title" translatable="yes">Warning</property>
0fb702
     <property name="window_position">center</property>
0fb702
     <property name="type_hint">dialog</property>
0fb702
+    <property name="resizable">false</property>
0fb702
     <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
0fb702
     <child internal-child="vbox">
0fb702
       <object class="GtkBox" id="dialog-vbox1">
0fb702
-- 
0fb702
2.36.1
0fb702