From f0c3bbeedec024372a4006c9f4d5995de29970ef Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Thu, 29 Dec 2011 22:19:23 -0800 Subject: [PATCH] difftool: Add vim navigation to the file list Eliminate custom options and a keyPressEvent() by using the common tree implementation. One benefit of doing this is that we gain a keyPressEvent() which provides vim-style keyboard navigation. Signed-off-by: David Aguilar --- cola/difftool.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cola/difftool.py b/cola/difftool.py index d7b6dc10..213f2ea3 100644 --- a/cola/difftool.py +++ b/cola/difftool.py @@ -7,6 +7,7 @@ from cola import utils from cola import qtutils from cola import gitcmds from cola.widgets import defs +from cola.widgets import standard def launch(args): @@ -41,12 +42,9 @@ class FileDiffDialog(QtGui.QDialog): self.setWindowTitle('Select File(s)') self.setWindowModality(QtCore.Qt.WindowModal) - self._tree = QtGui.QTreeWidget(self) - self._tree.setAlternatingRowColors(True) + self._tree = standard.TreeWidget(self) self._tree.setRootIsDecorated(False) self._tree.setSelectionMode(self._tree.ExtendedSelection) - self._tree.setUniformRowHeights(True) - self._tree.setAllColumnsShowFocus(True) self._tree.setHeaderHidden(True) self._diff_btn = QtGui.QPushButton('Compare') -- 2.11.4.GIT