From 9b9fa2d122fab3cc2b07545224d50eefb883dcc9 Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Sun, 17 Sep 2023 21:39:23 -0500 Subject: [PATCH] Fixed unmapped menu options --- .../solarfm-0.0.1/solarfm/core/controller.py | 4 ++++ .../solarfm/core/fs_actions/file_system_actions.py | 14 ++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/versions/solarfm-0.0.1/solarfm/core/controller.py b/src/versions/solarfm-0.0.1/solarfm/core/controller.py index b26c46b..21e9282 100644 --- a/src/versions/solarfm-0.0.1/solarfm/core/controller.py +++ b/src/versions/solarfm-0.0.1/solarfm/core/controller.py @@ -138,8 +138,12 @@ class Controller(UIMixin, SignalsMixins, Controller_Data): event_system.emit("cut_files") if action == "copy": event_system.emit("copy_files") + if action == "copy_path": + event_system.emit("copy_path") if action == "copy_name": event_system.emit("copy_name") + if action == "copy_path_name": + event_system.emit("copy_path_name") if action == "paste": event_system.emit("paste_files") if action == "create": diff --git a/src/versions/solarfm-0.0.1/solarfm/core/fs_actions/file_system_actions.py b/src/versions/solarfm-0.0.1/solarfm/core/fs_actions/file_system_actions.py index c206ca4..561de7b 100644 --- a/src/versions/solarfm-0.0.1/solarfm/core/fs_actions/file_system_actions.py +++ b/src/versions/solarfm-0.0.1/solarfm/core/fs_actions/file_system_actions.py @@ -73,23 +73,21 @@ class FileSystemActions(HandlerMixin, CRUDMixin): state = event_system.emit_and_await("get_current_state") self._to_copy_files = state.uris + def copy_path(self): + state = event_system.emit_and_await("get_current_state") + path = state.tab.get_current_directory() + event_system.emit("set_clipboard_data", (path,)) + def copy_name(self): state = event_system.emit_and_await("get_current_state") if len(state.uris) == 1: file_name = state.uris[0].split("/")[-1] event_system.emit("set_clipboard_data", (file_name,)) - def copy_path(self): - state = event_system.emit_and_await("get_current_state") - path = state.tab.get_current_directory() - print(path) - event_system.emit("set_clipboard_data", (path,)) - def copy_path_name(self): state = event_system.emit_and_await("get_current_state") if len(state.uris) == 1: - file = state.uris[0].replace("file://") - print(file) + file = state.uris[0].replace("file://", "") event_system.emit("set_clipboard_data", (file,)) def open_files(self):