summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLogan Rathbone <poprocks@gmail.com>2022-04-27 01:12:14 +0000
committerLogan Rathbone <poprocks@gmail.com>2022-04-27 01:12:14 +0000
commit25a92fffc353ebd8ba086663916362f932a643b0 (patch)
tree8d5c7411b4a3d24ed647b464727a08de40d6167c /src
parentMerge branch 'hydrargyrum-master-patch-43242' into 'master' (diff)
parentzenity.ui: make message dialogs non-resizable (diff)
downloadzenity-25a92fffc353ebd8ba086663916362f932a643b0.tar.gz
zenity-25a92fffc353ebd8ba086663916362f932a643b0.tar.bz2
zenity-25a92fffc353ebd8ba086663916362f932a643b0.zip
Merge branch 'wip/davidk/msgdialog-max-width' into 'master'
msg: Fix maximum width to 60 characters See merge request GNOME/zenity!18
Diffstat (limited to 'src')
-rw-r--r--src/msg.c8
-rw-r--r--src/zenity.ui4
2 files changed, 7 insertions, 5 deletions
diff --git a/src/msg.c b/src/msg.c
index 496fe185..92651525 100644
--- a/src/msg.c
+++ b/src/msg.c
@@ -202,12 +202,10 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data) {
if (data->width > -1)
gtk_widget_set_size_request (GTK_WIDGET (text), data->width, -1);
else if (!msg_data->ellipsize && !msg_data->no_wrap) {
- // the magic number 60 is picked from gtk+/gtk/ui/gtkmessagedialog.ui
- // however, 60 would increase the distance between the icon and the
- // text,
- // decreasing to 10 fix it.
+ /* The magic number 60 is taken from gtk+/gtk/ui/gtkmessagedialog.ui
+ with 10 as a minimum width. */
gtk_label_set_width_chars (GTK_LABEL (text), 10);
- gtk_label_set_max_width_chars (GTK_LABEL (text), 10);
+ gtk_label_set_max_width_chars (GTK_LABEL (text), 60);
}
if (data->modal)
diff --git a/src/zenity.ui b/src/zenity.ui
index 2311340b..c1a367c3 100644
--- a/src/zenity.ui
+++ b/src/zenity.ui
@@ -466,6 +466,7 @@
<property name="title" translatable="yes">Error</property>
<property name="window_position">center</property>
<property name="type_hint">dialog</property>
+ <property name="resizable">false</property>
<signal name="destroy" handler="gtk_main_quit" swapped="no"/>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox7">
@@ -682,6 +683,7 @@
<property name="title" translatable="yes">Information</property>
<property name="window_position">center</property>
<property name="type_hint">dialog</property>
+ <property name="resizable">false</property>
<signal name="destroy" handler="gtk_main_quit" swapped="no"/>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox9">
@@ -883,6 +885,7 @@
<property name="title" translatable="yes">Question</property>
<property name="window_position">center</property>
<property name="type_hint">dialog</property>
+ <property name="resizable">false</property>
<signal name="destroy" handler="gtk_main_quit" swapped="no"/>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox3">
@@ -1065,6 +1068,7 @@
<property name="title" translatable="yes">Warning</property>
<property name="window_position">center</property>
<property name="type_hint">dialog</property>
+ <property name="resizable">false</property>
<signal name="destroy" handler="gtk_main_quit" swapped="no"/>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
bgstack15