Skip to content

Commit

Permalink
Add taskbar icon on windows (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinse committed Sep 11, 2024
1 parent 0b8cc2d commit 8ccdc10
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/objdictgen/ui/networkedit.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA

import ctypes
import getopt
import logging
import os
Expand Down Expand Up @@ -415,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
7 changes: 7 additions & 0 deletions src/objdictgen/ui/objdictedit.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA

import ctypes
import getopt
import logging
import os
Expand Down Expand Up @@ -608,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 Down

0 comments on commit 8ccdc10

Please sign in to comment.