GEPS008: Create new module for file utilities

svn: r19906
This commit is contained in:
Nick Hall
2012-06-23 22:13:23 +00:00
parent 3ec4c0f80c
commit 2a0b009bdf
51 changed files with 424 additions and 360 deletions

View File

@ -55,7 +55,7 @@ from gen.plug.report import MenuReportOptions
from gen.display.name import displayer as name_displayer
import gen.datehandler
import gen.lib
import Utils
from gen.utils.file import media_path_full, find_file
from gui.thumbnails import get_thumbnail_path
from gen.utils import get_birth_or_fallback, get_death_or_fallback
@ -355,12 +355,12 @@ class RelGraphReport(Report):
mediaMimeType = media.get_mime_type()
if mediaMimeType[0:5] == "image":
imagePath = get_thumbnail_path(
Utils.media_path_full(self.database,
media_path_full(self.database,
media.get_path()),
rectangle=mediaList[0].get_rectangle())
# test if thumbnail actually exists in thumbs
# (import of data means media files might not be present
imagePath = Utils.find_file(imagePath)
imagePath = find_file(imagePath)
label = u""
lineDelimiter = '\\n'