GNOME Bugzilla – Bug 122393
Clock applet not resizing itself
Last modified: 2004-12-22 21:47:04 UTC
The clock applet doesn't resize itself if the length of the date changes. Some locales may have variable month or weekday names. For example in Hungarian (LANG=hu_HU) "Wed" and "Sun" are translated to three-letter while other weekdays are translated to one-letter abbreviations. Furthermore the .po files can have '%a' or similar where the English version doesn't have it. As a result, when the time hits e.g. Wed 00:00, the time string doesn't fit in the applet window. Similar problems may arise if the time isn't printed with leading zero, e.g. 9:59 instead of 09:59 -- one minute later 10:00 won't fit there. (However, if I click on the applet, then it resizes itself.)
The weather applet, too, has trouble resizing itself as the height of the panel changes (at certain heights the temperature will be cut off, please ask me if you need a screenshot to understand what I'm talking about). I think this is related, and I'm scared to start a new bug.
Robert: please open a new bug for gweather (in the gnome-applets product). Thanks.
*** Bug 127639 has been marked as a duplicate of this bug. ***
Created attachment 24728 [details] [review] gnome-panel-2.4.0-dateformathu.patch
Bart: this doesn't look like a good fix: if it works (I didn't test), it will only fix the problem for hu. (oh, and you should add yourself to cc when you attach a patch or add a comment)
The patch only fixes the problem for "hu". I saw that a similar trick is used for "li" and "nl". I submitted a similar patch for "cy": https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109806 Vincent, I agree that this is not the most elegant patch ever submitted. Just re-using an idea that is used before, to have a quick fix. Another solution would be to do automatic resizing to make the text fit. Somehow I don't like that, since the resizing clock applet may push away other applets, and that's something an individual applet shouldn't do by itself, I think. The best solution would be to use the largest text possible to calculate the needed applet width, to have all possible texts fit. But then what with proportional fonts, and font changes... More work to get this right. So the easy way out was the extra spaces being chopped off invisibly. Who has used this initially for "li" and "nl"?
Fixed on HEAD: 2004-03-01 Mark McLoughlin <mark@skynet.ie> * clock.c: (update_clock): queue a resize on the toggle button when the text changes. Fixes bug #122393.
*** Bug 142981 has been marked as a duplicate of this bug. ***