ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rclock.C
(Generate patch)

Comparing rxvt-unicode/src/rclock.C (file contents):
Revision 1.11 by root, Sun Nov 14 18:39:16 2021 UTC vs.
Revision 1.12 by root, Sun Nov 14 18:46:50 2021 UTC

838 static hands_t HandsOld_icon = { -1 }; 838 static hands_t HandsOld_icon = { -1 };
839#endif 839#endif
840#ifdef REMINDERS 840#ifdef REMINDERS
841 static int lastUpdateTime = -10; 841 static int lastUpdateTime = -10;
842#endif 842#endif
843#ifdef DATE_ON_CLOCK_FACE
844 static char clockdate[10];
845#endif
843 846
844#ifdef MAIL 847#ifdef MAIL
845 static time_t mailTime = 0; 848 static time_t mailTime = 0;
846 static int MailUp = 0, MailUp_rvideo = 0; 849 static int MailUp = 0, MailUp_rvideo = 0;
847 850
908 911
909 savedDay = tmval->tm_yday; 912 savedDay = tmval->tm_yday;
910 strftime (str, sizeof (str), "%a %h %d", tmval); 913 strftime (str, sizeof (str), "%a %h %d", tmval);
911 XStoreName (Xdisplay, Clock.win, str); 914 XStoreName (Xdisplay, Clock.win, str);
912 XSetIconName (Xdisplay, Clock.win, str); 915 XSetIconName (Xdisplay, Clock.win, str);
913 }
914 916
917#if defined(REMINDERS) && defined(DATE_ON_CLOCK_FACE)
918 if (show_date)
919 {
920 strftime (clockdate, sizeof (clockdate), "%d", tmval);
921 full_redraw = 1;
922 }
923 }
924
925#endif
915 if (full_redraw) 926 if (full_redraw)
916 XClearWindow (Xdisplay, W->win); 927 XClearWindow (Xdisplay, W->win);
917 928
918#ifdef REMINDERS 929#ifdef REMINDERS
919 /* for a message window, just re-draw the message */ 930 /* for a message window, just re-draw the message */
1031 1042
1032 /* 1043 /*
1033 * Draw the date in the lower half of the clock window. 1044 * Draw the date in the lower half of the clock window.
1034 * The code is enclosed in REMINDERS because it uses the same 1045 * The code is enclosed in REMINDERS because it uses the same
1035 * font as the reminders code. 1046 * font as the reminders code.
1036 * I believe this should be drawn always so it does not get
1037 * "swept away" by the minute hand.
1038 */ 1047 */
1039#if defined(REMINDERS) && defined(DATE_ON_CLOCK_FACE) 1048#if defined(REMINDERS) && defined(DATE_ON_CLOCK_FACE)
1040 if (show_date) 1049 if (show_date)
1041 {
1042 char date[10];
1043
1044 strftime (date, sizeof (date), "%d", tmval);
1045 XDrawString (Xdisplay, W->win, X_gc, 1050 XDrawString (Xdisplay, W->win, X_gc,
1046 ctr_x - XTextWidth (Xfont, date, strlen (date)) / 2, 1051 ctr_x - XTextWidth (Xfont, clockdate, strlen (clockdate)) / 2,
1047 ctr_y + FontHeight () + (ctr_y - FontHeight ()) / 2, date, strlen (date)); 1052 ctr_y + FontHeight () + (ctr_y - FontHeight ()) / 2, clockdate, strlen (clockdate));
1048 }
1049#endif 1053#endif
1050 1054
1051 if (full_redraw) 1055 if (full_redraw)
1052 { 1056 {
1053 int mintick; 1057 int mintick;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines