2022-01-31 00:09:00 +00:00
|
|
|
# Python imports
|
|
|
|
|
|
|
|
# Lib imports
|
|
|
|
|
|
|
|
# Application imports
|
|
|
|
|
|
|
|
|
|
|
|
class IPCSignalsMixin:
|
2022-02-20 07:32:51 +00:00
|
|
|
""" IPCSignalsMixin handle messages from another starting solarfm process. """
|
|
|
|
|
2022-01-31 00:09:00 +00:00
|
|
|
def print_to_console(self, message=None):
|
|
|
|
print(self)
|
|
|
|
print(message)
|
|
|
|
|
|
|
|
def handle_file_from_ipc(self, path):
|
2022-03-13 23:53:43 +00:00
|
|
|
wid, tid = self.fm_controller.get_active_wid_and_tid()
|
|
|
|
notebook = self.builder.get_object(f"window_{wid}")
|
2022-01-31 00:09:00 +00:00
|
|
|
if notebook.is_visible():
|
2022-03-13 23:53:43 +00:00
|
|
|
self.create_tab(wid, None, path)
|
2022-01-31 00:09:00 +00:00
|
|
|
return
|
|
|
|
|
|
|
|
if not self.is_pane4_hidden:
|
2022-03-13 23:53:43 +00:00
|
|
|
self.create_tab(4, None, path)
|
2022-01-31 00:09:00 +00:00
|
|
|
elif not self.is_pane3_hidden:
|
2022-03-13 23:53:43 +00:00
|
|
|
self.create_tab(3, None, path)
|
2022-01-31 00:09:00 +00:00
|
|
|
elif not self.is_pane2_hidden:
|
2022-03-13 23:53:43 +00:00
|
|
|
self.create_tab(2, None, path)
|
2022-01-31 00:09:00 +00:00
|
|
|
elif not self.is_pane1_hidden:
|
2022-03-13 23:53:43 +00:00
|
|
|
self.create_tab(1, None, path)
|