1 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
2 |
|
|
3 |
|
* Thuban/Model/session.py (Session.Destroy): Explicitly close the |
4 |
|
transient DB if it exists to make sure it doesn't leave a journal |
5 |
|
file in the temp directory. |
6 |
|
|
7 |
|
* Thuban/Model/transientdb.py (TransientDatabase.close): Set |
8 |
|
self.conn to None after closing the connection to make sure it's |
9 |
|
not closed twice |
10 |
|
|
11 |
|
2003-04-29 Jonathan Coles <[email protected]> |
12 |
|
|
13 |
|
Add a visible parameter in the layer XML tag. The default value is |
14 |
|
"true". If anything other than "false" is specified we also assume |
15 |
|
"true". Addresses RTbug #1025. |
16 |
|
|
17 |
|
* Doc/thuban.dtd: Add visible parameter to a layer. |
18 |
|
|
19 |
|
* Thuban/Model/layer.py (BaseLayer.__init__): Change default value |
20 |
|
of visible from 1 to True. |
21 |
|
(Layer.__init__): Change default value of visible from 1 to True. |
22 |
|
|
23 |
|
* Thuban/Model/load.py (SessionLoader.start_layer): Read visible |
24 |
|
parameter. |
25 |
|
|
26 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save visible |
27 |
|
parameter. |
28 |
|
|
29 |
|
* test/test_load.py: Add new test data contents_test_visible. |
30 |
|
(LoadSessionTest.setUp): save test data. |
31 |
|
(LoadSessionTest.testLayerVisibility): Test if the visible flag |
32 |
|
is loaded correctly. |
33 |
|
|
34 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Add test |
35 |
|
for saving an invisible layer. |
36 |
|
|
37 |
|
2003-04-29 Jonathan Coles <[email protected]> |
38 |
|
|
39 |
|
* Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the |
40 |
|
legend dialog box and tell it to change its map to the one |
41 |
|
supplied to SetMap(). Fixes RTbug #1770. |
42 |
|
|
43 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
44 |
|
|
45 |
|
Next step of table implementation. Introduce a transient database |
46 |
|
using SQLite that some of the data is copied to on demand. This |
47 |
|
allows us to do joins and other operations that require an index |
48 |
|
for good performance with reasonable efficiency. Thuban now needs |
49 |
|
SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I |
50 |
|
haven't tested that. |
51 |
|
|
52 |
|
* Thuban/Model/transientdb.py: New. Transient database |
53 |
|
implementation. |
54 |
|
|
55 |
|
* test/test_transientdb.py: New. Tests for the transient DB |
56 |
|
classes. |
57 |
|
|
58 |
|
* Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New |
59 |
|
classes to help automatically remove temporary files and |
60 |
|
directories. |
61 |
|
(Session.__init__): New instance variables temp_dir for the |
62 |
|
temporary directory and transient_db for the SQLite database |
63 |
|
(Session.temp_directory): New. Create a temporary directory if not |
64 |
|
yet done and return its name. Use AutoRemoveDir to have it |
65 |
|
automatically deleted |
66 |
|
(Session.TransientDB): Instantiate the transient database if not |
67 |
|
done yet and return it. |
68 |
|
|
69 |
|
* Thuban/Model/data.py (ShapefileStore.__init__): Use an |
70 |
|
AutoTransientTable so that data is copied to the transient DB on |
71 |
|
demand. |
72 |
|
(SimpleStore): New class that simply combines a table and a |
73 |
|
shapefile |
74 |
|
|
75 |
|
* Thuban/Model/table.py (Table, DBFTable): Rename Table into |
76 |
|
DBFTable and update its doc-string to reflect the fact that this |
77 |
|
is only the table interface to a DBF file. Table is now an alias |
78 |
|
for DBFTable for temporary backwards compatibility. |
79 |
|
|
80 |
|
* Thuban/UI/application.py (ThubanApplication.OnExit): Make sure |
81 |
|
the last reference to the session goes away so that the temporary |
82 |
|
files are removed properly. |
83 |
|
|
84 |
|
* test/test_load.py (LoadSessionTest.tearDown): Remove the |
85 |
|
reference to the session to make sure the temporary files are |
86 |
|
removed. |
87 |
|
|
88 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
89 |
|
|
90 |
|
* Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn |
91 |
|
the __parser instance variable into a normal local variable in |
92 |
|
read. It's only used there and read will never be called more than |
93 |
|
once. Plus it introduces a reference cycle that keeps can keep the |
94 |
|
session object alive for a long time. |
95 |
|
|
96 |
|
2003-04-29 Jonathan Coles <[email protected]> |
97 |
|
|
98 |
|
* Thuban/Model/proj.py (Projection): Removed Set*() methods to make |
99 |
|
Projection an immutable item. Fixes RTbug #1825. |
100 |
|
(Projection.__init__): Initialize instance variables here. |
101 |
|
(ProjFile.Replace): New. Replace the given projection object with |
102 |
|
the new projection object. This solves the problem of needing the |
103 |
|
mutator Projection.SetProjection() in the ProjFrame class and |
104 |
|
allows a projection to change parameters without changing its |
105 |
|
location in the file. |
106 |
|
|
107 |
|
* Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should |
108 |
|
be of type wxSAVE and should verify overwriting a file. |
109 |
|
|
110 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new |
111 |
|
ProjFile.Replace() method instead of the mutator |
112 |
|
Projection.SetProjection(). Also requires that we reassign the |
113 |
|
client data to the new projection. |
114 |
|
|
115 |
|
* test/test_proj.py (TestProjection.test): Test GetName() and |
116 |
|
GetAllParameters() |
117 |
|
(TestProjFile.test): Remove tests for Set*() methods. Add tests |
118 |
|
for Replace(). |
119 |
|
|
120 |
|
2003-04-25 Jonathan Coles <[email protected]> |
121 |
|
|
122 |
|
* Thuban/Model/save.py (SessionSaver.write_projection): Make sure |
123 |
|
to save the name of the projection. |
124 |
|
|
125 |
|
* test/test_save.py (SaveSessionTest.testLayerProjection): New |
126 |
|
test to verify layer projections are saved correctly. |
127 |
|
|
128 |
|
2003-04-25 Jonathan Coles <[email protected]> |
129 |
|
|
130 |
|
* Thuban/Model/proj.py (Projection.SetName): Set the name |
131 |
|
to "Unknown" if name is None. |
132 |
|
(Projection.SetAllParameters): New. Set the projection's |
133 |
|
parameter list to the one supplied. |
134 |
|
(Projection.SetProjection): New. Set the projection's |
135 |
|
properties to those of the supplied Projection. |
136 |
|
|
137 |
|
* Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set |
138 |
|
the dialog title to include the map's title. |
139 |
|
(MainWindow.LayerProjection): Set the dialog title to include |
140 |
|
the layer's title. |
141 |
|
|
142 |
|
* Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate |
143 |
|
error dialogs into a single method call. |
144 |
|
(ProjFrame.__VerifyButtons): Add more states to check. |
145 |
|
(ProjFrame.__GetProjection): Return the current state of an |
146 |
|
edited projection or None. |
147 |
|
(ProjFrame.__FillAvailList): Remove checks for states that |
148 |
|
shouldn't exist. |
149 |
|
(ProjFrame._OnNew): Clear all selected items and supply |
150 |
|
a projection panel if necessary. |
151 |
|
|
152 |
|
* test/test_proj.py (TestProjFile.test): Add tests for |
153 |
|
ProjFile.SetAllParameters, ProjFile.SetProjection, |
154 |
|
ProjFile.SetName. |
155 |
|
|
156 |
|
2003-04-25 Jonathan Coles <[email protected]> |
157 |
|
|
158 |
|
* Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now |
159 |
|
takes an optional argument to select the current projection. |
160 |
|
This does not guarantee that the item is visible due to |
161 |
|
limited wxWindows functionality. Fixes RTBug #1821. |
162 |
|
|
163 |
|
2003-04-25 Jonathan Coles <[email protected]> |
164 |
|
|
165 |
|
* Thuban/Model/load.py (SessionLoader.start_projection): Remember |
166 |
|
the projection name and use it when constructing the Projection |
167 |
|
object. |
168 |
|
|
169 |
|
* Thuban/Model/proj.py (Projection.__init__): Change the default |
170 |
|
value for 'name' to None and then test if name is equal to None |
171 |
|
in the body of the constructor. This way the caller doesn't have to |
172 |
|
know what the default value should be. Namely, useful in load.py |
173 |
|
where we have to pick a default value if the 'name' parameter |
174 |
|
doesn't exist in the XML file. |
175 |
|
|
176 |
|
* test/test_load.py (LoadSessionTest.testLayerProjection): New. |
177 |
|
Tests a file where a layer has a projection. |
178 |
|
|
179 |
|
2003-04-25 Jonathan Coles <[email protected]> |
180 |
|
|
181 |
|
* Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the |
182 |
|
tree for projection information. |
183 |
|
|
184 |
|
* Thuban/Model/load.py (XMLReader.GetFilename): Renamed from |
185 |
|
XMLReader.GetFileName. |
186 |
|
(SessionLoader): Added support for loading projection tags that |
187 |
|
appear inside a layer. |
188 |
|
|
189 |
|
* Thuban/Model/proj.py (ProjFile): Document the class. Move |
190 |
|
back to using a list because the order of the projections in |
191 |
|
the file is important to maintain. Fixes RTbug #1817. |
192 |
|
|
193 |
|
* Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName |
194 |
|
to ProjFile.GetFilename. |
195 |
|
|
196 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save projection |
197 |
|
information. |
198 |
|
|
199 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from |
200 |
|
ProjFrame._OnSaveAs. Removed old dead code from previous |
201 |
|
implementation. |
202 |
|
(ProjFrame._OnExport): Add support for exporting more than one |
203 |
|
projection to a single file. |
204 |
|
(ProjFrame.__FillAvailList): use string formatting (% operator) |
205 |
|
to build strings that are (partly) translated. Fixes RTbug #1818. |
206 |
|
|
207 |
|
* test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile |
208 |
|
class. |
209 |
|
|
210 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
211 |
|
|
212 |
|
* po/es.po: Updated Spanish translation by Daniel Calvelo Aros |
213 |
|
|
214 |
|
* po/fr.po: New. French translation by Daniel Calvelo Aros |
215 |
|
|
216 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate |
217 |
|
empty strings. |
218 |
|
|
219 |
|
2003-04-24 Jonathan Coles <[email protected]> |
220 |
|
|
221 |
|
* Thuban/Model/layer.py (Layer.GetProjection): New. Needed to |
222 |
|
implement the interface that the ProjFrame dialog expects. |
223 |
|
|
224 |
|
* Thuban/Model/proj.py (Projection.SetName): New. Allows the |
225 |
|
name of the projection to be changed. |
226 |
|
(ProjFile): Use a dictionary instead of a list so that removing |
227 |
|
projections is easier and we are sure about uniqueness. |
228 |
|
(ProjFile.Remove): Remove the given projection object. |
229 |
|
|
230 |
|
* Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles): |
231 |
|
Return a list with only one projection file instead of searching for |
232 |
|
any projection file. This simplifies many things if the user can |
233 |
|
only have one system file and one user file. |
234 |
|
|
235 |
|
* Thuban/UI/classgen.py: Change all references to |
236 |
|
genCombo to genChoice. |
237 |
|
|
238 |
|
* Thuban/UI/mainwindow.py: Add a Projection option under the |
239 |
|
layer menu. |
240 |
|
(MainWindow.LayerProjection): New. Open up a projection window |
241 |
|
for a layer. |
242 |
|
|
243 |
|
* Thuban/UI/projdialog.py: Large changes to how the dialog is |
244 |
|
laid out. Use three panels instead of one. One for the list of |
245 |
|
projections, one for the edit controls, and one for the buttons. |
246 |
|
Fixed resizing problems so that the dialog resizes correctly |
247 |
|
when the projection panel changes. Added import/export, save, and |
248 |
|
new buttons/functionality. |
249 |
|
|
250 |
2003-04-24 Bernhard Herzog <[email protected]> |
2003-04-24 Bernhard Herzog <[email protected]> |
251 |
|
|
252 |
First step towards table management. Introduce a simple data |
First step towards table management. Introduce a simple data |