summaryrefslogtreecommitdiff
path: root/src/msg.c
diff options
context:
space:
mode:
authorArx Cruz <arxcruz@gnome.org>2014-05-20 16:05:32 -0300
committerArx Cruz <arxcruz@gnome.org>2014-05-20 16:05:32 -0300
commitec0c2f3292b3db0fdad7f02ed068a97b66f7a2ea (patch)
treebb8d9c30548dc3a93787aa253f6e4bdee5a4062a /src/msg.c
parentFixing deprecated classes in GtkBuilder (diff)
downloadzenity-ec0c2f3292b3db0fdad7f02ed068a97b66f7a2ea.tar.gz
zenity-ec0c2f3292b3db0fdad7f02ed068a97b66f7a2ea.tar.bz2
zenity-ec0c2f3292b3db0fdad7f02ed068a97b66f7a2ea.zip
Add the --ellipsize option to info, error, warning and question dialogs
This option will help people who need to add huge texts in their dialogs and the window size get's very huge due amount of size that GtkLabel requests
Diffstat (limited to 'src/msg.c')
-rw-r--r--src/msg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/msg.c b/src/msg.c
index f4d5e7a9..f5d4dc94 100644
--- a/src/msg.c
+++ b/src/msg.c
@@ -159,6 +159,9 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data)
gtk_label_set_markup (GTK_LABEL (text), g_strcompress (msg_data->dialog_text));
}
+ if (msg_data->ellipsize)
+ gtk_label_set_ellipsize (GTK_LABEL(text), PANGO_ALIGN_RIGHT);
+
if (msg_data->dialog_icon)
gtk_image_set_from_icon_name (GTK_IMAGE (image), msg_data->dialog_icon, GTK_ICON_SIZE_DIALOG);
@@ -176,6 +179,7 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data)
gtk_main ();
}
+
static void
zenity_msg_dialog_response (GtkWidget *widget, int response, gpointer data)
{
bgstack15