Yuya Nishihara avatar Yuya Nishihara committed f59bf9c

workbench: rebuild urlCombo if config of current tab is changed

It shouldn't bother RepoWidget, but currently there's no good way to manage
connections between thgrepo and workbench. So it reuses the design of
repoChanged signal for now.

Comments (0)

Files changed (2)


     beginSuppressPrompt = pyqtSignal()
     endSuppressPrompt = pyqtSignal()
+    # The following signals should be exchanged directly between workbench and
+    # thgrepo. But it isn't possible because workbench cannot filter out known
+    # repo from the result of thgrepo.repository().
     repoChanged = pyqtSignal(QString)
+    repoConfigChanged = pyqtSignal(QString)
     revisionSelected = pyqtSignal(object)
+        self.repoConfigChanged.emit(hglib.tounicode(self.repo.root))
     def updateTaskTabs(self):
         val = self.repo.ui.config('tortoisehg', 'tasktabs', 'off').lower()
         if val == 'east':


                 self.urlCombo.addItem(a, (a, a))
+    #@pyqtSlot()
+    def _setupUrlComboIfCurrent(self):
+        w = self.repoTabsWidget.currentWidget()
+        if self.sender() is w:
+            self._setupUrlCombo(w.repo)
     def _syncUrlFor(self, op):
         """Current URL alias for the given sync operation"""
         urlindex = self.urlCombo.currentIndex()
         tw.setTabToolTip(index, hglib.tounicode(repo.root))
+        rw.repoConfigChanged.connect(self._setupUrlComboIfCurrent)
             lambda icon: tw.setTabIcon(tw.indexOf(rw), icon))
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.