Changeset feb6fa028eb2…
Parent e6c7741beb1c…
by
Changes to 3 files · Browse files at feb6fa028eb2 Showing diff from parent e6c7741beb1c Diff from another changeset...
@@ -10,6 +10,7 @@ from tortoisehg.hgqt import qtlib
from tortoisehg.util import hglib
from tortoisehg.hgqt.i18n import _
+from tortoisehg.hgqt import repomodel
from PyQt4.QtCore import *
from PyQt4.QtGui import *
@@ -77,5 +78,4 @@ QDialog.reject(self)
def run(ui, *pats, **opts):
- _allcolumns = ('ID', 'Branch', 'Graph', 'Log', 'Author', 'Date', 'Tags',)
- return ColumnSelectDialog(_allcolumns)
+ return ColumnSelectDialog(repomodel.ALLCOLUMNS)
|
@@ -36,6 +36,7 @@ "darkcyan", "gray", "yellow", ]
COLORS = [str(QColor(x).name()) for x in COLORS]
#COLORS = [str(color) for color in QColor.colorNames()]
+ALLCOLUMNS = ('ID', 'Branch', 'Graph', 'Log', 'Author', 'Date', 'Tags',)
def get_color(n, ignore=()):
"""
@@ -122,7 +123,6 @@ """
Model used for displaying the revisions of a Hg *local* repository
"""
- _allcolumns = ('ID', 'Branch', 'Graph', 'Log', 'Author', 'Date', 'Tags',)
_columns = ('ID', 'Branch', 'Graph', 'Log', 'Author', 'Date', 'Tags',)
_stretchs = {'Log': 1, }
@@ -186,7 +186,7 @@ cols = s.value('workbench/columns').toStringList()
cols = [str(col) for col in cols]
if cols:
- validcols = [col for col in cols if col in self._allcolumns]
+ validcols = [col for col in cols if col in ALLCOLUMNS]
self._columns = tuple(validcols)
self.emit(SIGNAL("layoutChanged()"))
|
@@ -17,6 +17,7 @@ from mercurial.error import RepoError
from tortoisehg.util.hglib import tounicode
+from tortoisehg.hgqt import repomodel
from tortoisehg.hgqt.i18n import _
from tortoisehg.hgqt.decorators import timeit
from tortoisehg.hgqt.qtlib import geticon, getfont
@@ -24,6 +25,7 @@from tortoisehg.hgqt.repowidget import RepoWidget
from tortoisehg.hgqt.commit import CommitWidget
from tortoisehg.hgqt.reporegistry import RepoRegistryView
+from tortoisehg.hgqt.logcolumns import ColumnSelectDialog
from tortoisehg.util import paths
@@ -197,6 +199,8 @@ self.actionShowPaths = a = QAction(_("Show Paths"), self)
a.setCheckable(True)
+ self.actionSelectColumns = QAction(_("Choose Log Columns..."), self)
+
a = QAction(_("Show Repository Registry"), self)
a.setCheckable(True)
self.actionShowRepoRegistry = a
@@ -217,6 +221,7 @@ self.menuView = m = QMenu(_("View"), self.menubar)
m.addAction(self.actionShowRepoRegistry)
m.addAction(self.actionShowPaths)
+ m.addAction(self.actionSelectColumns)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuView.menuAction())
@@ -416,6 +421,7 @@ self.actionQuit.triggered.connect(self.close)
self.actionBack.triggered.connect(self.back)
self.actionForward.triggered.connect(self.forward)
+ self.actionSelectColumns.triggered.connect(self.setHistoryColumns)
self.actionShowPaths.toggled.connect(self.actionShowPathsToggled)
self.actionShowRepoRegistry.toggled.connect(self.showRepoRegistry)
@@ -496,6 +502,14 @@ def actionShowPathsToggled(self, show):
self.reporegistry.showPaths(show)
+ def setHistoryColumns(self, *args):
+ """Display the column selection dialog"""
+ dlg = ColumnSelectDialog(repomodel.ALLCOLUMNS)
+ dlg.exec_()
+ self.reload()
+ w = self.repoTabsWidget.currentWidget()
+ w.repoview.resizeColumns()
+
def back(self):
w = self.repoTabsWidget.currentWidget()
if w:
|
Loading...