예제 #1
0
파일: blatoolbar.py 프로젝트: nkoep/blaplay
 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())
예제 #2
0
파일: blatoolbar.py 프로젝트: nkoep/blaplay
 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