auto save session

This commit is contained in:
Cosmin Popescu 2016-11-01 19:43:37 +01:00
parent ebe656fdf9
commit 3692c86a7e
2 changed files with 8 additions and 0 deletions

View File

@ -685,6 +685,9 @@ class AbstractTab(QWidget):
@pyqtSlot(bool)
def _on_load_finished(self, ok):
if config.get('general', 'auto-save-session'):
sess_manager = objreg.get('session-manager')
sess_manager.session_save()
if ok and not self._has_ssl_errors:
if self.url().scheme() == 'https':
self._set_load_status(usertypes.LoadStatus.success_https)

View File

@ -160,6 +160,11 @@ def data(readonly=False):
SettingValue(typ.Bool(), 'true'),
"Whether to save the config automatically on quit."),
('auto-save-session',
SettingValue(typ.Bool(), 'false'),
"Whether to save the session automatically when a page finishes "
"loading."),
('auto-save-interval',
SettingValue(typ.Int(minval=0, maxval=MAXVALS['int']), '15000'),
"How often (in milliseconds) to auto-save config/cookies/etc."),