* src/SelectObject.py (on_select_row): Properly get mime type.
svn: r4640
This commit is contained in:
parent
af4dbc6af0
commit
09d5280dcd
@ -1,3 +1,6 @@
|
|||||||
|
2005-05-20 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/SelectObject.py (on_select_row): Properly get mime type.
|
||||||
|
|
||||||
2005-05-19 Don Allingham <don@gramps-project.org>
|
2005-05-19 Don Allingham <don@gramps-project.org>
|
||||||
* src/DisplayModels.py: remove place column
|
* src/DisplayModels.py: remove place column
|
||||||
* src/MediaView.py: delete Place option
|
* src/MediaView.py: delete Place option
|
||||||
|
@ -113,15 +113,14 @@ class SelectObject:
|
|||||||
data = self.object_model.get_data(node,range(self.ncols))
|
data = self.object_model.get_data(node,range(self.ncols))
|
||||||
handle = data[4]
|
handle = data[4]
|
||||||
obj = self.db.get_object_from_handle(handle)
|
obj = self.db.get_object_from_handle(handle)
|
||||||
the_type = Utils.get_mime_description(obj.get_mime_type())
|
the_type = obj.get_mime_type()
|
||||||
path = obj.get_path()
|
path = obj.get_path()
|
||||||
|
|
||||||
if the_type and the_type[0:5] == "image":
|
if the_type and the_type[0:5] == "image":
|
||||||
image = ImgManip.get_thumbnail_image(obj.get_path())
|
image = ImgManip.get_thumbnail_image(path)
|
||||||
self.preview.set_from_pixbuf(image)
|
|
||||||
else:
|
else:
|
||||||
icon_image = Utils.find_mime_type_pixbuf(the_type)
|
image = Utils.find_mime_type_pixbuf(the_type)
|
||||||
self.preview.set_from_pixbuf(icon_image)
|
self.preview.set_from_pixbuf(image)
|
||||||
|
|
||||||
self.object_handle.set_text(obj.get_gramps_id())
|
self.object_handle.set_text(obj.get_gramps_id())
|
||||||
self.object_type.set_text(the_type)
|
self.object_type.set_text(the_type)
|
||||||
|
Loading…
Reference in New Issue
Block a user