mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Browser viewer: Fix Go to Location not working for positions. Fixes #1920250 [[Content server viewer] Error when trying to go to position in book](https://bugs.launchpad.net/calibre/+bug/1920250)
This commit is contained in:
parent
1387cfc39f
commit
69261e96f5
@ -2,6 +2,7 @@
|
|||||||
# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
|
# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
|
||||||
from __python__ import bound_methods, hash_literals
|
from __python__ import bound_methods, hash_literals
|
||||||
|
|
||||||
|
import traceback
|
||||||
from elementmaker import E
|
from elementmaker import E
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
@ -125,7 +126,7 @@ def create_location_overlay(current_position_data, book, overlay, container):
|
|||||||
ui_operations.goto_book_position(float(src))
|
ui_operations.goto_book_position(float(src))
|
||||||
except:
|
except:
|
||||||
error_dialog(_('Not a valid book position'), _(
|
error_dialog(_('Not a valid book position'), _(
|
||||||
'{} is not a valid book position').format(src))
|
'{} is not a valid book position').format(src), traceback.format_exc())
|
||||||
else:
|
else:
|
||||||
overlay.hide()
|
overlay.hide()
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ class ReadUI:
|
|||||||
ui_operations.goto_cfi = self.goto_cfi.bind(self)
|
ui_operations.goto_cfi = self.goto_cfi.bind(self)
|
||||||
ui_operations.goto_frac = self.goto_frac.bind(self)
|
ui_operations.goto_frac = self.goto_frac.bind(self)
|
||||||
ui_operations.goto_book_position = self.goto_book_position.bind(self)
|
ui_operations.goto_book_position = self.goto_book_position.bind(self)
|
||||||
ui_operations.goto_book_position = self.goto_reference.bind(self)
|
ui_operations.goto_reference = self.goto_reference.bind(self)
|
||||||
ui_operations.delete_book = self.delete_book.bind(self)
|
ui_operations.delete_book = self.delete_book.bind(self)
|
||||||
ui_operations.focus_iframe = self.focus_iframe.bind(self)
|
ui_operations.focus_iframe = self.focus_iframe.bind(self)
|
||||||
ui_operations.toggle_toc = self.toggle_toc.bind(self)
|
ui_operations.toggle_toc = self.toggle_toc.bind(self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user