def _dropTargetRead(self, new): a, b = os.path.split(new) if a and a != os.path.join(basepath, 'targets'): if a != os.path.join(basepath, 'targets'): b1, b2 = os.path.splitext(b) z = 0 while os.path.isfile(os.path.join(basepath, 'targets', b)): z += 1 b = b1 + '(' + str(z) + ')' + b2 # 2013.02.28 CJJ Changed unknown variable newname to new shutil.copyfile(new, os.path.join(basepath, 'targets', b)) new = b name = os.path.join(basepath, 'targets', new) garbage, e = os.path.splitext(new.lower()) if e == '.gif': bmp = wx.wxBitmap(name, wx.wxBITMAP_TYPE_GIF) elif e == '.bmp': bmp = wx.wxBitmap(name, wx.wxBITMAP_TYPE_BMP) else: assert False return bmp
def _dropTargetRead(self, new): a, b = os.path.split(new) if a and a != os.path.join(basepath, "targets"): if a != os.path.join(basepath, "targets"): b1, b2 = os.path.splitext(b) z = 0 while os.path.isfile(os.path.join(basepath, "targets", b)): z += 1 b = b1 + "(" + str(z) + ")" + b2 # 2013.02.28 CJJ Changed unknown variable newname to new shutil.copyfile(new, os.path.join(basepath, "targets", b)) new = b name = os.path.join(basepath, "targets", new) garbage, e = os.path.splitext(new.lower()) if e == ".gif": bmp = wx.wxBitmap(name, wx.wxBITMAP_TYPE_GIF) elif e == ".bmp": bmp = wx.wxBitmap(name, wx.wxBITMAP_TYPE_BMP) else: assert False return bmp
def getSendWxBitmap(): return wxBitmap(ImageManager.imgDir + 'send_n.png',wxBITMAP_TYPE_PNG)
def getRedChatWxBitmap(): return wxBitmap(ImageManager.imgDir + 'chat_red.png', wxBITMAP_TYPE_PNG)
def getBlueTransferWxBitmap(): return wxBitmap(ImageManager.imgDir + 'transfer_blue.png',wxBITMAP_TYPE_PNG)
def getTopBannerWxBitmap(): return wxBitmap(ImageManager.imgDir + 'top_banner.png', wxBITMAP_TYPE_PNG)
def getSolipsisLogoWxBitmap(): return wxBitmap(ImageManager.imgDir + 'im_solipsis.png',wxBITMAP_TYPE_PNG)