! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
clock ballon text (CVS-HEAD)
Status:
CLOSED: FIXED
Product:
Xfce4-panel

Comments

Description edscott editbugs 2003-12-17 14:39:56 CET
On placing the mouse over the clock in the panel, the ballon text reads:
Wednesday, -d December 2003

Seems like the string has a typo (-d in stead of %d)
Comment 1 edscott editbugs 2003-12-17 14:39:58 CET
Additional information:

Affects CVS-HEAD. I dunno if also 4.0.2, but it seems possible.
Comment 2 Jasper Huijsmans editbugs 2003-12-17 14:55:02 CET
Guess this is a gnu extension to strftime then ... Damn! the info page even
says so.

Perhaps you know, how would I get unpadded day numbers, i.e 'Dec 3' instead
of 'Dec 03'? Preferably without #ifdef's ;-)
Comment 3 edscott editbugs 2003-12-17 15:49:15 CET
By default C format will not pad. Thus,
printf ("%s %d","Dec",3); yields "Dec 3"
printf ("%s %2d","Dec",3); yields "Dec 3"
printf ("%s %02d","Dec",3); yields "Dec 03"

But that would have to be within strftime then, which apparently uses %02d for
%d and %2d for %e, and *no* option to get plain %d behaviour.
Maybe you could use a wrapper function which acts on the return of strftime.
Something like using %e for the day field and:

strftime(date,...);
for (i=0;i<strlen(date)-1;i++){
if (*(date+i)=' ' && *(date+i+1)=' ')
g_strchug(date+i+1);
}
Comment 4 Jasper Huijsmans editbugs 2003-12-23 13:25:29 CET
Made it %d for now. Perhaps I'll get back to it later.

Bug #49

Reported by:
edscott
Reported on: 2003-12-17
Last modified on: 2010-11-20

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Version:
Unspecified

Attachments

Additional information