Mercurial > traipse_dev
diff orpg/mapper/miniatures.py @ 76:37a11fea3304 ornery-dev
More clean up. Images now posts a Chat Info post if image doesn't load.
author | sirebral |
---|---|
date | Sat, 22 Aug 2009 04:02:14 -0500 |
parents | 449a8900f9ac |
children | 763a04270cf6 |
line wrap: on
line diff
--- a/orpg/mapper/miniatures.py Fri Aug 21 21:49:42 2009 -0500 +++ b/orpg/mapper/miniatures.py Sat Aug 22 04:02:14 2009 -0500 @@ -34,6 +34,8 @@ import urllib import os.path +from orpg.tools.orpg_settings import settings + MIN_STICKY_BACK = -0XFFFFFF MIN_STICKY_FRONT = 0xFFFFFF @@ -417,7 +419,6 @@ class miniature_layer(layer_base): def __init__(self, canvas): self.canvas = canvas - self.settings = self.canvas.settings layer_base.__init__(self) self.id = -1 #added. self.miniatures = [] @@ -425,10 +426,10 @@ # Set the font of the labels to be the same as the chat window # only smaller. - font_size = int(self.settings.get_setting('defaultfontsize')) + font_size = int(settings.get_setting('defaultfontsize')) if (font_size >= 10): font_size -= 2 self.label_font = wx.Font(font_size, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, - False, self.settings.get_setting('defaultfont')) + False, settings.get_setting('defaultfont')) def next_serial(self): self.serial_number += 1 @@ -583,7 +584,7 @@ def upload(self, postdata, filename, modify=False, pos=cmpPoint(0,0)): self.lock.acquire() - url = self.settings.get_setting('ImageServerBaseURL') + url = settings.get_setting('ImageServerBaseURL') file = urllib.urlopen(url, postdata) recvdata = file.read() file.close()