Click "Read Message" opens message in default text editor

This commit is contained in:
Micah Lee 2021-04-30 17:20:14 -07:00
parent 17966471ab
commit ce6b28dca3
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -308,24 +308,18 @@ class ReceiveHistoryItemMessage(QtWidgets.QWidget):
"""
self.common.log("ReceiveHistoryItemMessage", "open_message", self.filename)
# # Linux
# if self.common.platform == "Linux" or self.common.platform == "BSD":
# try:
# # If nautilus is available, open it
# subprocess.Popen(["xdg-open", self.dir])
# except Exception:
# Alert(
# self.common,
# strings._("gui_open_folder_error").format(abs_filename),
# )
# Linux
if self.common.platform == "Linux" or self.common.platform == "BSD":
# If nautilus is available, open it
subprocess.Popen(["xdg-open", self.filename])
# # macOS
# elif self.common.platform == "Darwin":
# subprocess.call(["open", "-R", abs_filename])
# macOS
elif self.common.platform == "Darwin":
subprocess.call(["open", self.filename])
# # Windows
# elif self.common.platform == "Windows":
# subprocess.Popen(["explorer", f"/select,{abs_filename}"])
# Windows
elif self.common.platform == "Windows":
subprocess.Popen(["notepad", self.filename])
class ReceiveHistoryItem(HistoryItem):