More general code clean up

svn: r478
This commit is contained in:
Don Allingham
2001-10-17 00:09:42 +00:00
parent 5c6fac8c16
commit 188e011dd5
7 changed files with 631 additions and 1251 deletions

View File

@@ -24,6 +24,7 @@ from gnome.ui import *
import string
import os
import const
import RelImage
import intl
_ = intl.gettext
@@ -378,3 +379,12 @@ def birthday(person):
return person.getBirth().getQuoteDate()
else:
return ""
def thumb_path(dir,mobj):
type = mobj.getMimeType()
if type[0:5] == "image":
thumb = "%s/.thumb/%s.jpg" % (dir,mobj.getId())
RelImage.check_thumb(mobj.getPath(),thumb,const.thumbScale)
return thumb
else:
return find_icon(type)