Fix rougue events being generated

This commit is contained in:
Tim Bentley 2013-01-19 12:50:52 +00:00
parent 9d8fc508b0
commit edb7660bc0
3 changed files with 7 additions and 2 deletions

View File

@ -215,8 +215,9 @@ class PhononPlayer(MediaPlayer):
self.stop(display) self.stop(display)
self.set_visible(display, False) self.set_visible(display, False)
if not controller.seekSlider.isSliderDown(): if not controller.seekSlider.isSliderDown():
controller.seekSlider.setSliderPosition( controller.seekSlider.blockSignals(True)
display.mediaObject.currentTime()) controller.seekSlider.setSliderPosition(display.mediaObject.currentTime())
controller.seekSlider.blockSignals(False)
def get_media_display_css(self): def get_media_display_css(self):
""" """

View File

@ -236,7 +236,9 @@ class VlcPlayer(MediaPlayer):
self.stop(display) self.stop(display)
self.set_visible(display, False) self.set_visible(display, False)
if not controller.seekSlider.isSliderDown(): if not controller.seekSlider.isSliderDown():
controller.seekSlider.blockSignals(True)
controller.seekSlider.setSliderPosition(display.vlcMediaPlayer.get_time()) controller.seekSlider.setSliderPosition(display.vlcMediaPlayer.get_time())
controller.seekSlider.blockSignals(False)
def get_info(self): def get_info(self):
return(translate('Media.player', 'VLC is an external player which ' return(translate('Media.player', 'VLC is an external player which '

View File

@ -423,7 +423,9 @@ class WebkitPlayer(MediaPlayer):
controller.media_info.length = length controller.media_info.length = length
controller.seekSlider.setMaximum(length) controller.seekSlider.setMaximum(length)
if not controller.seekSlider.isSliderDown(): if not controller.seekSlider.isSliderDown():
controller.seekSlider.blockSignals(True)
controller.seekSlider.setSliderPosition(currentTime) controller.seekSlider.setSliderPosition(currentTime)
controller.seekSlider.blockSignals(False)
def get_info(self): def get_info(self):
return(translate('Media.player', 'Webkit is a media player which runs ' return(translate('Media.player', 'Webkit is a media player which runs '