diff --git a/src/calibre/gui2/widgets2.py b/src/calibre/gui2/widgets2.py index 92f6d31f03..9f2401beb4 100644 --- a/src/calibre/gui2/widgets2.py +++ b/src/calibre/gui2/widgets2.py @@ -36,7 +36,7 @@ class HistoryMixin(object): def initialize(self, name): self._name = name - self.history = history.get(self.store_name, []) + self.history = self.load_history() self.set_separator(None) self.update_items_cache(self.history) self.setText('') @@ -45,6 +45,9 @@ class HistoryMixin(object): except AttributeError: self.lineEdit().editingFinished.connect(self.save_history) + def load_history(self): + return history.get(self.store_name, []) + def save_history(self): ct = unicode_type(self.text()) if len(ct) >= self.min_history_entry_length: