[prev in list] [next in list] [prev in thread] [next in thread]
List: moblin-commits
Subject: [Moblin-Commits] moblin-media: Changes to 'master'
From: john () moblin ! org (John Villalovos)
Date: 2008-04-28 12:04:19
Message-ID: 20080428190417.EB8BF92C097 () moblin ! org
[Download RAW message or body]
src/thumbnail_creator.py | 8 ++++++--
src/thumbnail_view.py | 18 ------------------
2 files changed, 6 insertions(+), 20 deletions(-)
New commits:
commit 6acdf4b063e3cc62c6ab8ceb5193dfa53a97b363
Author: John L. Villalovos <john.l.villalovos@intel.com>
Date: Mon Apr 28 12:04:12 2008 -0700
Remove unused class and update some comments
Diff in this email is a maximum of 400 lines.
diff --git a/src/thumbnail_creator.py b/src/thumbnail_creator.py
index 53cf0d4..492596a 100755
--- a/src/thumbnail_creator.py
+++ b/src/thumbnail_creator.py
@@ -255,7 +255,10 @@ class ThumbnailCreator(threading.Thread, thumb_base.ThumbBase):
def __load_from_cache(self, imgdir, imgfile, MediaType, mtime, filesize):
"""Given a path to an image file, try to find that file in the
thumbnail cache, if it exists in the thumbnail cache then populate the
- widget with the thumbnail"""
+ widget with the thumbnail
+
+ Currently we generate thumbnails immediately if we are NOT doing a
+ thumbnail for a video"""
full_path = os.path.join(imgdir, imgfile)
if self.__thumbnail_view.haveThumbnail(imgfile, mtime):
# No need to load anything from cache, it's already in the model
@@ -434,7 +437,8 @@ class ThumbnailCreator(threading.Thread, thumb_base.ThumbBase):
mtime, filesize = self.get_file_detail_info(full_path)
# First try to get the image from the cache
# FIXME: Currently __load_from_cache always generates the
- # image immediately. Should we really be doing that?
+ # thumbail image immediately if we are doing photos.
+ # Should we really be doing that?
if not self.__load_from_cache(imgdir, imgfile, MediaType,
mtime, filesize):
# We couldn't find it in the cache, so we need to
diff --git a/src/thumbnail_view.py b/src/thumbnail_view.py
index f1f902c..c3e2fbe 100755
--- a/src/thumbnail_view.py
+++ b/src/thumbnail_view.py
@@ -73,23 +73,6 @@ class ThumbnailFinger(gtk.IconView):
def get_moko(self):
return self.moko_widget
-class MyLockClass(object):
- def __init__(self, value = 1):
- print "My Lock: %s" % value
- self.__lock = threading.Semaphore(value = value)
- def __enter__(self):
- print "Locking"
- # traceback.print_stack()
- self.__lock.__enter__()
- def __exit__ (self, type, value, tb):
- print "Unlocking", type, value, tb
- if tb is None:
- pass
- else:
- pass
- # traceback.print_stack()
- self.__lock.__exit__(type, value, tb)
-
class ThumbnailSupport(thumb_base.ThumbBase):
def __init__(self, app, mode):
self.__client = app.client
@@ -120,7 +103,6 @@ class ThumbnailSupport(thumb_base.ThumbBase):
######################################################################
# Lock to use when accessing model
self.ListStorLock = threading.Semaphore(value =1)
- # self.ListStorLock = MyLockClass(value = 1)
self.CurrentImgDir = None
self.SelectedItems = list()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic