diff options
Diffstat (limited to 'ui/main_window.py')
| -rw-r--r-- | ui/main_window.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/main_window.py b/ui/main_window.py index cc3326f..b29ff57 100644 --- a/ui/main_window.py +++ b/ui/main_window.py @@ -89,6 +89,7 @@ class MainWindow(QMainWindow): self._translation_view = TranslationView( self.config.transart_script, self.config.typora_bin, + self.config.typora_args, parent=self, ) self._translation_view.push_master.connect(lambda: self._do_git_push("master")) @@ -208,7 +209,8 @@ class MainWindow(QMainWindow): self._stack.setCurrentIndex(self._page_detail) def _do_open_typora(self, article: Article): - subprocess.Popen([self.config.typora_bin, str(article.path)]) + _args = self.config.typora_args.split() if self.config.typora_args else [] + subprocess.Popen([self.config.typora_bin, *_args, str(article.path)]) def _do_open_frontmatter(self, article: Article): from ui.frontmatter_editor import FrontmatterEditor @@ -221,7 +223,8 @@ class MainWindow(QMainWindow): dlg = NewArticleDialog(Path(self.config.blog_repo), self) if dlg.exec() and dlg.created_path: self._refresh_articles() - subprocess.Popen([self.config.typora_bin, str(dlg.created_path)]) + _args = self.config.typora_args.split() if self.config.typora_args else [] + subprocess.Popen([self.config.typora_bin, *_args, str(dlg.created_path)]) def _do_translate(self, article: Article): self._translation_view.start_translation(article) |
