def next(self): self.stop() selection = get_selection(self.listbox.listbox) if selection != self.listbox.listbox.size() - 1: self.listbox.listbox.select_clear(selection) self.listbox.listbox.select_set(selection + 1) self.update_selection() self.mark_start()
def prev(self): self.stop() selection = get_selection(self.listbox.listbox) if selection != 0: self.listbox.listbox.select_clear(selection) self.listbox.listbox.select_set(selection - 1) self.update_selection() self.mark_start()
def update_selection(self, *args): self.cuestatus.set('stopped') selection = get_selection(self.listbox.listbox) self.current = self.cues[selection] self.cuename.set(self.current.name) self.cuelength.set(self.current.dur) target = ', '.join(['%s -> %.2f' % (n, lev) for n, lev in self.current.get_end_levels().items()]) self.cuetarget.set(target) self.cuetimeelapse.set('0s') self.cuetimeleft.set('%.1fs' % self.current.dur) self.cuepercent.set(0)
def listbox_cb(self, *args): selection = get_selection(self.listbox.listbox) self.disconnect() self.subname.set(self.subnames[selection]) self.listbox.listbox.select_set(selection)