There will be about 1h of downtime on 2020-03-02 at 13:00 UTC+1 (change of servers and upgrade to Heptapod 0.20.0 final)

Commit d0e62016 authored by Adrian Buehlmann's avatar Adrian Buehlmann

workbench: store and restore splitter states

parent 89deb25b870f
......@@ -83,9 +83,17 @@ class Workbench(QtGui.QMainWindow, HgDialogMixin):
# restore settings
s = QtCore.QSettings()
wb = "Workbench/"
self.restoreGeometry(s.value(wb + 'geometry').toByteArray())
self.restoreState(s.value(wb + 'windowState').toByteArray())
self.splitternames = []
sn = ('revisions', 'filelist', 'message')
for n in sn:
n += '_splitter'
getattr(self, n).restoreState(s.value(wb + n).toByteArray())
self._repodate = self._getrepomtime()
self._watchrepotimer = self.startTimer(500)
......@@ -545,8 +553,11 @@ class Workbench(QtGui.QMainWindow, HgDialogMixin):
if not self.okToContinue():
s = QtCore.QSettings()
s.setValue("Workbench/geometry", self.saveGeometry());
s.setValue("Workbench/windowState", self.saveState())
wb = "Workbench/"
s.setValue(wb + 'geometry', self.saveGeometry())
s.setValue(wb + 'windowState', self.saveState())
for n in self.splitternames:
s.setValue(wb + n, getattr(self, n).saveState())
def run(ui, *pats, **opts):
from tortoisehg.hgqt import setup_font_substitutions
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment