summaryrefslogtreecommitdiff
path: root/apps/plugins/calendar.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/calendar.c')
-rw-r--r--apps/plugins/calendar.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c
index 32d4501920..8f25a7adc7 100644
--- a/apps/plugins/calendar.c
+++ b/apps/plugins/calendar.c
@@ -451,7 +451,6 @@ static void draw_calendar(struct shown *shown)
451 int w, h; 451 int w, h;
452 int x, y, pos, days_per_month, j; 452 int x, y, pos, days_per_month, j;
453 int wday; 453 int wday;
454 char buffer[12];
455 const char *monthname[] = { 454 const char *monthname[] = {
456 "Jan", "Feb", "Mar", "Apr", "May", "Jun", 455 "Jan", "Feb", "Mar", "Apr", "May", "Jun",
457 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" 456 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
@@ -472,10 +471,6 @@ static void draw_calendar(struct shown *shown)
472 y = Y_OFFSET + h; 471 y = Y_OFFSET + h;
473 for (j = 1; j <= days_per_month; j++) 472 for (j = 1; j <= days_per_month; j++)
474 { 473 {
475 if ( (day_has_memo[j]) || (wday_has_memo[wday]) )
476 rb->snprintf(buffer, 4, "%02d.", j);
477 else
478 rb->snprintf(buffer, 4, "%02d", j);
479 if (shown->mday == j) 474 if (shown->mday == j)
480 { 475 {
481 rb->lcd_set_drawmode(DRMODE_SOLID); 476 rb->lcd_set_drawmode(DRMODE_SOLID);
@@ -487,7 +482,10 @@ static void draw_calendar(struct shown *shown)
487 { 482 {
488 rb->lcd_set_drawmode(DRMODE_SOLID); 483 rb->lcd_set_drawmode(DRMODE_SOLID);
489 } 484 }
490 rb->lcd_putsxy(x, y, buffer); 485 if ( (day_has_memo[j]) || (wday_has_memo[wday]) )
486 rb->lcd_putsxyf(x, y, "%02d.", j);
487 else
488 rb->lcd_putsxyf(x, y, "%02d", j);
491 x += CELL_WIDTH; 489 x += CELL_WIDTH;
492 wday++; 490 wday++;
493 if (wday >= 7) 491 if (wday >= 7)
@@ -504,9 +502,8 @@ static void draw_calendar(struct shown *shown)
504 rb->lcd_set_drawmode(DRMODE_SOLID); 502 rb->lcd_set_drawmode(DRMODE_SOLID);
505 rb->lcd_vline(LCD_WIDTH-w*8-10, LCD_HEIGHT-h-3, LCD_HEIGHT-1); 503 rb->lcd_vline(LCD_WIDTH-w*8-10, LCD_HEIGHT-h-3, LCD_HEIGHT-1);
506 rb->lcd_hline(LCD_WIDTH-w*8-10, LCD_WIDTH-1, LCD_HEIGHT-h-3); 504 rb->lcd_hline(LCD_WIDTH-w*8-10, LCD_WIDTH-1, LCD_HEIGHT-h-3);
507 rb->snprintf(buffer, sizeof(buffer), "%s %04d", 505 rb->lcd_putsxyf(LCD_WIDTH-w*8-8, LCD_HEIGHT-h-1, "%s %04d",
508 monthname[shown->mon-1], shown->year); 506 monthname[shown->mon-1], shown->year);
509 rb->lcd_putsxy(LCD_WIDTH-w*8-8, LCD_HEIGHT-h-1, buffer);
510 rb->lcd_update(); 507 rb->lcd_update();
511} 508}
512 509