Changes on GUI for new player module
This commit is contained in:
parent
062bbcc842
commit
516e20c3b8
@ -136,12 +136,12 @@ class Controller(object):
|
|||||||
ev.Skip()
|
ev.Skip()
|
||||||
|
|
||||||
def on_play_pause(self, *args, **kwargs):
|
def on_play_pause(self, *args, **kwargs):
|
||||||
if player.player.player.is_playing() == 1:
|
if player.player.player.playback_time != None and player.player.player.pause == False:
|
||||||
self.window.play.SetLabel(_(u"Play"))
|
self.window.play.SetLabel(_("Play"))
|
||||||
return player.player.pause()
|
return player.player.pause()
|
||||||
else:
|
else:
|
||||||
self.window.play.SetLabel(_(u"Pause"))
|
self.window.play.SetLabel(_("Pause"))
|
||||||
return player.player.player.play()
|
player.player.player.pause = False
|
||||||
|
|
||||||
def on_next(self, *args, **kwargs):
|
def on_next(self, *args, **kwargs):
|
||||||
return utils.call_threaded(player.player.next)
|
return utils.call_threaded(player.player.next)
|
||||||
@ -212,9 +212,9 @@ class Controller(object):
|
|||||||
|
|
||||||
def on_timer(self, *args, **kwargs):
|
def on_timer(self, *args, **kwargs):
|
||||||
if not self.window.time_slider.HasFocus():
|
if not self.window.time_slider.HasFocus():
|
||||||
if player.player.player != None:
|
if player.player.player.playback_time != None:
|
||||||
progress = (player.player.player.get_position()/player.player.player.get_length())*100
|
progress = (player.player.player.playback_time/(player.player.player.playback_time+player.player.player.playtime_remaining))*100
|
||||||
self.window.time_slider.SetValue(progress)
|
self.window.time_slider.SetValue(int(progress))
|
||||||
|
|
||||||
def on_close(self, event):
|
def on_close(self, event):
|
||||||
log.debug("Exiting...")
|
log.debug("Exiting...")
|
||||||
|
Loading…
Reference in New Issue
Block a user