MiRCARTGeneralFrame.py: prepend script execution directory when loading toolbar item bitmaps.

This commit is contained in:
Lucio Andrés Illanes Albornoz 2018-01-09 21:19:14 +01:00
parent 674afe9bfa
commit 45dae7798a

View File

@ -22,7 +22,7 @@
# SOFTWARE. # SOFTWARE.
# #
import os, wx import os, sys, wx
# #
# Types # Types
@ -108,10 +108,11 @@ class MiRCARTGeneralFrame(wx.Frame):
and toolBarItem[4][1] == None: and toolBarItem[4][1] == None:
toolBarItem[4] = ["", None, toolBarItem[4][2]] toolBarItem[4] = ["", None, toolBarItem[4][2]]
elif toolBarItem[4][0] != "": 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 = wx.Bitmap((16,16))
toolBitmap.LoadFile( \ toolBitmap.LoadFile(toolBitmapPathName, wx.BITMAP_TYPE_ANY)
os.path.join("assets", toolBarItem[4][0]), \
wx.BITMAP_TYPE_ANY)
toolBarItem[4] = ["", None, toolBitmap] toolBarItem[4] = ["", None, toolBitmap]
# }}} # }}}
# {{{ onClose(self, event): XXX # {{{ onClose(self, event): XXX