def init_window(self, button, event): self.__toggled_button = button self.__curr_event = event self.__new_event = None text = BarInfo.get_repeat_ending_value(event) self.__entry.set_text(text) self.__combobox_entry.grab_focus()
def set_label_from_event(self, button, event): """ Sets the label of RepeatEnding button when the count was changed """ count = BarInfo.get_repeat_ending_value(event) if count == "2": label = "RepeatEnding" else: label = "RepeatEnding " + count button.set_label(label)