Commits

chris.moore  committed 403d314

Remove the closing tab behaviour.
In fact, remove tabs from visuals by default - the repository registry does what they used to do (save that second click).

  • Participants
  • Parent commits 3e24602

Comments (0)

Files changed (2)

File tortoisehg/hgqt/reporegistry.py

     showMessage = pyqtSignal(QString)
     menuRequested = pyqtSignal(object, object)
     openRepo = pyqtSignal(QString, bool)
-    closeCurrentTab = pyqtSignal()
     dropAccepted = pyqtSignal()
     updateSettingsFile = pyqtSignal()
 
         if not isLeftButton and not isMiddleButton: return
         isMercurialRepo = self.selitem and self.selitem.internalPointer().isRepo() and self.selitem.internalPointer().repotype() == 'hg'
         if isMercurialRepo:
-            if isLeftButton: self.closeCurrentTab.emit()
             self.showFirstTabOrOpen()
 
     def selectionChanged(self, selected, deselected):
 
     showMessage = pyqtSignal(QString)
     openRepo = pyqtSignal(QString, bool)
-    closeCurrentTab = pyqtSignal()
     removeRepo = pyqtSignal(QString)
     progressReceived = pyqtSignal(QString, object, QString, QString, object)
 
         tv.showMessage.connect(self.showMessage)
         tv.menuRequested.connect(self.onMenuRequest)
         tv.openRepo.connect(self.openRepo)
-        tv.closeCurrentTab.connect(self.closeCurrentTab)
         tv.updateSettingsFile.connect(self.updateSettingsFile)
         tv.dropAccepted.connect(self.dropAccepted)
 

File tortoisehg/hgqt/workbench.py

         rr.setObjectName('RepoRegistryView')
         rr.showMessage.connect(self.showMessage)
         rr.openRepo.connect(self.openRepo)
-        rr.closeCurrentTab.connect(self.closeCurrentTab)
         rr.removeRepo.connect(self.removeRepo)
         rr.progressReceived.connect(self.progress)
         rr.hide()
         if actionlist:
             contextmenu.exec_(self.repoTabsWidget.mapToGlobal(point))
 
-    @pyqtSlot()
-    def closeCurrentTab(self):
-        if self.repoTabsWidget.currentIndex() > -1:
-            self.repoTabCloseRequested(self.repoTabsWidget.currentIndex())
-
     def closeLastClickedTab(self):
         if self.repoTabsWidget.lastClickedTab > -1:
             self.repoTabCloseRequested(self.repoTabsWidget.lastClickedTab)
             ((tw.count() == 1) and
              not self.ui.configbool('tortoisehg', 'forcerepotab', False))):
             tw.tabBar().hide()
-        else:
+        elif not self.ui.configbool('tortoisehg', 'nevershowrepotabs', True):
             tw.tabBar().show()
         if tw.count() == 0:
             self.setWindowTitle(_('TortoiseHg Workbench'))