def _on_record(self, button, model, iter): rec = not model.get_value(iter, 11) wd = SCHED_WEEKDAY_LIST.index(model.get_value(iter, 0)) time = model.get_value(iter, 2) self._sched.set_record_status(rec, wd, time) model.set_value(iter, 11, rec)
def _on_play(self, button, model, iter): play = not model.get_value(iter, 12) wd = SCHED_WEEKDAY_LIST.index(model.get_value(iter, 0)) time = model.get_value(iter, 2) self._sched.set_play_status(play, wd, time) model.set_value(iter, 12, play)
def _model_func(self, model, iter, data): """ Filter by weekday """ prev_day = SCHED_WEEKDAY_LIST.index(self._weekday_filter) prev_day = SCHED_WEEKDAY_LIST[prev_day - 1] return (model[iter][0] == self._weekday_filter) or \ (model[iter][13] and model[iter][0] == prev_day)