Added filters section to config file
This commit is contained in:
parent
57e5b8f2fc
commit
8fc698f46d
|
@ -3,6 +3,11 @@ import os, subprocess, hashlib
|
||||||
from os.path import isfile
|
from os.path import isfile
|
||||||
|
|
||||||
# Gtk imports
|
# Gtk imports
|
||||||
|
import gi
|
||||||
|
gi.require_version('Gtk', '3.0')
|
||||||
|
|
||||||
|
from gi.repository import Gtk
|
||||||
|
from gi.repository import Gio
|
||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
from .xdg.DesktopEntry import DesktopEntry
|
from .xdg.DesktopEntry import DesktopEntry
|
||||||
|
@ -36,8 +41,13 @@ class DesktopIconMixin:
|
||||||
elif os.path.exists(icon):
|
elif os.path.exists(icon):
|
||||||
return self.create_scaled_image(icon, self.sys_icon_wh)
|
return self.create_scaled_image(icon, self.sys_icon_wh)
|
||||||
else:
|
else:
|
||||||
alt_icon_path = ""
|
gio_icon = Gio.Icon.new_for_string(icon)
|
||||||
|
gicon = Gtk.Image.new_from_gicon(gio_icon, 32)
|
||||||
|
pixbuf = gicon.get_pixbuf()
|
||||||
|
if pixbuf:
|
||||||
|
return pixbuf
|
||||||
|
|
||||||
|
alt_icon_path = ""
|
||||||
for dir in self.ICON_DIRS:
|
for dir in self.ICON_DIRS:
|
||||||
alt_icon_path = self.traverse_icons_folder(dir, icon)
|
alt_icon_path = self.traverse_icons_folder(dir, icon)
|
||||||
if alt_icon_path != "":
|
if alt_icon_path != "":
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
"remux_folder_max_disk_usage": "8589934592"
|
"remux_folder_max_disk_usage": "8589934592"
|
||||||
},
|
},
|
||||||
"filters": {
|
"filters": {
|
||||||
|
"meshs": [".blend", ".dae", ".fbx", ".gltf", ".obj", ".stl"],
|
||||||
"code": [".cpp", ".css", ".c", ".go", ".html", ".htm", ".java", ".js", ".json", ".lua", ".md", ".py", ".rs"],
|
"code": [".cpp", ".css", ".c", ".go", ".html", ".htm", ".java", ".js", ".json", ".lua", ".md", ".py", ".rs"],
|
||||||
"videos": [".mkv", ".mp4", ".webm", ".avi", ".mov", ".m4v", ".mpg", ".mpeg", ".wmv", ".flv"],
|
"videos": [".mkv", ".mp4", ".webm", ".avi", ".mov", ".m4v", ".mpg", ".mpeg", ".wmv", ".flv"],
|
||||||
"office": [".doc", ".docx", ".xls", ".xlsx", ".xlt", ".xltx", ".xlm", ".ppt", ".pptx", ".pps", ".ppsx", ".odt", ".rtf"],
|
"office": [".doc", ".docx", ".xls", ".xlsx", ".xlt", ".xltx", ".xlm", ".ppt", ".pptx", ".pps", ".ppsx", ".odt", ".rtf"],
|
||||||
|
|
Loading…
Reference in New Issue