Skip to content

Commit

Permalink
Make the icon work from "odg" as well
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinse committed Sep 11, 2024
1 parent f3b2bf5 commit 0417ba5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions src/objdictgen/ui/networkedit.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,12 @@ def RefreshBufferState(self):


def uimain(project):

# Set the application ID for Windows taskbar
if sys.platform == "win32":
myappid = 'objdictgen.objdictedit.' + objdictgen.__version__
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)

app = wx.PySimpleApp()

wx.InitAllImageHandlers()
Expand Down Expand Up @@ -450,9 +456,4 @@ def main():
usage()
sys.exit(2)

# Set the application ID for Windows taskbar
if sys.platform == "win32":
myappid = 'objdictgen.objdictedit.' + objdictgen.__version__
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)

uimain(project)
11 changes: 6 additions & 5 deletions src/objdictgen/ui/objdictedit.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,12 @@ def OnExportCMenu(self, event): # pylint: disable=unused-argument


def uimain(args):

# Set the application ID for Windows taskbar
if sys.platform == "win32":
myappid = 'objdictgen.objdictedit.' + objdictgen.__version__
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)

app = wx.App()

wx.InitAllImageHandlers()
Expand All @@ -635,9 +641,4 @@ def main():
usage()
sys.exit()

# Set the application ID for Windows taskbar
if sys.platform == "win32":
myappid = 'objdictgen.objdictedit.' + objdictgen.__version__
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)

uimain(args)

0 comments on commit 0417ba5

Please sign in to comment.