Yuya Nishihara committed 115117e

workbench: keep single instance of ServeDialog by DialogKeeper (closes #1845)

This change is intended to eliminate dependency to run.serve, but thankfully
it fixes #1845. If the dialog is minimized to tray, it will be activated again.

Comments (0)

Files changed (1)


 from mercurial.error import RepoError
 from tortoisehg.util import paths, hglib
-from tortoisehg.hgqt import thgrepo, cmdui, qtlib, mq
+from tortoisehg.hgqt import thgrepo, cmdui, qtlib, mq, serve
 from tortoisehg.hgqt.i18n import _
 from tortoisehg.hgqt.repowidget import RepoWidget
 from tortoisehg.hgqt.reporegistry import RepoRegistryView
             getattr(w, op)()
     def serve(self):
-        from tortoisehg.hgqt import run
+    def _createServeDialog(self):
         w = self.repoTabsWidget.currentWidget()
         if w:
-            run.serve(w.repo.ui, root=w.repo.root)
+            return, root=w.repo.root)
-            run.serve(self.ui)
+            return
     def loadall(self):
         w = self.repoTabsWidget.currentWidget()