Merge branch 'master' into wordWrappingEndOfScreenBell
This commit is contained in:
commit
8e2ed903d6
@ -19,7 +19,8 @@ ReadWrite permission
|
|||||||
- sox [its used by default in the generic sound driver for playing sound-icons]
|
- sox [its used by default in the generic sound driver for playing sound-icons]
|
||||||
- speech-dispatcher, python3-speechd [to use the speech-dispatcher driver]
|
- speech-dispatcher, python3-speechd [to use the speech-dispatcher driver]
|
||||||
- brltty, python-brlapi [using braille] # (not implemented yet)
|
- brltty, python-brlapi [using braille] # (not implemented yet)
|
||||||
- gstreamer [soundicons via gstreamer] # not working yet
|
- gstreamer [soundicons via gstreamer]
|
||||||
|
- GLib [soundicons via gstreamer]
|
||||||
- python-pyenchant [spell check functionality]
|
- python-pyenchant [spell check functionality]
|
||||||
- aspell-<language> [your languagedata for spellchecker, english support "aspell-en"]
|
- aspell-<language> [your languagedata for spellchecker, english support "aspell-en"]
|
||||||
- python-daemonize [use fenrir as background service on Unix like systems]
|
- python-daemonize [use fenrir as background service on Unix like systems]
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
from core import debug
|
from core import debug
|
||||||
import gi
|
import gi
|
||||||
import time, threading
|
import time, threading
|
||||||
gi.require_version('Gtk', '3.0')
|
from gi.repository import GLib
|
||||||
from gi.repository import GLib, Gtk
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
gi.require_version('Gst', '1.0')
|
gi.require_version('Gst', '1.0')
|
||||||
@ -49,14 +48,15 @@ class driver:
|
|||||||
self._source.link(self._sink)
|
self._source.link(self._sink)
|
||||||
|
|
||||||
self._initialized = True
|
self._initialized = True
|
||||||
self.thread = threading.Thread(target=self.main)
|
self.mainloop = GLib.MainLoop()
|
||||||
|
self.thread = threading.Thread(target=self.mainloop.run)
|
||||||
self.thread.start()
|
self.thread.start()
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
global _gstreamerAvailable
|
global _gstreamerAvailable
|
||||||
if not _gstreamerAvailable:
|
if not _gstreamerAvailable:
|
||||||
return
|
return
|
||||||
self.cancel()
|
self.cancel()
|
||||||
Gtk.main_quit()
|
self.mainloop.quit()
|
||||||
self._initialized = False
|
self._initialized = False
|
||||||
_gstreamerAvailable = False
|
_gstreamerAvailable = False
|
||||||
|
|
||||||
@ -94,8 +94,7 @@ class driver:
|
|||||||
self._pipeline.set_state(Gst.State.PLAYING)
|
self._pipeline.set_state(Gst.State.PLAYING)
|
||||||
duration = int(1000 * tone.duration)
|
duration = int(1000 * tone.duration)
|
||||||
GLib.timeout_add(duration, self._onTimeout, self._pipeline)
|
GLib.timeout_add(duration, self._onTimeout, self._pipeline)
|
||||||
def main(self):
|
|
||||||
Gtk.main()
|
|
||||||
def cancel(self, element=None):
|
def cancel(self, element=None):
|
||||||
global _gstreamerAvailable
|
global _gstreamerAvailable
|
||||||
if not _gstreamerAvailable:
|
if not _gstreamerAvailable:
|
||||||
|
Loading…
Reference in New Issue
Block a user