From a12878347a237587456ea0ae5862f2c1fc261af9 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 26 Jun 2009 10:51:22 +0900 Subject: [PATCH] force always on top for the video window, add a hook to fix an osx issue --- anki/sound.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/anki/sound.py b/anki/sound.py index cc9b357aa..d3bf37b89 100644 --- a/anki/sound.py +++ b/anki/sound.py @@ -9,7 +9,7 @@ Sound support __docformat__ = 'restructuredtext' import re, sys, threading, time, subprocess, os, signal, atexit, errno -from anki.hooks import addHook +from anki.hooks import addHook, runHook # Shared utils ########################################################################## @@ -111,7 +111,8 @@ if sys.platform.startswith("win32"): os.environ['PATH'] += ";" + dir os.environ['PATH'] += ";" + dir + "\\..\\dist" # for testing else: - mplayerCmd = ["mplayer", "-really-quiet", "-slave", "-idle"] + mplayerCmd = ["mplayer", "-really-quiet", "-slave", "-idle", + "-ontop"] mplayerQueue = [] mplayerManager = None @@ -177,6 +178,7 @@ def queueMplayer(path): mplayerQueue.append(path) mplayerCond.notifyAll() mplayerCond.release() + runHook("soundQueued") def clearMplayerQueue(): mplayerCond.acquire()