diff --git a/pympress/editable_label.py b/pympress/editable_label.py index 58defd63..59af31ca 100644 --- a/pympress/editable_label.py +++ b/pympress/editable_label.py @@ -321,7 +321,7 @@ class EstimatedTalkTime(EditableLabel): stop_editing_page_number = lambda: None - def __init__(self, builder, ett): + def __init__(self, builder, ett = 0): """ Setup the talk time. Args: @@ -332,11 +332,13 @@ def __init__(self, builder, ett): builder.load_widgets(self) + self.est_time = ett self.label_ett.set_text("{:02}:{:02}".format(*divmod(ett, 60))) self.shortcut_key = 'T' self.event_box = self.eb_ett + def delayed_callback_connection(self, builder): """ Connect callbacks later than at init, due to circular dependencies. Call this when the page_number module is initialized, but before needing the callback. @@ -346,6 +348,7 @@ def delayed_callback_connection(self, builder): """ self.stop_editing_page_number = builder.get_callback_handler('page_number.stop_editing') + def validate(self): """ Update estimated talk time from the input/ """