Yuya Nishihara avatar Yuya Nishihara committed da851ca

clean up

Comments (0)

Files changed (2)

close-self-by-wb.diff

 # HG changeset patch
-# Parent 28dd34c43933e1690c0fdbba9c2985ac722393ff
+# Parent ff7b96fc3d0dc20812485f11fd3659a783b6c9e0
 XXX simplify closeSelf
 
 XXX sender() is ThgRepowrapper, not thgrepository!
          repo.configChanged.connect(self.configChanged)
          self.revsetfilter = False
          self.bundle = None  # bundle file name [local encoding]
-@@ -973,10 +971,6 @@ class RepoWidget(QWidget):
-         self.revDetailsWidget.reload()
+@@ -1084,11 +1082,6 @@ class RepoWidget(QWidget):
          self.filterbar.refresh()
  
+     @pyqtSlot()
 -    def repositoryDestroyed(self):
 -        'Repository has detected itself to be deleted'
 -        self.closeSelfSignal.emit(self)
 -
-     @pyqtSlot()
+-    @pyqtSlot()
      def repositoryChanged(self):
          'Repository has detected a changelog / dirstate change'
+         if self.isVisible():
 diff --git a/tortoisehg/hgqt/workbench.py b/tortoisehg/hgqt/workbench.py
 --- a/tortoisehg/hgqt/workbench.py
 +++ b/tortoisehg/hgqt/workbench.py
-@@ -695,20 +695,6 @@ class Workbench(QMainWindow):
+@@ -698,20 +698,6 @@ class Workbench(QMainWindow):
          self.actionBack.setEnabled(rw.canGoBack())
          self.actionForward.setEnabled(rw.canGoForward())
  
      def repoTabCloseRequested(self, index):
          tw = self.repoTabsWidget
          if 0 <= index < tw.count():
-@@ -758,7 +744,6 @@ class Workbench(QMainWindow):
+@@ -762,7 +748,6 @@ class Workbench(QMainWindow):
          '''opens the given repo in a new tab'''
          rw = RepoWidget(repo, self, bundle=bundle)
          rw.showMessageSignal.connect(self.showMessage)
          rw.progress.connect(lambda tp, p, i, u, tl:
              self.statusbar.progress(tp, p, i, u, tl, repo.root))
          rw.output.connect(self.log.output)
-@@ -773,6 +758,8 @@ class Workbench(QMainWindow):
-         rw.baseNodeChanged.connect(self.reporegistry.baseNodeChanged)
-         rw.repoChanged.connect(self.reporegistry.scanRepo)
- 
-+        repo.repositoryDestroyed.connect(self.repositoryDestroyed)  # XXX
-+
-         tw = self.repoTabsWidget
-         # We can open new tabs next to the current one or next to the last tab
-         openTabAfterCurrent = self.ui.configbool('tortoisehg',
+@@ -920,6 +905,7 @@ class Workbench(QMainWindow):
+                     return
+             try:
+                 repo = thgrepo.repository(path=root)
++                repo.repositoryDestroyed.connect(self.repositoryDestroyed)  # XXX
+                 return self.addRepoTab(repo, bundle)
+             except RepoError, e:
+                 qtlib.WarningMsgBox(_('Failed to open repository'),
+close-self-by-wb.diff
 issue2518-try-iterhunks.diff
 less-sysexit.diff
 thgrepo-nocreate.diff
 thgrepo-nowrapsub.diff
 filedata-nosub.diff
 grep-nosub.diff
-close-self-by-wb.diff
 sigsigconnect.diff
 repo-listeners.diff
 repo-stopwatch.diff
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.