added disable plugin load arg, added disk usage plugin, updated icon gen
This commit is contained in:
@@ -29,9 +29,11 @@ def run():
|
||||
# Add long and short arguments
|
||||
parser.add_argument("--debug", "-d", default="false", help="Do extra console messaging.")
|
||||
parser.add_argument("--trace-debug", "-td", default="false", help="Disable saves, ignore IPC lock, do extra console messaging.")
|
||||
parser.add_argument("--no-plugins", "-np", default="false", help="Do not load plugins.")
|
||||
|
||||
parser.add_argument("--new-tab", "-t", default="", help="Open a file into new tab.")
|
||||
parser.add_argument("--new-window", "-w", default="", help="Open a file into a new window.")
|
||||
|
||||
# Read arguments (If any...)
|
||||
args, unknownargs = parser.parse_known_args()
|
||||
|
||||
|
@@ -26,7 +26,8 @@ class Controller(UIMixin, KeyboardSignalsMixin, IPCSignalsMixin, ExceptionHookMi
|
||||
cm = ContextMenu()
|
||||
cm.build_context_menu()
|
||||
|
||||
self.plugins.launch_plugins()
|
||||
if args.no_plugins == "false":
|
||||
self.plugins.launch_plugins()
|
||||
|
||||
for arg in unknownargs + [args.new_tab,]:
|
||||
if os.path.isdir(arg):
|
||||
|
@@ -3,6 +3,11 @@ import os, subprocess, hashlib
|
||||
from os.path import isfile
|
||||
|
||||
# Gtk imports
|
||||
import gi
|
||||
gi.require_version('Gtk', '3.0')
|
||||
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gio
|
||||
|
||||
# Application imports
|
||||
from .xdg.DesktopEntry import DesktopEntry
|
||||
@@ -36,8 +41,13 @@ class DesktopIconMixin:
|
||||
elif os.path.exists(icon):
|
||||
return self.create_scaled_image(icon, self.sys_icon_wh)
|
||||
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:
|
||||
alt_icon_path = self.traverse_icons_folder(dir, icon)
|
||||
if alt_icon_path != "":
|
||||
|
Reference in New Issue
Block a user