mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Linux: Fix calibre not working when used with some old VNC server implementations
This commit is contained in:
parent
eddbcfc921
commit
0009565f8a
@ -174,8 +174,8 @@ elif isosx:
|
|||||||
openssl_inc_dirs = [os.path.join(SSL, 'include')]
|
openssl_inc_dirs = [os.path.join(SSL, 'include')]
|
||||||
openssl_lib_dirs = [os.path.join(SSL, 'lib')]
|
openssl_lib_dirs = [os.path.join(SSL, 'lib')]
|
||||||
else:
|
else:
|
||||||
QT_DLLS += ['Qt5DBus', 'Qt5XcbQpa']
|
QT_DLLS += ['Qt5DBus', 'Qt5XcbQpa', 'Qt5X11Extras']
|
||||||
# PYQT_MODULES += ('QtDBus',)
|
PYQT_MODULES += ('QtX11Extras',)
|
||||||
ft_inc_dirs = pkgconfig_include_dirs('freetype2', 'FT_INC_DIR',
|
ft_inc_dirs = pkgconfig_include_dirs('freetype2', 'FT_INC_DIR',
|
||||||
'/usr/include/freetype2')
|
'/usr/include/freetype2')
|
||||||
ft_lib_dirs = pkgconfig_lib_dirs('freetype2', 'FT_LIB_DIR', '/usr/lib')
|
ft_lib_dirs = pkgconfig_lib_dirs('freetype2', 'FT_LIB_DIR', '/usr/lib')
|
||||||
|
@ -98,7 +98,15 @@ def init_qt(args):
|
|||||||
override = 'calibre-gui' if islinux else None
|
override = 'calibre-gui' if islinux else None
|
||||||
app = Application(args, override_program_name=override)
|
app = Application(args, override_program_name=override)
|
||||||
app.file_event_hook = EventAccumulator()
|
app.file_event_hook = EventAccumulator()
|
||||||
app.setWindowIcon(QIcon(I('library.png', allow_user_override=False)))
|
try:
|
||||||
|
from PyQt5.Qt import QX11Info
|
||||||
|
is_x11 = QX11Info.isPlatformX11()
|
||||||
|
except Exception:
|
||||||
|
is_x11 = False
|
||||||
|
# Ancient broken VNC servers cannot handle icons of size greater than 256
|
||||||
|
# http://www.mobileread.com/forums/showthread.php?t=278447
|
||||||
|
ic = 'lt.png' if is_x11 else 'library.png'
|
||||||
|
app.setWindowIcon(QIcon(I(ic, allow_user_override=False)))
|
||||||
return app, opts, args
|
return app, opts, args
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user