develop #11

Merged
itdominator merged 36 commits from develop into master 2023-09-19 01:11:24 +00:00
2 changed files with 10 additions and 8 deletions
Showing only changes of commit 9b9fa2d122 - Show all commits

View File

@ -138,8 +138,12 @@ class Controller(UIMixin, SignalsMixins, Controller_Data):
event_system.emit("cut_files") event_system.emit("cut_files")
if action == "copy": if action == "copy":
event_system.emit("copy_files") event_system.emit("copy_files")
if action == "copy_path":
event_system.emit("copy_path")
if action == "copy_name": if action == "copy_name":
event_system.emit("copy_name") event_system.emit("copy_name")
if action == "copy_path_name":
event_system.emit("copy_path_name")
if action == "paste": if action == "paste":
event_system.emit("paste_files") event_system.emit("paste_files")
if action == "create": if action == "create":

View File

@ -73,23 +73,21 @@ class FileSystemActions(HandlerMixin, CRUDMixin):
state = event_system.emit_and_await("get_current_state") state = event_system.emit_and_await("get_current_state")
self._to_copy_files = state.uris 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): def copy_name(self):
state = event_system.emit_and_await("get_current_state") state = event_system.emit_and_await("get_current_state")
if len(state.uris) == 1: if len(state.uris) == 1:
file_name = state.uris[0].split("/")[-1] file_name = state.uris[0].split("/")[-1]
event_system.emit("set_clipboard_data", (file_name,)) 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): def copy_path_name(self):
state = event_system.emit_and_await("get_current_state") state = event_system.emit_and_await("get_current_state")
if len(state.uris) == 1: if len(state.uris) == 1:
file = state.uris[0].replace("file://") file = state.uris[0].replace("file://", "")
print(file)
event_system.emit("set_clipboard_data", (file,)) event_system.emit("set_clipboard_data", (file,))
def open_files(self): def open_files(self):