From 87e6a61f19f1ca0adea77dda7cc5f34e8bf116bc Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Wed, 22 Jun 2011 10:25:49 +0200 Subject: [PATCH] clean ups --- openlp/core/lib/imagemanager.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/openlp/core/lib/imagemanager.py b/openlp/core/lib/imagemanager.py index 92e1055d2..30b46dc00 100644 --- a/openlp/core/lib/imagemanager.py +++ b/openlp/core/lib/imagemanager.py @@ -98,7 +98,7 @@ class PriorityQueue(Queue.PriorityQueue): """ def remove(self, item): """ - Removes the given ``item`` from the queue.remove + Removes the given ``item`` from the queue. ``item`` The item to remove. This should be a tuple:: @@ -127,14 +127,14 @@ class ImageManager(QtCore.QObject): def update_display(self): """ - Screen has changed size so rebuild the cache to new size + Screen has changed size so rebuild the cache to new size. """ log.debug(u'update_display') current_screen = ScreenList.get_instance().current self.width = current_screen[u'size'].width() self.height = current_screen[u'size'].height() - # mark the images as dirty for a rebuild - self._clean_queue = Queue.PriorityQueue() + # Mark the images as dirty for a rebuild. + self._clean_queue = PriorityQueue() for key in self._cache.keys(): image = self._cache[key] image.priority = Priority.Normal @@ -142,13 +142,13 @@ class ImageManager(QtCore.QObject): image.image_bytes = None self._clean_queue.put((image.priority, image)) self._cache_dirty = True - # only one thread please + # We want only one thread. if not self._image_thread.isRunning(): self._image_thread.start() def get_image(self, name): """ - Return the Qimage from the cache + Return the Qimage from the cache. """ print u'get_image:', name log.debug(u'get_image %s' % name) @@ -164,8 +164,8 @@ class ImageManager(QtCore.QObject): def get_image_bytes(self, name): """ - Returns the byte string for an image - If not present wait for the background thread to process it. + Returns the byte string for an image. If not present wait for the + background thread to process it. """ print u'get_image_bytes:', name log.debug(u'get_image_bytes %s' % name)