Yuya Nishihara avatar Yuya Nishihara committed 69ba30e

workbench: rebuild URL combo by refresh action

This provides the last option to keep the url combo sync with the sync widget.

Tested compatibility with PyQt 4.6.2 (CentOS 6).

Comments (0)

Files changed (1)


-        newaction(_("&Refresh"), self._repofwd('reload'), icon='view-refresh',
+        newaction(_("&Refresh"), self.refresh, icon='view-refresh',
                   shortcut='Refresh', enabled='repoopen',
                   menu='view', toolbar='edit',
                   tooltip=_('Refresh current repository'))
         return forwarder
+    # no @pyqtSlot(); as of PyQt 4.9.3, it makes self.sender() wrong through
+    # the following path: reload -> titleChanged -> _updateRepoTabTitle,
+    # if _updateRepoTabTitle is not decorated as @pyqtSlot.
+    def refresh(self):
+        w = self.repoTabsWidget.currentWidget()
+        if w:
+            getattr(w, 'reload')()
+            self._setupUrlCombo(w.repo)
     def _runSyncAction(self, action):
         w = self.repoTabsWidget.currentWidget()
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.