mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
cf0ad84d57
@ -575,3 +575,8 @@ allow_template_database_functions_in_composites = False
|
|||||||
# for https://whatever URLs. %u is replaced by the URL to be opened. The scheme
|
# for https://whatever URLs. %u is replaced by the URL to be opened. The scheme
|
||||||
# takes a glob pattern allowing a single entry to match multiple URL types.
|
# takes a glob pattern allowing a single entry to match multiple URL types.
|
||||||
openers_by_scheme = {}
|
openers_by_scheme = {}
|
||||||
|
|
||||||
|
#: Set the first day of the week for calendar popups
|
||||||
|
# It must be one of the values Default, Sunday, Monday, Tuesday, Wednesday,
|
||||||
|
# Thursday, Friday, or Saturday, all in English, spelled exactly as shown.
|
||||||
|
calendar_start_day_of_week = 'Default'
|
||||||
|
@ -707,6 +707,12 @@ class DateTimeEdit(QDateTimeEdit):
|
|||||||
self.setMinimumDateTime(UNDEFINED_QDATETIME)
|
self.setMinimumDateTime(UNDEFINED_QDATETIME)
|
||||||
self.setCalendarPopup(True)
|
self.setCalendarPopup(True)
|
||||||
self.cw = CalendarWidget(self)
|
self.cw = CalendarWidget(self)
|
||||||
|
if tweaks['calendar_start_day_of_week'] != 'Default':
|
||||||
|
try:
|
||||||
|
dow = Qt.DayOfWeek[tweaks['calendar_start_day_of_week']]
|
||||||
|
self.cw.setFirstDayOfWeek(dow)
|
||||||
|
except Exception:
|
||||||
|
print(f"Bad value for tweak calendar_start_day_of_week: {tweaks['calendar_start_day_of_week']}")
|
||||||
self.cw.setVerticalHeaderFormat(QCalendarWidget.VerticalHeaderFormat.NoVerticalHeader)
|
self.cw.setVerticalHeaderFormat(QCalendarWidget.VerticalHeaderFormat.NoVerticalHeader)
|
||||||
self.setCalendarWidget(self.cw)
|
self.setCalendarWidget(self.cw)
|
||||||
self.setSpecialValueText(_('Undefined'))
|
self.setSpecialValueText(_('Undefined'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user