@classmethod
def setup_file_filter(cls):
    """
            Creates a file filter based on a list of extensions set in the
            'extensions' attribute of the class using the 'description' attribute
            as the name for the filter. If the 'mimetypes' attribute is also set,
            it will also set these. If additional properties are needed, this function
            should be overriden by subclasses.
        """
    if cls.file_filter == None and cls.description != '' and cls.extensions:
        try:
            import gi
            gi.require_version('Gtk', '3.0')
            from gi.repository import Gtk
        except ImportError:
            pass
        else:
            cls.file_filter = Gtk.FileFilter()
            cls.file_filter.set_name(cls.description)
            for mtpe in cls.mimetypes:
                pass
            for expr in cls.extensions:
                cls.file_filter.add_pattern(expr)
            setattr(cls.file_filter, 'parser', cls)
