Skip to content

Commit 8ccdc10

Browse files
authored
Add taskbar icon on windows (#41)
1 parent 0b8cc2d commit 8ccdc10

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/objdictgen/ui/networkedit.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
1919
# USA
2020

21+
import ctypes
2122
import getopt
2223
import logging
2324
import os
@@ -415,6 +416,12 @@ def RefreshBufferState(self):
415416

416417

417418
def uimain(project):
419+
420+
# Set the application ID for Windows taskbar
421+
if sys.platform == "win32":
422+
myappid = 'objdictgen.objdictedit.' + objdictgen.__version__
423+
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
424+
418425
app = wx.PySimpleApp()
419426

420427
wx.InitAllImageHandlers()

src/objdictgen/ui/objdictedit.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
1919
# USA
2020

21+
import ctypes
2122
import getopt
2223
import logging
2324
import os
@@ -608,6 +609,12 @@ def OnExportCMenu(self, event): # pylint: disable=unused-argument
608609

609610

610611
def uimain(args):
612+
613+
# Set the application ID for Windows taskbar
614+
if sys.platform == "win32":
615+
myappid = 'objdictgen.objdictedit.' + objdictgen.__version__
616+
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
617+
611618
app = wx.App()
612619

613620
wx.InitAllImageHandlers()

0 commit comments

Comments
 (0)