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 122393 - Clock applet not resizing itself
Clock applet not resizing itself
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: clock
2.4.x
Other All
: Normal minor
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 127639 142981 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-09-16 00:36 UTC by Egmont Koblinger
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4


Attachments
gnome-panel-2.4.0-dateformathu.patch (427 bytes, patch)
2004-02-24 17:05 UTC, Bart Martens
none Details | Review

Description Egmont Koblinger 2003-09-16 00:36:59 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.)
Comment 1 Robert McMeekin 2003-11-11 02:57:25 UTC
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.
Comment 2 Vincent Untz 2003-11-11 21:46:29 UTC
Robert: please open a new bug for gweather (in the gnome-applets
product). Thanks.
Comment 3 Vincent Untz 2003-12-01 07:38:32 UTC
*** Bug 127639 has been marked as a duplicate of this bug. ***
Comment 4 Bart Martens 2004-02-24 17:05:08 UTC
Created attachment 24728 [details] [review]
gnome-panel-2.4.0-dateformathu.patch
Comment 5 Vincent Untz 2004-02-24 17:08:14 UTC
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)
Comment 6 Bart Martens 2004-02-24 17:29:33 UTC
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"?
Comment 7 Mark McLoughlin 2004-03-01 16:03:01 UTC
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.
                                                                     
                                                                         
Comment 8 William Jon McCann 2004-07-17 20:02:49 UTC
*** Bug 142981 has been marked as a duplicate of this bug. ***