mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
On macOS have to control-click since there is no right mouse button
This commit is contained in:
parent
d1badedfc7
commit
0c5c492333
@ -19,7 +19,7 @@ from PyQt5.QtWebEngineWidgets import (
|
||||
|
||||
from calibre import as_unicode, prints
|
||||
from calibre.constants import (
|
||||
FAKE_HOST, FAKE_PROTOCOL, __version__, is_running_from_develop
|
||||
FAKE_HOST, FAKE_PROTOCOL, __version__, is_running_from_develop, isosx, iswindows
|
||||
)
|
||||
from calibre.ebooks.metadata.book.base import field_metadata
|
||||
from calibre.ebooks.oeb.polish.utils import guess_type
|
||||
@ -172,7 +172,8 @@ def create_profile():
|
||||
ans = getattr(create_profile, 'ans', None)
|
||||
if ans is None:
|
||||
ans = QWebEngineProfile(QApplication.instance())
|
||||
ua = 'calibre-viewer ' + __version__
|
||||
osname = 'windows' if iswindows else ('macos' if isosx else 'linux')
|
||||
ua = 'calibre-viewer {} {}'.format(__version__, osname)
|
||||
ans.setHttpUserAgent(ua)
|
||||
if is_running_from_develop:
|
||||
from calibre.utils.rapydscript import compile_viewer
|
||||
|
@ -78,7 +78,9 @@ def show_controls_help():
|
||||
div = div.nextSibling
|
||||
safe_set_inner_html(div, _('Use the <b>PageUp/PageDn</b> or <b>Arrow keys</b> to turn pages'))
|
||||
div = div.nextSibling
|
||||
safe_set_inner_html(div, _('Press the <b>Esc</b> key or <b>right click</b> to show the viewer controls'))
|
||||
safe_set_inner_html(div, _('Press the <b>Esc</b> key or <b>{} click</b> to show the viewer controls').format(
|
||||
'control' if 'macos' in window.navigator.userAgent else _('right')
|
||||
))
|
||||
div = div.nextSibling
|
||||
safe_set_inner_html(div, _('Press any key to continue…'))
|
||||
focus()
|
||||
|
Loading…
x
Reference in New Issue
Block a user