[qt4] display "maxfilesize" config entry on big file (closes #109863)

authorAlain Leufroy <alain@leufroy.fr>
changeset72978da4b0df
branchdefault
phasedraft
hiddenyes
parent revision#496a3fc2559b [qt4] make pylint a little happier
child revision#66a007d39e82 [qt4] enable Ctrl-Q even if the window toolbar is hidden (closes #109856)
files modified by this revision
hgviewlib/qt4/hgfileview.py
# HG changeset patch
# User Alain Leufroy <alain@leufroy.fr>
# Date 1368251960 -7200
# Sat May 11 07:59:20 2013 +0200
# Node ID 72978da4b0df267aa83354edd16fa9b0a7a9a491
# Parent 496a3fc2559bba561b0e5c0cb2122942a4488c9e
[qt4] display "maxfilesize" config entry on big file (closes #109863)

diff --git a/hgviewlib/qt4/hgfileview.py b/hgviewlib/qt4/hgfileview.py
@@ -372,15 +372,18 @@
1          else:
2              flag, data = self._model.graph.filedata(filename, self._ctx.rev(), mode)
3          if flag == 'file too big':
4              self.filedata_frame.hide()
5              self.filenamelabel.setText(
6 -                '%s %s' %
7 -                (data,
8 -                 ('<a href="show-big-file">Click to display anyway '
9 -                  '<img src=":/icons/heavy_small.png" '
10 -                  'width="16" height="16">.</a>')))
11 +                '%s<br>%s<br>%s' % (
12 +                    data,
13 +                    ('Config value: <font color="red"> maxfilesize=%i</font>' %
14 +                     self.cfg.getMaxFileSize()),
15 +                    ('<a href="show-big-file">Click to display anyway '
16 +                     '<img src=":/icons/heavy_small.png" '
17 +                     'width="16" height="16">.</a>')
18 +            ))
19              return
20          else:
21              self.filedata_frame.show()
22          if flag == '-':
23              return