Move to reference counting

This commit is contained in:
Tim Bentley 2011-11-27 16:08:42 +00:00
parent 5e702c1782
commit ef884792ac

View File

@ -79,7 +79,7 @@ class SlideController(QtGui.QWidget):
self.songEdit = False self.songEdit = False
self.selectedRow = 0 self.selectedRow = 0
self.serviceItem = None self.serviceItem = None
self.accept_keypress = True self.keypress_count = 0
self.panel = QtGui.QWidget(parent.controlSplitter) self.panel = QtGui.QWidget(parent.controlSplitter)
self.slideList = {} self.slideList = {}
# Layout for holding panel # Layout for holding panel
@ -579,16 +579,18 @@ class SlideController(QtGui.QWidget):
self.display.videoStop() self.display.videoStop()
def servicePrevious(self): def servicePrevious(self):
if self.accept_keypress: self.keypress_count += 1
self.accept_keypress = False if self.keypress_count == 1:
Receiver.send_message('servicemanager_previous_item') while self.keypress_count != 0:
self.accept_keypress = True Receiver.send_message('servicemanager_previous_item')
self.keypress_count -= 1
def serviceNext(self): def serviceNext(self):
if self.accept_keypress: self.keypress_count += 1
self.accept_keypress = False if self.keypress_count == 1:
Receiver.send_message('servicemanager_next_item') while self.keypress_count != 0:
self.accept_keypress = True Receiver.send_message('servicemanager_next_item')
self.keypress_count -= 1
def screenSizeChanged(self): def screenSizeChanged(self):