def fill_layouts(self): self.layout_ls.clear() for kbd, label in available_keyboards: it = self.layout_ls.append((kbd, label)) if kbd is self.kbd_drawer.kbd: with block_handler(self.layout_cb, self.on_layout_cb_changed): self.layout_cb.set_active_iter(it)
def fill_levels(self): self.level_ls.clear() tutor = self.get_selected_item(self.tutor_cb) if tutor: for id, label in tutor.levels: it = self.level_ls.append((id, label)) if id == self.filler.level: with block_handler(self.level_cb, self.on_level_cb_changed): self.level_cb.set_active_iter(it)
def fill_tutors(self): self.tutor_ls.clear() if self.filler.fullname: for tutor in available_tutors: it = self.tutor_ls.append((tutor, tutor.label)) if tutor.name == self.filler.name: with block_handler(self.tutor_cb, self.on_tutor_cb_changed): self.tutor_cb.set_active_iter(it) self.fill_levels()