mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use the newer technique for setting app uid
This commit is contained in:
parent
8cb9dc1ca1
commit
85b8ee0130
@ -14,10 +14,8 @@ from PyQt5.Qt import QIcon, QObject, Qt, QTimer, pyqtSignal
|
|||||||
from PyQt5.QtWebEngineCore import QWebEngineUrlScheme
|
from PyQt5.QtWebEngineCore import QWebEngineUrlScheme
|
||||||
|
|
||||||
from calibre import as_unicode, prints
|
from calibre import as_unicode, prints
|
||||||
from calibre.constants import FAKE_PROTOCOL, VIEWER_APP_UID, islinux, iswindows
|
from calibre.constants import FAKE_PROTOCOL, VIEWER_APP_UID, islinux
|
||||||
from calibre.gui2 import (
|
from calibre.gui2 import Application, error_dialog, setup_gui_option_parser
|
||||||
Application, error_dialog, set_app_uid, setup_gui_option_parser
|
|
||||||
)
|
|
||||||
from calibre.gui2.viewer.ui import EbookViewer
|
from calibre.gui2.viewer.ui import EbookViewer
|
||||||
from calibre.ptempfile import reset_base_dir
|
from calibre.ptempfile import reset_base_dir
|
||||||
from calibre.utils.config import JSONConfig
|
from calibre.utils.config import JSONConfig
|
||||||
@ -130,13 +128,8 @@ def main(args=sys.argv):
|
|||||||
scheme.setSyntax(QWebEngineUrlScheme.Syntax.Host)
|
scheme.setSyntax(QWebEngineUrlScheme.Syntax.Host)
|
||||||
scheme.setFlags(QWebEngineUrlScheme.SecureScheme)
|
scheme.setFlags(QWebEngineUrlScheme.SecureScheme)
|
||||||
QWebEngineUrlScheme.registerScheme(scheme)
|
QWebEngineUrlScheme.registerScheme(scheme)
|
||||||
if iswindows:
|
|
||||||
# Ensure that all ebook viewer instances are grouped together in the task
|
|
||||||
# bar. This prevents them from being grouped with the editor process when
|
|
||||||
# launched from within calibre, as both use calibre-parallel.exe
|
|
||||||
set_app_uid(VIEWER_APP_UID)
|
|
||||||
override = 'calibre-ebook-viewer' if islinux else None
|
override = 'calibre-ebook-viewer' if islinux else None
|
||||||
app = Application(args, override_program_name=override, color_prefs=vprefs)
|
app = Application(args, override_program_name=override, color_prefs=vprefs, windows_app_uid=VIEWER_APP_UID)
|
||||||
|
|
||||||
parser = option_parser()
|
parser = option_parser()
|
||||||
opts, args = parser.parse_args(args)
|
opts, args = parser.parse_args(args)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user