From dc026f99add121df80bee1fcf7519d830d9c717f Mon Sep 17 00:00:00 2001
From: jvoisin <julien.voisin@dustri.org>
Date: Wed, 18 Jul 2018 23:12:55 +0200
Subject: [PATCH] Show if files are supported or not in the Nautilus extension

---
 nautilus/nautilus_mat2.py | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/nautilus/nautilus_mat2.py b/nautilus/nautilus_mat2.py
index 4d8bb94..0d8df2e 100644
--- a/nautilus/nautilus_mat2.py
+++ b/nautilus/nautilus_mat2.py
@@ -46,18 +46,23 @@ class StatusWindow(Gtk.Window):
         self.main_box.pack_start(listbox, True, True, 0)
         listbox.set_selection_mode(Gtk.SelectionMode.NONE)
         for i in self.items:
+            p, mtype = parser_factory.get_parser(i)
+
             row = Gtk.ListBoxRow()
             hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
             row.add(hbox)
-            mtype, _ = mimetypes.guess_type(i)
-            if mtype is None:
-                icon = Gio.content_type_get_icon ('text/plain')
-            else:
-                icon = Gio.content_type_get_icon (mtype)
+
+            icon = Gio.content_type_get_icon ('text/plain' if not mtype else mtype)
             select_image = Gtk.Image.new_from_gicon(icon, Gtk.IconSize.BUTTON)
             hbox.pack_start(select_image, False, False, 0)
+
+            image = Gtk.Image()
+            image.set_from_stock(Gtk.STOCK_NO if not p else Gtk.STOCK_YES, Gtk.IconSize.BUTTON)
+            hbox.pack_start(image, False, False, 0)
+
             label = Gtk.Label(os.path.basename(i))
             hbox.pack_start(label, True, False, 0)
+
             listbox.add(row)
         listbox.show_all()
 
-- 
GitLab