mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Do not scan system for fonts in viewer processes and on multiple calibre invocations
This commit is contained in:
parent
e45cc99e98
commit
a63397353e
@ -764,7 +764,7 @@ qt_app = None
|
||||
class Application(QApplication):
|
||||
|
||||
def __init__(self, args, force_calibre_style=False,
|
||||
override_program_name=None, scan_for_fonts=False):
|
||||
override_program_name=None):
|
||||
self.file_event_hook = None
|
||||
if override_program_name:
|
||||
args = [override_program_name] + args[1:]
|
||||
@ -780,7 +780,6 @@ class Application(QApplication):
|
||||
qt_app = self
|
||||
self._file_open_paths = []
|
||||
self._file_open_lock = RLock()
|
||||
self.load_builtin_fonts(scan_for_fonts=scan_for_fonts)
|
||||
self.setup_styles(force_calibre_style)
|
||||
|
||||
if DEBUG:
|
||||
|
@ -95,7 +95,7 @@ def init_qt(args):
|
||||
QCoreApplication.setOrganizationName(ORG_NAME)
|
||||
QCoreApplication.setApplicationName(APP_UID)
|
||||
override = 'calibre-gui' if islinux else None
|
||||
app = Application(args, override_program_name=override, scan_for_fonts=True)
|
||||
app = Application(args, override_program_name=override)
|
||||
actions = tuple(Main.create_application_menubar())
|
||||
app.setWindowIcon(QIcon(I('lt.png')))
|
||||
return app, opts, args, actions
|
||||
@ -291,6 +291,7 @@ def run_in_debug_mode(logpath=None):
|
||||
|
||||
def run_gui(opts, args, actions, listener, app, gui_debug=None):
|
||||
initialize_file_icon_provider()
|
||||
app.load_builtin_fonts(scan_for_fonts=True)
|
||||
if not dynamic.get('welcome_wizard_was_run', False):
|
||||
from calibre.gui2.wizard import wizard
|
||||
wizard().exec_()
|
||||
|
@ -1137,6 +1137,7 @@ def main(args=sys.argv):
|
||||
if pid <= 0:
|
||||
override = 'calibre-ebook-viewer' if islinux else None
|
||||
app = Application(args, override_program_name=override)
|
||||
app.load_builtin_fonts()
|
||||
app.setWindowIcon(QIcon(I('viewer.png')))
|
||||
QApplication.setOrganizationName(ORG_NAME)
|
||||
QApplication.setApplicationName(APP_UID)
|
||||
|
Loading…
x
Reference in New Issue
Block a user