[qt] remove toolbar visibility config entries (closes #109851)

config entries toolbarrev and toolbardiff are removed. These entries were used to define the default toolbar visibility. Now, they are useless as the default status are set in a more userfriendly way (see 4859c72b5d9b).

authorAlain Leufroy <alain.leufroy@logilab.fr>
changeseta59086e4abf6
branchdefault
phasedraft
hiddenyes
parent revision#4859c72b5d9b [qt4] persistent toolbar visibility (closes #109851)
child revision<not specified>
files modified by this revision
hgviewlib/config.py
hgviewlib/qt4/hgrepoviewer.py
# HG changeset patch
# User Alain Leufroy <alain.leufroy@logilab.fr>
# Date 1365784619 -7200
# Fri Apr 12 18:36:59 2013 +0200
# Node ID a59086e4abf66b7420a55c603ecf509d4c559d83
# Parent 4859c72b5d9b6273f4df90956061c50a0775371b
[qt] remove toolbar visibility config entries (closes #109851)

config entries ``toolbarrev`` and ``toolbardiff`` are removed. These
entries were used to define the default toolbar visibility. Now, they
are useless as the default status are set in a more userfriendly way
(see 4859c72b5d9b).

diff --git a/hgviewlib/config.py b/hgviewlib/config.py
@@ -282,24 +282,10 @@
1          mqhidetags: hide mq tags
2          """
3          return self._fromconfig('mqhidetags', default)
4 
5      @cached
6 -    def getToolBarRevAtStartup(self, default=True):
7 -        """
8 -        toolbarrev: show hidden changeset at startup
9 -        """
10 -        return bool(self._fromconfig('toolbarrev', default))
11 -
12 -    @cached
13 -    def getToolBarDiffAtStartup(self, default=True):
14 -        """
15 -        toolbardiff: show hidden changeset at startup
16 -        """
17 -        return bool(self._fromconfig('toolbardiff', default))
18 -
19 -    @cached
20      def getContentAtStartUp(self, default=True):
21          """
22          contentatstartup: show the content of changeset at startup (bottom part)
23          """
24          return bool(self._fromconfig('contentatstartup', default))
diff --git a/hgviewlib/qt4/hgrepoviewer.py b/hgviewlib/qt4/hgrepoviewer.py
@@ -215,16 +215,14 @@
25 
26          # diff mode toolbar
27          actions = self.textview_status.sci._actions
28          for action_name in ('diffmode', 'prev', 'next', 'show-big-file'):
29              self.toolBar_diff.addAction(actions[action_name])
30 -        self.toolBar_diff.setVisible(self.cfg.getToolBarDiffAtStartup())
31 
32          # rev mod toolbar
33          if self.textview_header.rst_action is not None:
34              self.toolBar_rev.addAction(self.textview_header.rst_action)
35 -        self.toolBar_rev.setVisible(self.cfg.getToolBarRevAtStartup())
36 
37          self.handle_toolbar_visibility()
38 
39      def handle_toolbar_visibility(self):
40          """ set toolbar visibility from persitent settings and handle