[Thuban-commits] r2762 - in trunk/thuban: . Thuban/UI

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Apr 25 02:27:36 CEST 2007


Author: bernhard
Date: 2007-04-25 02:27:35 +0200 (Wed, 25 Apr 2007)
New Revision: 2762

Modified:
   trunk/thuban/ChangeLog
   trunk/thuban/Thuban/UI/mainwindow.py
Log:
* Thuban/UI/mainwindow.py: translating filenames from dlg.GetPaths()
to internal encoding using internal_from_wxstring().


Modified: trunk/thuban/ChangeLog
===================================================================
--- trunk/thuban/ChangeLog	2007-04-25 00:19:25 UTC (rev 2761)
+++ trunk/thuban/ChangeLog	2007-04-25 00:27:35 UTC (rev 2762)
@@ -1,8 +1,14 @@
 2007-04-25  Bernhard Reiter <bernhard at intevation.de>
 
-	Fixing the problem that with localisation the selection of
-	a class generator might not work. (Reported by Samuel Mesa.)
+	Improvements (thanks to Samuel Mesa for reporting the problems):
+	o The class generator selector will work even in other languages.
+	o Layer titles from filenames are saved in the correct encoding, so
+	  strings can be assembled from them, 
+	  e.g. for the Layer Projection dialog.
 
+	* Thuban/UI/mainwindow.py: translating filenames from dlg.GetPaths()
+	to internal encoding using internal_from_wxstring().
+
 	* Thuban/UI/mainwindow.py: Refactored, now the build-in function map() 
 	can be used again:
 	a) renamed local variables map to mymap. It was covering up map().

Modified: trunk/thuban/Thuban/UI/mainwindow.py
===================================================================
--- trunk/thuban/Thuban/UI/mainwindow.py	2007-04-25 00:19:25 UTC (rev 2761)
+++ trunk/thuban/Thuban/UI/mainwindow.py	2007-04-25 00:27:35 UTC (rev 2762)
@@ -29,6 +29,7 @@
 from Thuban.Model.session import create_empty_session
 from Thuban.Model.layer import Layer, RasterLayer
 from Thuban.Model.postgisdb import PostGISShapeStore, has_postgis_support
+from Thuban.UI import internal_from_wxstring
 from wx.lib.dialogs import MultipleChoiceDialog
 
 import view
@@ -563,7 +564,7 @@
                            _("All Files (*.*)") + "|*.*",
                            wx.OPEN | wx.MULTIPLE)
         if dlg.ShowModal() == wx.ID_OK:
-            filenames = dlg.GetPaths()
+            filenames = map(internal_from_wxstring, dlg.GetPaths())
             for filename in filenames:
                 title = os.path.splitext(os.path.basename(filename))[0]
                 mymap = self.canvas.Map()
@@ -589,7 +590,7 @@
                            self.application.Path("data"), "", "*.*",
                            wx.OPEN)
         if dlg.ShowModal() == wx.ID_OK:
-            filenames = GetPaths()
+            filenames = map(internal_from_wxstring, dlg.GetPaths())
             title = os.path.splitext(os.path.basename(filename))[0]
             mymap = self.canvas.Map()
             has_layers = mymap.HasLayers()



More information about the Thuban-commits mailing list