From 11ffdeac13b87bb8df0a9c1d92f17185d2ae712f Mon Sep 17 00:00:00 2001 From: Max G Date: Thu, 21 Mar 2019 22:02:08 +0100 Subject: [PATCH] Added info about additional, not displayed events. --- Calendar/E-Paper.py | 5 +++-- Calendar/SingelDayEventListDesign.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Calendar/E-Paper.py b/Calendar/E-Paper.py index 3dec4ad..dc2fea6 100644 --- a/Calendar/E-Paper.py +++ b/Calendar/E-Paper.py @@ -49,7 +49,9 @@ available_panels = { loop_timer = LoopTimer(update_interval, run_on_hour=True) """Main loop starts from here""" -def main (): +def main(): + owm = OwmForecasts.OwmForecasts(location, api_key, paid_api=owm_paid_subscription) + while True: loop_timer.begin_loop() start_time = loop_timer.get_current()[0] @@ -65,7 +67,6 @@ def main (): raise ImportError("choosen_design must be valid (" + choosen_design + ")") debug.print_line("Fetching weather information from open weather map") - owm = OwmForecasts.OwmForecasts(location, api_key, paid_api=owm_paid_subscription) design.add_weather(owm) debug.print_line('Fetching events from your calendar') diff --git a/Calendar/SingelDayEventListDesign.py b/Calendar/SingelDayEventListDesign.py index 40685d5..23e7df0 100644 --- a/Calendar/SingelDayEventListDesign.py +++ b/Calendar/SingelDayEventListDesign.py @@ -9,7 +9,7 @@ class SingelDayEventListDesign (EventListDesign): """Specialized event list for day list design.""" def __init__ (self, size, events, font_size = 16, line_spacing=2, col_spacing=5, general_color="black", background_color="white", highlight_color="red"): prefix_func = lambda x : self.__get_event_prefix__(x) - super().__init__(size, events, text_size=font_size, line_spacing=line_spacing, col_spacing=col_spacing, event_prefix_func=prefix_func, font_family=font) + super().__init__(size, events, text_size=font_size, line_spacing=line_spacing, col_spacing=col_spacing, event_prefix_func=prefix_func, font_family=font, show_more_info=True) def __get_event_prefix__ (self, event): if event.allday: