Slow down slidecontroller events to allow buffers to clear.

Line wrap incorrect and fix object name

Fixes: https://launchpad.net/bugs/752374
This commit is contained in:
Tim Bentley 2011-07-02 07:48:17 +01:00
parent 6a259e0489
commit 091cdbbc24
3 changed files with 9 additions and 5 deletions

View File

@ -48,18 +48,18 @@ class ServiceManagerList(QtGui.QTreeWidget):
"""
Set up key bindings and mouse behaviour for the service list
"""
def __init__(self, mainwindow, parent=None, name=None):
def __init__(self, serviceManager, parent=None, name=None):
QtGui.QTreeWidget.__init__(self, parent)
self.mainwindow = mainwindow
self.serviceManager = serviceManager
def keyPressEvent(self, event):
if isinstance(event, QtGui.QKeyEvent):
# here accept the event and do something
if event.key() == QtCore.Qt.Key_Up:
self.mainwindow.onMoveSelectionUp()
self.serviceManager.onMoveSelectionUp()
event.accept()
elif event.key() == QtCore.Qt.Key_Down:
self.mainwindow.onMoveSelectionDown()
self.serviceManager.onMoveSelectionDown()
event.accept()
event.ignore()
else:

View File

@ -27,6 +27,7 @@
import logging
import os
import time
from PyQt4 import QtCore, QtGui
from PyQt4.phonon import Phonon
@ -412,9 +413,11 @@ class SlideController(QtGui.QWidget):
self.display.videoStop()
def servicePrevious(self):
time.sleep(0.1)
Receiver.send_message('servicemanager_previous_item')
def serviceNext(self):
time.sleep(0.1)
Receiver.send_message('servicemanager_next_item')
def screenSizeChanged(self):

View File

@ -984,7 +984,8 @@ class BibleMediaItem(MediaManagerItem):
Search for some Bible verses (by reference).
"""
bible = unicode(self.quickVersionComboBox.currentText())
search_results = self.plugin.manager.get_verses(bible, string, False, False)
search_results = self.plugin.manager.get_verses(bible, string, False,
False)
if search_results:
versetext = u' '.join([verse.text for verse in search_results])
return [[string, versetext]]