After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 729532 - GTK 3.12 breaks text line wrapping in non-resizeable modal dialogs
GTK 3.12 breaks text line wrapping in non-resizeable modal dialogs
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: .General
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 642406 723204 (view as bug list)
Depends on: 730693 730694
Blocks: 682886 728218 729305
 
 
Reported: 2014-05-04 18:23 UTC by Jean-François Fortin Tam
Modified: 2018-04-15 00:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot - Gedit's "unsaved changes" dialog (36.99 KB, image/png)
2014-05-04 18:24 UTC, Jean-François Fortin Tam
Details
screenshot - Evolution's mail composer closing confirmation dialog (21.73 KB, image/png)
2014-05-04 18:25 UTC, Jean-François Fortin Tam
Details
screenshot - Pitivi's rendering dialog (65.10 KB, image/png)
2014-05-04 18:26 UTC, Jean-François Fortin Tam
Details

Description Jean-François Fortin Tam 2014-05-04 18:23:50 UTC
I noticed that unresizeable dialogs where text used to nicely wrap (so that you don't end up with lines 1km-long) do not wrap the text anymore... since this affects apps all over the place, I'm suspecting maybe this is a regression bug in gtk?
Comment 1 Jean-François Fortin Tam 2014-05-04 18:24:32 UTC
Created attachment 275839 [details]
screenshot - Gedit's "unsaved changes" dialog
Comment 2 Jean-François Fortin Tam 2014-05-04 18:25:05 UTC
Created attachment 275840 [details]
screenshot - Evolution's mail composer closing confirmation dialog
Comment 3 Jean-François Fortin Tam 2014-05-04 18:26:00 UTC
Created attachment 275841 [details]
screenshot - Pitivi's rendering dialog

The text below the header used to wrap onto at least two lines, which was way easier to read (and nicer to look at).
Comment 4 Matthias Clasen 2014-05-05 11:30:35 UTC
The change that is causing this is that we no longer set an implicit default size of 640x480 on newly created windows, so they grow to fill the monitor.

To prevent this, set a suitable default size on your windows.
Comment 5 Jean-François Fortin Tam 2014-05-24 18:11:51 UTC
Alright, so follow up is bug 728218, bug 730693, bug 730694
Comment 6 Milan Crha 2014-05-27 14:27:52 UTC
(In reply to comment #4)
> The change that is causing this is that we no longer set an implicit default
> size of 640x480 on newly created windows, so they grow to fill the monitor.
> 
> To prevent this, set a suitable default size on your windows.

That is slightly against bug #681937, isn't it? What is the gain, when you remove it on one place, then everyone else will add it on thousands places?
Comment 7 Milan Crha 2014-05-27 16:17:22 UTC
I'm sorry, but I'm reopening this. I tried to use
   gtk_window_set_default_size (window, 640, -1);
which is honoured, but only if the window is resizable. Turning off resizable makes the defined default width forgotten (not honoured). The problem is that if the window contains a GtkLabel with line-wrap set to TRUE, then the window content is broken, as described in bug #681937. Evolution has a workaround for this with the set of resizable to FALSE, but as the two properties doesn't cooperate properly together, then this cannot be fixed.

Matthias, maybe you meant a different default size for the window?
Comment 8 Jean-François Fortin Tam 2014-07-30 19:28:25 UTC
I can confirm what Milan observed in comment 7. Pitivi's rendering progress dialog already had a set default width, but the "resizable" property was False, with the result that text was not wrapping at all.

Setting the "resizable" property to True makes the text wrap, however the height is then incorrectly calculated and you have a huge empty space below the text label.
Comment 9 Jean-François Fortin Tam 2014-09-06 22:27:35 UTC
Matthias, I tried working around this in Pitivi with the solution you suggested; however, as it seems in the last two comments, this can't be worked around by apps because of bugs in GTK+. So Pitivi's bug #728218 is blocked on this.
Comment 10 Matthias Clasen 2014-09-07 21:22:11 UTC
To fix non-breaking labels in non-resizable dialogs, set max-width-chars on the label to a reasonable number, like 50. That works in my testing.
Comment 11 Matthias Clasen 2014-09-08 03:08:22 UTC
*** Bug 723204 has been marked as a duplicate of this bug. ***
Comment 12 Matthias Clasen 2014-09-08 03:23:26 UTC
*** Bug 642406 has been marked as a duplicate of this bug. ***
Comment 13 Matthias Clasen 2014-09-08 20:45:55 UTC
I've now collected all my knowledge about wrapping labels vs. windows in

https://wiki.gnome.org/HowDoI/Labels
Comment 14 Jean-François Fortin Tam 2014-09-28 21:22:47 UTC
Updating the title to reflect the fact that there's still a bug; the only way to get it to work is to set the window to resizable, set a width for the window, and then set the char-width property of the label; but this approach doesn't work if the window is not resizeable.
Comment 15 Matthias Clasen 2014-09-29 01:51:30 UTC
the howdoi also contains advice for resizable windows
Comment 16 Matthias Clasen 2018-02-10 05:09:13 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 17 Matthias Clasen 2018-04-15 00:34:52 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new