From 9a097d05da98cbd1f6d54920cea40f1bb9675e89 Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Wed, 4 May 2016 12:07:21 +0200 Subject: [PATCH] 7390: Gallery tab of Source view does not display .ods files --- gramps/plugins/gramplet/gallery.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gramps/plugins/gramplet/gallery.py b/gramps/plugins/gramplet/gallery.py index 486a19688..7ccc65b0f 100644 --- a/gramps/plugins/gramplet/gallery.py +++ b/gramps/plugins/gramplet/gallery.py @@ -87,7 +87,9 @@ class Gallery(Gramplet): media_handle = media_ref.get_reference_handle() media = self.dbstate.db.get_media_from_handle(media_handle) mime_type = media.get_mime_type() - if mime_type and mime_type.startswith("image"): + #bug 7390 : tab is not highlighted if there are only media + # like pdf, open document, ... + if mime_type: return True return False