Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

manifestdialog: drop dependency on HgDialogMixin

Changeset 946f71a07775

Parent 9db164350487

by Yuya Nishihara

Changes to one file · Browse files at 946f71a07775 Showing diff from parent 9db164350487 Diff from another changeset...

 
30
31
32
33
34
35
36
37
38
39
40
 
41
42
43
 
 
44
45
46
47
48
49
50
51
 
52
53
 
 
54
55
56
57
58
59
60
61
 
62
63
64
 
75
76
77
78
79
80
81
82
83
 
87
88
89
90
 
91
92
93
 
114
115
116
117
 
118
119
 
120
121
122
 
30
31
32
 
33
34
35
36
37
38
 
39
40
41
42
43
44
45
46
47
 
48
49
50
51
52
53
54
55
56
57
58
 
59
60
61
 
 
62
63
64
65
 
76
77
78
 
 
 
79
80
81
 
85
86
87
 
88
89
90
91
 
112
113
114
 
115
116
 
117
118
119
120
@@ -30,35 +30,36 @@
 from tortoisehg.util import paths, thgrepo  from tortoisehg.util.hglib import tounicode   -from tortoisehg.hgqt.dialogmixin import HgDialogMixin  from tortoisehg.hgqt.manifestmodel import ManifestModel  from tortoisehg.hgqt.lexers import get_lexer    connect = QObject.connect     -class ManifestDialog(QMainWindow, HgDialogMixin): +class ManifestDialog(QMainWindow):   """   Qt4 dialog to display all files of a repo at a given revision   """ + max_file_size = 100000 # TODO: make it configurable +   def __init__(self, ui, repo, noderev):   self.repo = repo   QMainWindow.__init__(self) - HgDialogMixin.__init__(self, ui)   self.setWindowTitle('Hg manifest viewer - %s:%s' % (repo.root, noderev))   self.resize(400, 300)     # hg repo + self._ui = ui   self.repo = repo   self.rev = noderev + + self._initwidget()   self.setupModels()   - self.createActions()   self.setupTextview()   self._readsettings()   - def setupUi(self, o): - # TODO: workaround for HgDialogMixin + def _initwidget(self):   self.splitter = QSplitter()   self.setCentralWidget(self.splitter)   self.treeView = QTreeView() @@ -75,9 +76,6 @@
  SIGNAL('currentChanged(const QModelIndex &, const QModelIndex &)'),   self.fileSelected)   - def createActions(self): - pass -   def setupTextview(self):   lay = QHBoxLayout(self.mainFrame)   lay.setSpacing(0) @@ -87,7 +85,7 @@
  sci.setMarginLineNumbers(1, True)   sci.setMarginWidth(1, '000')   sci.setReadOnly(True) - sci.setFont(self._font) + #sci.setFont(self._font) TODO: use ThgFont   sci.setUtf8(True)     sci.SendScintilla(sci.SCI_SETSELEOLFILLED, True) @@ -114,9 +112,9 @@
  data = "binary file"   else:   data = tounicode(data) - lexer = get_lexer(path, data, self.repo.ui) + lexer = get_lexer(path, data, ui=self._ui)   if lexer: - lexer.setFont(self._font) + #lexer.setFont(self._font) # TODO   self.textView.setLexer(lexer)   self._cur_lexer = lexer   nlines = data.count('\n')