Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 358767
Collapse All | Expand All

(-)file_not_specified_in_diff (-3 / +3 lines)
Line  Link Here
0
-- a/display.c
0
++ b/display.c
Lines 788-799 void cGraphLCDDisplay::DisplayTime() Link Here
788
        const char *amonth = tr("JanFebMarAprMayJunJulAugSepOctNovDec");
788
        const char *amonth = tr("JanFebMarAprMayJunJulAugSepOctNovDec");
789
        amonth += Utf8SymChars(amonth, tm->tm_mon * 3);
789
        amonth += Utf8SymChars(amonth, tm->tm_mon * 3);
790
        strn0cpy(month, amonth, min(Utf8SymChars(amonth, 3) + 1, int(sizeof(month))));
790
        strn0cpy(month, amonth, min(Utf8SymChars(amonth, 3) + 1, int(sizeof(month))));
791
        snprintf(buffer, sizeof(buffer), "%s %2d.%s  %d:%02d", (const char *) WeekDayName(tm->tm_wday), tm->tm_mday, month, tm->tm_hour, tm->tm_min);
791
        snprintf(buffer, sizeof(buffer), "%s %2d.%s  %d:%02d", (const char *) WeekDayName(tm->tm_wday), tm->tm_mday, Convert(month), tm->tm_hour, tm->tm_min);
792
        TextLen = normalFont->Width(buffer);
792
        TextLen = normalFont->Width(buffer);
793
        if (TextLen > std::max(FrameWidth - 2 * TEXT_OFFSET_X, 1))
793
        if (TextLen > std::max(FrameWidth - 2 * TEXT_OFFSET_X, 1))
794
        {
794
        {
795
            snprintf(buffer, sizeof(buffer), "%d.%s  %d:%02d", tm->tm_mday, month, tm->tm_hour, tm->tm_min);
795
            snprintf(buffer, sizeof(buffer), "%d.%s  %d:%02d", tm->tm_mday, Convert(month), tm->tm_hour, tm->tm_min);
796
            TextLen = normalFont->Width(buffer);
796
            TextLen = normalFont->Width(buffer);
797
        }
797
        }

Return to bug 358767