Remove a few stale variables.

Add a market class to the controller.
Add a method in the Market controller to grab the market root.
Display the market root in the market browser.
This commit is contained in:
cncfanatics
2010-08-15 17:40:00 +02:00
parent 3e3ae52bb5
commit 8d0c2042ea
6 changed files with 86 additions and 3 deletions

View File

@@ -26,6 +26,13 @@ def getStaticBitmap(name, parent, location):
static.SetBitmap(getBitmap(name,location))
return static
locationMap = {"pack": os.path.join(config.homePath, "icons")}
def getBitmap(name,location):
path = os.path.join(config.path, location, name + ".png")
if location in locationMap:
location = locationMap[location]
path = os.path.join(location, "icon%s.png" % name)
else:
location = os.path.join(config.path, location)
path = os.path.join(location, name + ".png")
return wx.Image(path).ConvertToBitmap()