mirror of
https://github.com/gryf/wmdocklib.git
synced 2025-12-19 12:28:10 +01:00
migliorie sul feedback:
se il player è messo in pausa, la barra della cache lampeggia.
This commit is contained in:
@@ -18,6 +18,7 @@ class Application(wmoo.Application):
|
|||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
wmoo.Application.__init__(self, *args, **kwargs)
|
wmoo.Application.__init__(self, *args, **kwargs)
|
||||||
self.child = None
|
self.child = None
|
||||||
|
self._paused = None
|
||||||
self.radioList = []
|
self.radioList = []
|
||||||
self.currentRadio = 0
|
self.currentRadio = 0
|
||||||
self._count = 0
|
self._count = 0
|
||||||
@@ -56,6 +57,7 @@ class Application(wmoo.Application):
|
|||||||
stdin =subprocess.PIPE,
|
stdin =subprocess.PIPE,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=devnull)
|
stderr=devnull)
|
||||||
|
self._paused = False
|
||||||
self._buffered = ''
|
self._buffered = ''
|
||||||
self._buffering = 1
|
self._buffering = 1
|
||||||
self._cacheLevel = 0
|
self._cacheLevel = 0
|
||||||
@@ -70,6 +72,7 @@ class Application(wmoo.Application):
|
|||||||
import os, signal
|
import os, signal
|
||||||
os.kill(self.child.pid, signal.SIGKILL)
|
os.kill(self.child.pid, signal.SIGKILL)
|
||||||
self.child = None
|
self.child = None
|
||||||
|
self._paused = None
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@@ -105,6 +108,9 @@ class Application(wmoo.Application):
|
|||||||
def pauseStream(self, event):
|
def pauseStream(self, event):
|
||||||
if self.child:
|
if self.child:
|
||||||
self.child.stdin.write(' ')
|
self.child.stdin.write(' ')
|
||||||
|
self._paused = not self._paused
|
||||||
|
if self._paused:
|
||||||
|
self._colour = 1
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@@ -119,9 +125,13 @@ class Application(wmoo.Application):
|
|||||||
else:
|
else:
|
||||||
self.putPattern(54, 0, 3, 1, 52, 54-i)
|
self.putPattern(54, 0, 3, 1, 52, 54-i)
|
||||||
else:
|
else:
|
||||||
|
if self._paused:
|
||||||
|
colour = self._colour = 3 - self._colour
|
||||||
|
else:
|
||||||
|
colour = 2
|
||||||
for i in range(-1, 25):
|
for i in range(-1, 25):
|
||||||
if i*4 < self._cacheLevel:
|
if i*4 < self._cacheLevel:
|
||||||
self.putPattern(54, 2, 3, 1, 52, 54-i)
|
self.putPattern(54, colour, 3, 1, 52, 54-i)
|
||||||
else:
|
else:
|
||||||
self.putPattern(54, 0, 3, 1, 52, 54-i)
|
self.putPattern(54, 0, 3, 1, 52, 54-i)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user