def __value_changed(self, scale): # Check for position changes during seeking. The `__changed' attribute # is used to signal to the callback function of button_release_event's # that it should perform a seek operation on the playback device. if self.__seeking: self.__changed = True BlaStatusbar.update_position(self.get_value())
def __update_position(self): state = player.get_state() if state == blaconst.STATE_STOPPED: self.set_value(0) elif (not state == blaconst.STATE_PAUSED and not state == blaconst.STATE_STOPPED and not self.__seeking): position = player.get_position() if position != 0: self.set_value(position) BlaStatusbar.update_position(position) return True