1. Yuya Nishihara
  2. hgext-workarounds

Commits

Yuya Nishihara  committed 3314c4f

add dirty extension for separated task tabs

  • Participants
  • Parent commits e9b349d
  • Branches default

Comments (0)

Files changed (1)

File hgext/thgseparatetasktabs.py

View file
  • Ignore whitespace
+"""Dirty hack to separate task tabs widget
+
+Usage::
+
+    [extensions]
+    thgseparatetasktabs = /path/to/hgext/thgseparatetasktabs.py
+"""
+from PyQt4.QtGui import QDialog, QSizePolicy, QVBoxLayout, QWidget
+
+from mercurial import extensions
+
+def _setupUi(orig, self):
+    orig(self)
+    dlg = QDialog(self)
+    dlg.setLayout(QVBoxLayout())
+    dlg.layout().addWidget(self.taskTabsWidget)
+    dlg.show()
+
+    # insert dummy widget in place
+    w = QWidget()
+    w.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Minimum)
+    self.repotabs_splitter.addWidget(w)
+
+def extsetup():
+    try:
+        from tortoisehg.hgqt import repowidget
+    except ImportError:
+        return  # not a thg
+    extensions.wrapfunction(repowidget.RepoWidget, 'setupUi', _setupUi)