[Thuban-commits] r2816 - in trunk/thuban: . Thuban/UI
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sat Jan 26 23:21:54 CET 2008
Author: bernhard
Date: 2008-01-26 23:21:53 +0100 (Sat, 26 Jan 2008)
New Revision: 2816
Modified:
trunk/thuban/ChangeLog
trunk/thuban/Thuban/UI/projdialog.py
Log:
Fixed projection dialog so you can set [#586].
(Part of the problems that arise with wx returning unicode.)
* Thuban/UI/projdialog.py: translating filenames from dlg.GetPaths()
and dlg.GetPath() to internal encoding using internal_from_wxstring().
This fixes #586 (projection exception when changing projection).
Using variable "path" in ProjFrame:_OnImport() more consistently.
(__GetProjection): Using internal_from_wxstring() for the
project parameters.
Modified: trunk/thuban/ChangeLog
===================================================================
--- trunk/thuban/ChangeLog 2008-01-21 10:11:51 UTC (rev 2815)
+++ trunk/thuban/ChangeLog 2008-01-26 22:21:53 UTC (rev 2816)
@@ -1,3 +1,15 @@
+2008-01-26 Bernhard Reiter <bernhard at intevation.de>
+
+ Fixed projection dialog so you can set [#586].
+ (Part of the problems that arise with wx returning unicode.)
+
+ * Thuban/UI/projdialog.py: translating filenames from dlg.GetPaths()
+ and dlg.GetPath() to internal encoding using internal_from_wxstring().
+ This fixes #586 (projection exception when changing projection).
+ Using variable "path" in ProjFrame:_OnImport() more consistently.
+ (__GetProjection): Using internal_from_wxstring() for the
+ project parameters.
+
2008-01-21 Didrik Pinte <dpinte at itae.be>
Updated fr.po to support Extensions localised strings
Modified: trunk/thuban/Thuban/UI/projdialog.py
===================================================================
--- trunk/thuban/Thuban/UI/projdialog.py 2008-01-21 10:11:51 UTC (rev 2815)
+++ trunk/thuban/Thuban/UI/projdialog.py 2008-01-26 22:21:53 UTC (rev 2816)
@@ -24,6 +24,7 @@
read_proj_file, write_proj_file, \
DEFAULT_PROJ_FILE, EPSG_PROJ_FILE, \
EPSG_DEPRECATED_PROJ_FILE
+from Thuban.UI import internal_from_wxstring
from Thuban.UI.dialogs import NonModalNonParentDialog
from common import ThubanBeginBusyCursor, ThubanEndBusyCursor
@@ -307,14 +308,14 @@
self.parent.application.Path("projection"), style = wx.OPEN)
if dlg.ShowModal() == wx.ID_OK:
- path = dlg.GetPath()
+ path = internal_from_wxstring(dlg.GetPath())
ThubanBeginBusyCursor()
try:
try:
projFile, warnings = read_proj_file(path)
except IOError, (errno, errstr):
- self.__ShowError(dlg.GetPath(), errstr)
+ self.__ShowError(path, errstr)
else:
self.show_warnings(_("Warnings"), path, warnings)
for proj in projFile.GetProjections():
@@ -339,12 +340,13 @@
style=wx.SAVE|wx.OVERWRITE_PROMPT)
if dlg.ShowModal() == wx.ID_OK:
- proj_file = ProjFile(dlg.GetPath())
+ path = internal_from_wxstring(dlg.GetPath())
+ proj_file = ProjFile(path)
for proj, pf in sel:
if proj is not None:
proj_file.Add(proj)
self.write_proj_file(proj_file)
- self.parent.application.SetPath("projection", dlg.GetPath())
+ self.parent.application.SetPath("projection", path)
dlg.Destroy()
@@ -573,7 +575,8 @@
# self.curProjPanel should always contain the most relevant data
# for a projection
if self.curProjPanel is not None:
- parameters = self.curProjPanel.GetParameters()
+ parameters = \
+ map(internal_from_wxstring,self.curProjPanel.GetParameters())
if parameters is not None:
return Projection(parameters, self.projname.GetValue())
More information about the Thuban-commits
mailing list