mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-23 08:15:53 +01:00
I must be unusually distracted today
This commit is contained in:
parent
8b79484d3a
commit
04fb824def
1 changed files with 2 additions and 1 deletions
|
|
@ -982,12 +982,13 @@ def load_ebook(self, pathtoebook, open_at=None, reopen_at=None):
|
|||
self.action_table_of_contents.setChecked(False)
|
||||
if isbytestring(pathtoebook):
|
||||
pathtoebook = force_unicode(pathtoebook, filesystem_encoding)
|
||||
pathtoebook = os.path.abspath(pathtoebook)
|
||||
vh = vprefs.get('viewer_open_history', [])
|
||||
try:
|
||||
vh.remove(pathtoebook)
|
||||
except:
|
||||
pass
|
||||
vh.insert(0, os.path.abspath(pathtoebook))
|
||||
vh.insert(0, pathtoebook)
|
||||
vprefs.set('viewer_open_history', vh[:50])
|
||||
self.build_recent_menu()
|
||||
self.view.set_book_data(self.iterator)
|
||||
|
|
|
|||
Loading…
Reference in a new issue