mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Debug prints for failure to load styles
This commit is contained in:
parent
c6c878462e
commit
935049c1b3
@ -12,6 +12,7 @@ from PyQt4.Qt import (QVariant, QFileInfo, QObject, SIGNAL, QBuffer, Qt,
|
|||||||
|
|
||||||
ORG_NAME = 'KovidsBrain'
|
ORG_NAME = 'KovidsBrain'
|
||||||
APP_UID = 'libprs500'
|
APP_UID = 'libprs500'
|
||||||
|
from calibre import prints
|
||||||
from calibre.constants import (islinux, iswindows, isbsd, isfrozen, isosx,
|
from calibre.constants import (islinux, iswindows, isbsd, isfrozen, isosx,
|
||||||
plugins, config_dir, filesystem_encoding, DEBUG)
|
plugins, config_dir, filesystem_encoding, DEBUG)
|
||||||
from calibre.utils.config import Config, ConfigProxy, dynamic, JSONConfig
|
from calibre.utils.config import Config, ConfigProxy, dynamic, JSONConfig
|
||||||
@ -796,7 +797,8 @@ class Application(QApplication):
|
|||||||
|
|
||||||
path = os.path.join(sys.extensions_location, 'calibre_style.'+(
|
path = os.path.join(sys.extensions_location, 'calibre_style.'+(
|
||||||
'pyd' if iswindows else 'so'))
|
'pyd' if iswindows else 'so'))
|
||||||
self.pi.load_style(path, 'Calibre')
|
if not self.pi.load_style(path, 'Calibre'):
|
||||||
|
prints('Failed to load calibre style')
|
||||||
# On OSX, on some machines, colors can be invalid. See https://bugs.launchpad.net/bugs/1014900
|
# On OSX, on some machines, colors can be invalid. See https://bugs.launchpad.net/bugs/1014900
|
||||||
for role in (orig_pal.Button, orig_pal.Window):
|
for role in (orig_pal.Button, orig_pal.Window):
|
||||||
c = orig_pal.brush(role).color()
|
c = orig_pal.brush(role).color()
|
||||||
@ -853,6 +855,8 @@ class Application(QApplication):
|
|||||||
except:
|
except:
|
||||||
import traceback
|
import traceback
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
if not depth_ok:
|
||||||
|
prints('Color depth is less than 32 bits disabling modern look')
|
||||||
|
|
||||||
if force_calibre_style or (depth_ok and gprefs['ui_style'] !=
|
if force_calibre_style or (depth_ok and gprefs['ui_style'] !=
|
||||||
'system'):
|
'system'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user