From 45dae7798a6770aeaada8d4eebc4b9af65fc07a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Tue, 9 Jan 2018 21:19:14 +0100 Subject: [PATCH] MiRCARTGeneralFrame.py: prepend script execution directory when loading toolbar item bitmaps. --- MiRCARTGeneralFrame.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/MiRCARTGeneralFrame.py b/MiRCARTGeneralFrame.py index 7bdf00a..7274af5 100644 --- a/MiRCARTGeneralFrame.py +++ b/MiRCARTGeneralFrame.py @@ -22,7 +22,7 @@ # SOFTWARE. # -import os, wx +import os, sys, wx # # Types @@ -108,10 +108,11 @@ class MiRCARTGeneralFrame(wx.Frame): and toolBarItem[4][1] == None: toolBarItem[4] = ["", None, toolBarItem[4][2]] elif toolBarItem[4][0] != "": + toolBitmapPathName = os.path.dirname(sys.argv[0]) + toolBitmapPathName = os.path.join(toolBitmapPathName, \ + "assets", toolBarItem[4][0]) toolBitmap = wx.Bitmap((16,16)) - toolBitmap.LoadFile( \ - os.path.join("assets", toolBarItem[4][0]), \ - wx.BITMAP_TYPE_ANY) + toolBitmap.LoadFile(toolBitmapPathName, wx.BITMAP_TYPE_ANY) toolBarItem[4] = ["", None, toolBitmap] # }}} # {{{ onClose(self, event): XXX