Taskbar icon on windows (#861)

* Give app an unique ID when launching on Windows
* Improve test coverage
This commit is contained in:
Veronica Berglyd Olsen authored and GitHub committed 2021-08-21 17:10:19 +02:00
1 parent 95c79e1c23
commit 7958cb530f
2 files changed
+42 -21

No files matched your search

+10 -1
View File
@@ -262,7 +262,16 @@ def main(sysArgs=None):
bundle = NSBundle.mainBundle()
info = bundle.localizedInfoDictionary() or bundle.infoDictionary()
info["CFBundleName"] = "novelWriter"
except ImportError:
except Exception:
logger.error("Failed to set application name")
logException()
elif CONFIG.osWindows:
try:
import ctypes
appID = "io.novelwriter.%s" % __version__
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(appID)
except Exception:
logger.error("Failed to set application name")
logException()