[XFCE 0000049]: clock ballon text (CVS-HEAD)
xfce-bugs at xfce.org
xfce-bugs at xfce.org
Tue Dec 23 14:25:44 CET 2003
The following bug has been CLOSED
=======================================================================
http://bugs.xfce.org/view_bug_page.php?f_id=0000049
=======================================================================
Reporter: edscott
Handler: huysmans
=======================================================================
Project: XFCE
Bug ID: 0000049
Category: panel
Reproducibility: always
Severity: text
Priority: normal
Status: closed
=======================================================================
Date Submitted: 2003-12-17 14:39 GMT
Last Modified: 2003-12-23 13:25 GMT
=======================================================================
Summary: clock ballon text (CVS-HEAD)
Description:
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)
=======================================================================
-----------------------------------------------------------------------
huysmans - 2003-12-17 14:55 GMT
-----------------------------------------------------------------------
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 ;-)
-----------------------------------------------------------------------
edscott - 2003-12-17 15:49 GMT
-----------------------------------------------------------------------
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);
}
-----------------------------------------------------------------------
huysmans - 2003-12-23 13:25 GMT
-----------------------------------------------------------------------
Made it %d for now. Perhaps I'll get back to it later.
More information about the Xfce-dev
mailing list