summaryrefslogtreecommitdiffstats
path: root/ui/translation_view.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-05-03 15:35:46 +0200
committerDanilo M. <danix@danix.xyz>2026-05-03 15:35:46 +0200
commit273915dafd51c0ef7aa1ac3f74cb6192497b9b09 (patch)
tree8aa967c54f1088184cb2c32f531f3afbae4efc63 /ui/translation_view.py
parente28ebf9f0d2aaa9a6819f5a09cac05953080c1e9 (diff)
downloadpublisher-273915dafd51c0ef7aa1ac3f74cb6192497b9b09.tar.gz
publisher-273915dafd51c0ef7aa1ac3f74cb6192497b9b09.zip
feat: add typora_args config field for Wayland launch flags
Allows passing extra CLI args (e.g. --ozone-platform=wayland) to Typora at launch without baking them into the binary path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'ui/translation_view.py')
-rw-r--r--ui/translation_view.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/translation_view.py b/ui/translation_view.py
index 6ce53dd..cf72ce5 100644
--- a/ui/translation_view.py
+++ b/ui/translation_view.py
@@ -18,10 +18,11 @@ class TranslationView(QWidget):
push_master = pyqtSignal()
publish = pyqtSignal()
- def __init__(self, transart_script: str, typora_bin: str, parent=None):
+ def __init__(self, transart_script: str, typora_bin: str, typora_args: str = "", parent=None):
super().__init__(parent)
self._transart_script = transart_script
self._typora_bin = typora_bin
+ self._typora_args = typora_args
self._article: Article | None = None
self._worker: TranslationWorker | None = None
self._output_path: str = ""
@@ -106,7 +107,8 @@ class TranslationView(QWidget):
def _open_typora(self):
if self._output_path:
- subprocess.Popen([self._typora_bin, self._output_path])
+ _args = self._typora_args.split() if self._typora_args else []
+ subprocess.Popen([self._typora_bin, *_args, self._output_path])
def _retry(self):
if self._article: