mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
E-book viewer: Add shortcut option for syncing
Add a shortcut option for syncing last position and annotations. The option is only added for non-standalone viewer mode since book syncing only applies there. No default binding is assigned.
This commit is contained in:
parent
6ee1c3d10c
commit
75b426cc8f
@ -4,6 +4,8 @@ from __python__ import bound_methods, hash_literals
|
||||
|
||||
from gettext import gettext as _
|
||||
|
||||
from read_book.globals import runtime
|
||||
|
||||
|
||||
def parse_key_repr(sc):
|
||||
parts = sc.split('+')
|
||||
@ -363,6 +365,14 @@ def shortcuts_definition():
|
||||
),
|
||||
|
||||
}
|
||||
|
||||
if not runtime.is_standalone_viewer:
|
||||
ans['sync_book'] = desc(
|
||||
v"[]",
|
||||
'ui',
|
||||
_('Sync last read position/annotations'),
|
||||
)
|
||||
|
||||
return ans
|
||||
|
||||
|
||||
|
@ -530,6 +530,8 @@ class View:
|
||||
self.toggle_read_aloud()
|
||||
elif data.name is 'reload_book':
|
||||
ui_operations.reload_book()
|
||||
elif data.name is 'sync_book':
|
||||
self.overlay.sync_book()
|
||||
elif data.name is 'next_section':
|
||||
self.on_next_section({'forward': True})
|
||||
elif data.name is 'previous_section':
|
||||
|
Loading…
x
Reference in New Issue
Block a user