* src/AddMedia.py: use new find_mime_type_pixbuf instead of

find_icon
* src/ImageSelect.py: remove internal media widgets, use new
find_mime_type_pixbuf instead of find_icon
* src/ImgManip.py: catch pixbuf_new_from_file exception
* src/MediaView.py: use new find_mime_type_pixbuf instead of
find_icon
* src/SelectObject.py: use new find_mime_type_pixbuf instead of
find_icon
* various: replace the deprecated gtk.TRUE/gtk.FALSE with
True/False


svn: r4085
This commit is contained in:
Don Allingham
2005-02-24 00:25:34 +00:00
parent 827ba0d85b
commit 55a416f422
44 changed files with 217 additions and 223 deletions

View File

@@ -23,6 +23,7 @@ import const
import signal
import md5
import gtk
import gobject
class ImgManip:
def __init__(self,source):
@@ -109,10 +110,16 @@ def set_thumbnail_image(path):
pixbuf = pixbuf.scale_simple(pw,ph,gtk.gdk.INTERP_BILINEAR)
pixbuf.save(_build_thumb_path(path),"jpeg")
except:
import traceback
traceback.print_stack()
print "Could not create thumbnail for",path
def get_thumbnail_image(path):
filename = _build_thumb_path(path)
if not os.path.isfile(filename):
set_thumbnail_image(path)
return gtk.gdk.pixbuf_new_from_file(filename)
try:
return gtk.gdk.pixbuf_new_from_file(filename)
except gobject.GError:
return None