Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

make all the RTC tokens in the skins be useable in conditionals (I dare anyone to use %cY though :D )


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24526 a1c6a512-1295-4272-9138-f99709370657

+24
+24
apps/gui/skin_engine/skin_tokens.c
··· 610 610 case WPS_TOKEN_RTC_DAY_OF_MONTH: 611 611 /* d: day of month (01..31) */ 612 612 snprintf(buf, buf_size, "%02d", tm->tm_mday); 613 + if (intval) 614 + *intval = tm->tm_mday - 1; 613 615 return buf; 614 616 615 617 case WPS_TOKEN_RTC_DAY_OF_MONTH_BLANK_PADDED: 616 618 /* e: day of month, blank padded ( 1..31) */ 617 619 snprintf(buf, buf_size, "%2d", tm->tm_mday); 620 + if (intval) 621 + *intval = tm->tm_mday - 1; 618 622 return buf; 619 623 620 624 case WPS_TOKEN_RTC_HOUR_24_ZERO_PADDED: 621 625 /* H: hour (00..23) */ 622 626 snprintf(buf, buf_size, "%02d", tm->tm_hour); 627 + if (intval) 628 + *intval = tm->tm_hour; 623 629 return buf; 624 630 625 631 case WPS_TOKEN_RTC_HOUR_24: 626 632 /* k: hour ( 0..23) */ 627 633 snprintf(buf, buf_size, "%2d", tm->tm_hour); 634 + if (intval) 635 + *intval = tm->tm_hour; 628 636 return buf; 629 637 630 638 case WPS_TOKEN_RTC_HOUR_12_ZERO_PADDED: 631 639 /* I: hour (01..12) */ 632 640 snprintf(buf, buf_size, "%02d", 633 641 (tm->tm_hour % 12 == 0) ? 12 : tm->tm_hour % 12); 642 + if (intval) 643 + *intval = (tm->tm_hour % 12 == 0) ? 12 : tm->tm_hour % 12; 634 644 return buf; 635 645 636 646 case WPS_TOKEN_RTC_HOUR_12: 637 647 /* l: hour ( 1..12) */ 638 648 snprintf(buf, buf_size, "%2d", 639 649 (tm->tm_hour % 12 == 0) ? 12 : tm->tm_hour % 12); 650 + if (intval) 651 + *intval = (tm->tm_hour % 12 == 0) ? 12 : tm->tm_hour % 12; 640 652 return buf; 641 653 642 654 case WPS_TOKEN_RTC_MONTH: ··· 649 661 case WPS_TOKEN_RTC_MINUTE: 650 662 /* M: minute (00..59) */ 651 663 snprintf(buf, buf_size, "%02d", tm->tm_min); 664 + if (intval) 665 + *intval = tm->tm_min; 652 666 return buf; 653 667 654 668 case WPS_TOKEN_RTC_SECOND: 655 669 /* S: second (00..59) */ 656 670 snprintf(buf, buf_size, "%02d", tm->tm_sec); 671 + if (intval) 672 + *intval = tm->tm_sec; 657 673 return buf; 658 674 659 675 case WPS_TOKEN_RTC_YEAR_2_DIGITS: 660 676 /* y: last two digits of year (00..99) */ 661 677 snprintf(buf, buf_size, "%02d", tm->tm_year % 100); 678 + if (intval) 679 + *intval = tm->tm_year % 100; 662 680 return buf; 663 681 664 682 case WPS_TOKEN_RTC_YEAR_4_DIGITS: 665 683 /* Y: year (1970...) */ 666 684 snprintf(buf, buf_size, "%04d", tm->tm_year + 1900); 685 + if (intval) 686 + *intval = tm->tm_year + 1900; 667 687 return buf; 668 688 669 689 case WPS_TOKEN_RTC_AM_PM_UPPER: 670 690 /* p: upper case AM or PM indicator */ 691 + if (intval) 692 + *intval = tm->tm_hour/12 == 0 ? 0 : 1; 671 693 return tm->tm_hour/12 == 0 ? "AM" : "PM"; 672 694 673 695 case WPS_TOKEN_RTC_AM_PM_LOWER: 674 696 /* P: lower case am or pm indicator */ 697 + if (intval) 698 + *intval = tm->tm_hour/12 == 0 ? 0 : 1; 675 699 return tm->tm_hour/12 == 0 ? "am" : "pm"; 676 700 677 701 case WPS_TOKEN_RTC_WEEKDAY_NAME: