New trace debug flag for when using trace module
This commit is contained in:
parent
bee66ee001
commit
59d67874ad
|
@ -64,3 +64,4 @@ class Builtins(IPCServerMixin):
|
||||||
builtins.event_system = Builtins()
|
builtins.event_system = Builtins()
|
||||||
builtins.event_sleep_time = 0.2
|
builtins.event_sleep_time = 0.2
|
||||||
builtins.debug = False
|
builtins.debug = False
|
||||||
|
builtins.trace_debug = False
|
||||||
|
|
|
@ -13,20 +13,23 @@ from __builtins__ import Builtins
|
||||||
|
|
||||||
class Main(Builtins):
|
class Main(Builtins):
|
||||||
def __init__(self, args, unknownargs):
|
def __init__(self, args, unknownargs):
|
||||||
event_system.create_ipc_server()
|
if not debug:
|
||||||
|
event_system.create_ipc_server()
|
||||||
|
|
||||||
time.sleep(0.2)
|
time.sleep(0.2)
|
||||||
if not event_system.is_ipc_alive:
|
if not trace_debug:
|
||||||
if unknownargs:
|
if not event_system.is_ipc_alive:
|
||||||
for arg in unknownargs:
|
if unknownargs:
|
||||||
if os.path.isdir(arg):
|
for arg in unknownargs:
|
||||||
message = f"FILE|{arg}"
|
if os.path.isdir(arg):
|
||||||
event_system.send_ipc_message(message)
|
message = f"FILE|{arg}"
|
||||||
|
event_system.send_ipc_message(message)
|
||||||
|
|
||||||
if args.new_tab and os.path.isdir(args.new_tab):
|
if args.new_tab and os.path.isdir(args.new_tab):
|
||||||
message = f"FILE|{args.new_tab}"
|
message = f"FILE|{args.new_tab}"
|
||||||
event_system.send_ipc_message(message)
|
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()
|
settings = Settings()
|
||||||
|
|
|
@ -24,7 +24,9 @@ class WindowController:
|
||||||
self.active_window_id = ""
|
self.active_window_id = ""
|
||||||
self.active_tab_id = ""
|
self.active_tab_id = ""
|
||||||
self.windows = []
|
self.windows = []
|
||||||
self.fm_event_observer()
|
|
||||||
|
if not trace_debug:
|
||||||
|
self.fm_event_observer()
|
||||||
|
|
||||||
@threaded
|
@threaded
|
||||||
def fm_event_observer(self):
|
def fm_event_observer(self):
|
||||||
|
|
|
@ -31,17 +31,19 @@ class Controller(WidgetFileActionMixin, PaneMixin, WindowMixin, ShowHideMixin, \
|
||||||
|
|
||||||
self.window.connect("delete-event", self.tear_down)
|
self.window.connect("delete-event", self.tear_down)
|
||||||
GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, self.tear_down)
|
GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, self.tear_down)
|
||||||
self.gui_event_observer()
|
|
||||||
|
|
||||||
if unknownargs:
|
if not trace_debug:
|
||||||
for arg in unknownargs:
|
self.gui_event_observer()
|
||||||
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):
|
if unknownargs:
|
||||||
message = f"FILE|{args.new_tab}"
|
for arg in unknownargs:
|
||||||
event_system.send_ipc_message(message)
|
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):
|
def tear_down(self, widget=None, eve=None):
|
||||||
|
|
Loading…
Reference in New Issue