* src/plugins/MediaManager.py: conversion functions of path

* src/Utils.py: general methods to convert abs to rel
	* src/Editors/AddMedia.py: show existing descr and select file if pos
	* src/Editors/_EditPerson.py: view photo needs db for media path
	* src/Editors/_EditMedia.py: better path/mime handling
	* src/DataViews/MediaView.py: use full path to view
	Start of issue #1208

2008-02-11 Benny Malengier <benny.malengier@gramps-project.org>


svn: r10017
This commit is contained in:
Benny Malengier
2008-02-11 22:27:24 +00:00
parent c11f6d6a1b
commit a1897e68d9
7 changed files with 132 additions and 74 deletions

View File

@@ -230,7 +230,8 @@ class MediaView(PageView.ListView):
mime_type = ref_obj.get_mime_type()
app = Mime.get_application(mime_type)
if app:
Utils.launch(app[0], ref_obj.get_path())
Utils.launch(app[0], Utils.media_path_full(self.dbstate.db,
ref_obj.get_path()))
else:
ErrorDialog(_("Cannot view %s") % ref_obj.get_path(),
_("GRAMPS cannot find an application that can view "
@@ -325,7 +326,8 @@ class MediaView(PageView.ListView):
self.ttips.disable()
else:
obj = self.dbstate.db.get_object_from_handle(handle)
pix = ThumbNails.get_thumbnail_image(obj.get_path())
pix = ThumbNails.get_thumbnail_image(
Utils.media_path_full(self.dbstate.db, obj.get_path()))
self.image.set_from_pixbuf(pix)
self.ttips.enable()