Skip to content

Commit

Permalink
Refresh icon cache after installing a shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjbillington committed May 12, 2020
1 parent cf1f9e3 commit 4322167
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__pycache__
*.egg-info
dist
dist
*.eggs
8 changes: 8 additions & 0 deletions desktop_app/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ def create_shortcut(
)
store.Commit()

# Refresh the icon cache:
shell.SHChangeNotify(
shellcon.SHCNE_ASSOCCHANGED,
shellcon.SHCNF_IDLIST | shellcon.SHCNF_FLUSH,
None,
None,
)

def set_process_appusermodel_id(appid):
_checkwindows()
shell.SetCurrentProcessExplicitAppUserModelID(appid)

0 comments on commit 4322167

Please sign in to comment.