New trace debug flag for when using trace module

This commit is contained in:
itdominator 2022-01-19 23:49:19 -06:00
parent bee66ee001
commit 59d67874ad
4 changed files with 29 additions and 21 deletions

View File

@ -64,3 +64,4 @@ class Builtins(IPCServerMixin):
builtins.event_system = Builtins()
builtins.event_sleep_time = 0.2
builtins.debug = False
builtins.trace_debug = False

View File

@ -13,20 +13,23 @@ from __builtins__ import Builtins
class Main(Builtins):
def __init__(self, args, unknownargs):
event_system.create_ipc_server()
if not debug:
event_system.create_ipc_server()
time.sleep(0.2)
if not event_system.is_ipc_alive:
if unknownargs:
for arg in unknownargs:
if os.path.isdir(arg):
message = f"FILE|{arg}"
event_system.send_ipc_message(message)
if not trace_debug:
if not event_system.is_ipc_alive:
if unknownargs:
for arg in unknownargs:
if os.path.isdir(arg):
message = f"FILE|{arg}"
event_system.send_ipc_message(message)
if args.new_tab and os.path.isdir(args.new_tab):
message = f"FILE|{args.new_tab}"
event_system.send_ipc_message(message)
if args.new_tab and os.path.isdir(args.new_tab):
message = f"FILE|{args.new_tab}"
event_system.send_ipc_message(message)
raise Exception("IPC Server Exists: Will send path(s) to it and close...")
raise Exception("IPC Server Exists: Will send path(s) to it and close...")
settings = Settings()

View File

@ -24,7 +24,9 @@ class WindowController:
self.active_window_id = ""
self.active_tab_id = ""
self.windows = []
self.fm_event_observer()
if not trace_debug:
self.fm_event_observer()
@threaded
def fm_event_observer(self):

View File

@ -31,17 +31,19 @@ class Controller(WidgetFileActionMixin, PaneMixin, WindowMixin, ShowHideMixin, \
self.window.connect("delete-event", self.tear_down)
GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, self.tear_down)
self.gui_event_observer()
if unknownargs:
for arg in unknownargs:
if os.path.isdir(arg):
message = f"FILE|{arg}"
event_system.send_ipc_message(message)
if not trace_debug:
self.gui_event_observer()
if args.new_tab and os.path.isdir(args.new_tab):
message = f"FILE|{args.new_tab}"
event_system.send_ipc_message(message)
if unknownargs:
for arg in unknownargs:
if os.path.isdir(arg):
message = f"FILE|{arg}"
event_system.send_ipc_message(message)
if args.new_tab and os.path.isdir(args.new_tab):
message = f"FILE|{args.new_tab}"
event_system.send_ipc_message(message)
def tear_down(self, widget=None, eve=None):