Ejemplo n.º 1
0
 def clear_histories(self, *args):
     for key, val in iteritems(config.defaults):
         if key.endswith('_search_history') and isinstance(val, list):
             config[key] = []
     self.gui.search.clear_history()
     from calibre.gui2.widgets import history
     for key in (
             'bulk_edit_search_for',
             'bulk_edit_replace_with',
             'viewer-highlights-search-panel-expression',
             'viewer-search-panel-expression',
     ):
         history.set('lineedit_history_' + key, [])
     from calibre.gui2.viewer.config import vprefs
     for k in ('search', 'highlights'):
         vprefs.set(f'saved-{k}-settings', {})
Ejemplo n.º 2
0
 def backend_settings(self, val):
     key = 'tts_' + self.tts_client_class.name
     vprefs.set(key, val or {})
Ejemplo n.º 3
0
 def backend_settings(self, val):
     from calibre.gui2.tts.implementation import Client
     key = 'tts_' + Client.name
     val = val or {}
     vprefs.set(key, val)
     self.tts_client.apply_settings(val)