From 6c09cbad6fd5630f883937303fc5e10a5ef8e3dc Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 5 Apr 2016 20:19:21 +0200 Subject: [PATCH] Prevent message text widening window GTK Removing the size request from the label widget of the message field made the width of this field grow with the text displayed in it, and with it the entire board window. This could be prevented by setting an ellipsize mode for it. --- gtk/xoptions.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/gtk/xoptions.c b/gtk/xoptions.c index a13ceff..79e5617 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -1826,8 +1826,10 @@ if(appData.debugMode) printf("n=%d, h=%d, w=%d\n",n,height,width); gtk_window_resize(GTK_WINDOW(dialog), wp[dlgNr]->width, wp[dlgNr]->height); } - for(i=0; option[i].type != EndMark; i++) if(option[i].type == Graph || dlgNr == BoardWindow && option[i].handle) + for(i=0; option[i].type != EndMark; i++) if(option[i].type == Graph || dlgNr == BoardWindow && option[i].handle) { gtk_widget_set_size_request(option[i].handle, -1, -1); // remove size requests after realization, so user can shrink + if(option[i].type == Label) gtk_label_set_ellipsize(option[i].handle, PANGO_ELLIPSIZE_END); + } return 1; // tells caller he must do initialization (e.g. add specific event handlers) } -- 1.7.0.4