#63 can't set dclock to %I:%M (12 hr) format

closed-fixed
nobody
None
5
2010-04-05
2007-08-19
daneli
No

When "ClockFmt = %I:%M" is set in the ~/.fbpanel/default file, fbpanel issues a (spurious) error message and sets the format to 24 hour.

I made a change to dclock.c to fix this.

Around line 170 I changed this:

else if (!g_ascii_strcasecmp(s.t[0], "ClockFmt")) {
if (strcmp(s.t[0], CLOCK_12H_FMT) &&
strcmp(s.t[0], CLOCK_24H_FMT)) {
ERR("dclock: in this version ClockFmt is limited to one of these\n");
ERR("dclock: %s\n", CLOCK_12H_FMT);
ERR("dclock: %s\n", CLOCK_24H_FMT);

to this:

else if (!g_ascii_strcasecmp(s.t[0], "ClockFmt")) {
if (strcmp(s.t[1], CLOCK_12H_FMT) & /*<- HERE */
strcmp(s.t[1], CLOCK_24H_FMT)) { /*< HERE */
ERR("dclock: in this version ClockFmt is limited to one of these\n");
ERR("dclock: %s\n", CLOCK_12H_FMT);
ERR("dclock: %s\n", CLOCK_24H_FMT);

thanks,

dan

Discussion

  • daneli

    daneli - 2007-08-19

    Logged In: YES
    user_id=1669795
    Originator: YES

    I'll try that again:

    if (strcmp(s.t[1], CLOCK_12H_FMT) && /*<- HERE */
    strcmp(s.t[1], CLOCK_24H_FMT)) { /*< HERE */

     
  • Anatoly Asviyan

    Anatoly Asviyan - 2010-04-05
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks