[Thuban-commits] r2755 - in branches/WIP-pyshapelib-bramz: . Thuban/UI
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Apr 12 11:22:01 CEST 2007
Author: dpinte
Date: 2007-04-12 11:21:58 +0200 (Thu, 12 Apr 2007)
New Revision: 2755
Modified:
branches/WIP-pyshapelib-bramz/ChangeLog
branches/WIP-pyshapelib-bramz/Thuban/UI/baserenderer.py
branches/WIP-pyshapelib-bramz/Thuban/UI/controls.py
branches/WIP-pyshapelib-bramz/Thuban/UI/labeldialog.py
branches/WIP-pyshapelib-bramz/Thuban/UI/tableview.py
branches/WIP-pyshapelib-bramz/Thuban/UI/view.py
Log:
2007-04-12 Didrik Pinte <dpinte at itae.be>
* Removed workaround for file encoding in the Thuban code
Modified: branches/WIP-pyshapelib-bramz/ChangeLog
===================================================================
--- branches/WIP-pyshapelib-bramz/ChangeLog 2007-04-11 19:04:12 UTC (rev 2754)
+++ branches/WIP-pyshapelib-bramz/ChangeLog 2007-04-12 09:21:58 UTC (rev 2755)
@@ -1,3 +1,7 @@
+2007-04-12 Didrik Pinte <dpinte at itae.be>
+
+ * Removed workaround for file encoding in the Thuban code
+
2007-03-14 Bram de Greve <bram.degreve at intec.ugent.be>
* setup.py : updated in order to use the new dbflib C module in place
Modified: branches/WIP-pyshapelib-bramz/Thuban/UI/baserenderer.py
===================================================================
--- branches/WIP-pyshapelib-bramz/Thuban/UI/baserenderer.py 2007-04-11 19:04:12 UTC (rev 2754)
+++ branches/WIP-pyshapelib-bramz/Thuban/UI/baserenderer.py 2007-04-12 09:21:58 UTC (rev 2755)
@@ -583,7 +583,7 @@
x, y = forward(x, y)
x = int(round(x * scale + offx))
y = int(round(-y * scale + offy))
- width, height = self.dc.GetTextExtent(text.decode('iso-8859-1'))
+ width, height = self.dc.GetTextExtent(text)
if label.halign == ALIGN_LEFT:
# nothing to be done
pass
@@ -598,4 +598,4 @@
y = y - height
elif label.valign == ALIGN_CENTER:
y = y - height/2
- self.dc.DrawText(text.decode('iso-8859-1'), x, y)
+ self.dc.DrawText(text, x, y)
Modified: branches/WIP-pyshapelib-bramz/Thuban/UI/controls.py
===================================================================
--- branches/WIP-pyshapelib-bramz/Thuban/UI/controls.py 2007-04-11 19:04:12 UTC (rev 2754)
+++ branches/WIP-pyshapelib-bramz/Thuban/UI/controls.py 2007-04-12 09:21:58 UTC (rev 2755)
@@ -51,7 +51,7 @@
name = names[i]
value = record[name]
self.InsertStringItem(i, name)
- self.SetStringItem(i, 1, str(value).decode('iso-8859-1'))
+ self.SetStringItem(i, 1, unicode(value))
values[i] = value
self.values = values
Modified: branches/WIP-pyshapelib-bramz/Thuban/UI/labeldialog.py
===================================================================
--- branches/WIP-pyshapelib-bramz/Thuban/UI/labeldialog.py 2007-04-11 19:04:12 UTC (rev 2754)
+++ branches/WIP-pyshapelib-bramz/Thuban/UI/labeldialog.py 2007-04-12 09:21:58 UTC (rev 2755)
@@ -53,7 +53,7 @@
def OnOK(self, event):
result = self.list.GetValue()
if result is not None:
- self.end_dialog(wx.ID_OK, str(result))
+ self.end_dialog(wx.ID_OK, result)
else:
self.end_dialog(wx.ID_CANCEL, None)
Modified: branches/WIP-pyshapelib-bramz/Thuban/UI/tableview.py
===================================================================
--- branches/WIP-pyshapelib-bramz/Thuban/UI/tableview.py 2007-04-11 19:04:12 UTC (rev 2754)
+++ branches/WIP-pyshapelib-bramz/Thuban/UI/tableview.py 2007-04-12 09:21:58 UTC (rev 2755)
@@ -77,10 +77,7 @@
record = dict()
for (key, val) in self.table.ReadRowAsDict(row, \
row_is_ordinal = 1).items():
- if isinstance(val, str):
- record[key] = val.decode('iso-8859-1')
- else:
- record[key] = val
+ record[key] = val
return record[self.columns[col][0]]
def SetValue(self, row, col, value):
Modified: branches/WIP-pyshapelib-bramz/Thuban/UI/view.py
===================================================================
--- branches/WIP-pyshapelib-bramz/Thuban/UI/view.py 2007-04-11 19:04:12 UTC (rev 2754)
+++ branches/WIP-pyshapelib-bramz/Thuban/UI/view.py 2007-04-12 09:21:58 UTC (rev 2755)
@@ -425,7 +425,7 @@
dc = wx.ClientDC(self)
font = wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL)
dc.SetFont(font)
- return dc.GetTextExtent(text.decode('iso-8859-1'))
+ return dc.GetTextExtent(text)
def LabelShapeAt(self, x, y, text=None):
"""Add or remove a label at window position x, y.
More information about the Thuban-commits
mailing list