diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 8eddd7c7d..4c1c673af 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -19,6 +19,7 @@ from anki.utils import addTags, deleteTags, parseTags from anki.media import rebuildMediaDir from anki.db import OperationalError from anki.stdmodels import BasicModel +import anki.latex import anki.lang import ankiqt ui = ankiqt.ui @@ -1360,7 +1361,12 @@ class AnkiQt(QMainWindow): if p.endswith(".py.off") or p.endswith(".py")] def onOpenPluginFolder(self): - QDesktopServices.openUrl(QUrl("file://" + self.pluginsFolder())) + if sys.platform == "win32": + # reuse our process handling code from latex + anki.latex.call(["explorer", self.pluginsFolder().encode( + sys.getfilesystemencoding())]) + else: + QDesktopServices.openUrl(QUrl("file://" + self.pluginsFolder())) def onGetPlugins(self): QDesktopServices.openUrl(QUrl("http://ichi2.net/anki/wiki/Plugins")) diff --git a/ankiqt/ui/status.py b/ankiqt/ui/status.py index 12918fb6e..533e73367 100644 --- a/ankiqt/ui/status.py +++ b/ankiqt/ui/status.py @@ -78,7 +78,8 @@ class StatusView(object): self.addWidget(self.vertSep(), 0) vbox = QVBoxLayout() vbox.setSpacing(0) - if sys.platform.startswith("darwin"): + if (sys.platform.startswith("darwin") or + sys.platform.startswith("win32")): vbox.setContentsMargins(0,0,0,0) self.progressBar = QProgressBar() self.progressBar.setFixedSize(*progressBarSize)