/[thuban]/branches/WIP-pyshapelib-bramz/ChangeLog
ViewVC logotype

Contents of /branches/WIP-pyshapelib-bramz/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1376 - (show annotations)
Tue Jul 8 10:53:26 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 216786 byte(s)
update ChangeLog

1 2003-07-08 Bernhard Herzog <[email protected]>
2
3 * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
4 0.9.
5
6 * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
7 New. Return the join type
8
9 * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
10 DTD
11 (SessionSaver.write_data_containers): Save the join type for
12 joined tables
13
14 * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
15 namespace
16 (SessionLoader.start_jointable): Handle the jointype attribute
17
18 * test/test_load_0_8.py: New. Effectively a copy of test_load.py
19 as of Thuban 0.8. These are now tests to determine whether Thuban
20 can still read files generated by Thuban 0.8
21
22 * test/test_load.py (LoadSessionTest.dtd)
23 (TestSingleLayer.file_contents)
24 (TestLayerVisibility.file_contents, TestLabels.file_contents)
25 (TestLayerProjection.file_contents)
26 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
27 (TestJoinedTable.file_contents)
28 (TestLoadError.file_contents): Update for new DTD
29 (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
30 for new join type attribute
31
32 * test/test_save.py (SaveSessionTest.dtd)
33 (SaveSessionTest.testEmptySession)
34 (SaveSessionTest.testSingleLayer)
35 (SaveSessionTest.testLayerProjection)
36 (SaveSessionTest.testRasterLayer)
37 (SaveSessionTest.testClassifiedLayer)
38 (SaveSessionTest.test_dbf_table)
39 (SaveSessionTest.test_joined_table): Update for new DTD
40 (SaveSessionTest.test_joined_table): Add test for new join type
41 attribute
42
43 2003-07-04 Bernhard Herzog <[email protected]>
44
45 * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
46 function for table_to_dbf
47 (table_to_dbf): Deal with names longer than the 10 character limit
48
49 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
50 doc-string
51 (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
52 long column names
53
54 2003-07-03 Bernhard Herzog <[email protected]>
55
56 * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
57
58 2003-07-03 Bernhard Herzog <[email protected]>
59
60 * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
61 for the Thuban manual and README with some basic information about
62 the manual
63
64 2003-07-03 Bernhard Herzog <[email protected]>
65
66 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
67 Update doc-string
68 (TransientJoinedTable.create): Do not modify the column objects of
69 the input tables in place and copy all columns of the input tables
70 into the joined table after all.
71
72 * test/test_transientdb.py
73 (TestTransientTable.test_transient_joined_table_same_column_name):
74 Update to reflect the new behavior
75 (TestTransientTable.test_transient_joined_table_with_equal_column_names):
76 Update to reflect the new behavior
77 (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
78 New test case for a bug which modified the column objects in place
79
80 2003-07-02 Jonathan Coles <[email protected]>
81
82 * Thuban/Model/classgen.py (generate_singletons,
83 generate_uniform_distribution, generate_quantiles,
84 GenQuantiles0): Make sure maxValue isn't less than
85 one, otherwise we could divide by zero.
86
87 * test/test_classgen.py (ClassGenTest.doClassRangeTest,
88 ClassGenTest.doClassSingleTest): Call doBoundsTest to
89 check the end classification groups against the
90 proper property values.
91 (ClassGenTest.doBoundsTest): New. Checks the first and
92 last classification groups to make sure their properties
93 are the correct upper and lower bounds for a color ramp.
94
95 2003-07-02 Jonathan Coles <[email protected]>
96
97 * Thuban/Model/classgen.py (generate_singletons,
98 generate_uniform_distribution, generate_quantiles,
99 GenQuantiles0): The denominator was one to high when
100 calculating the index for the ramp causing the index
101 to never to reach one.
102
103 2003-07-02 Jonathan Coles <[email protected]>
104
105 Changed the singature of ClassGroupRange.__init__ and
106 ClassGroupRange.SetRange() so that the min/max values are
107 passed as a tuple. This makes a better calling scheme for
108 when a Range object is passed instead.
109
110 * Thuban/Model/classgen.py: Fixed parameters to
111 ClassGroupRange constructor.
112
113 * Thuban/Model/classification.py (ClassGroupRange.__init__):
114 Consolidate the min/max parameters into a single _range which
115 can either be a tuple or a Range object.
116 (ClassGroupRange.SetRange): Consolidate the min/max parameters
117 into a single _range which can either be a tuple or a Range object.
118
119 * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
120 call to ClassGroupRange constructor to use a tuple.
121
122 * Thuban/Model/layer.py (Layer.SetClassification): Switch
123 the classification instance variable to the new class
124 before calling _set_layer otherwise subscribers to a
125 LAYER_CHANGED event will not see any difference.
126
127 * test/test_classification.py: Fix tests of ClassGroupRange
128 so that they use the new signature.
129
130 * test/test_load.py: Fix use of ClassGroupRange so that it
131 uses the new signature.
132
133 * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
134 uses the new signature.
135
136 * test/test_save.py: Fix use of ClassGroupRange so that it
137 uses the new signature.
138
139
140 2003-07-01 Jonathan Coles <[email protected]>
141
142 * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
143 Import used objects/class from color.
144 (generate_singletons): We don't
145 need the numGroups parameter anymore because we are using
146 the new ramps with GetProperties().
147 (generate_uniform_distribution): Use new ramp method
148 GetProperties().
149 (generate_quantiles, GenQuantiles0): Use new ramp method
150 GetProperties().
151 (CustomRamp.SetNumGroups): Removed. The ramps now map
152 a value from 0 to 1 to class properties so the number
153 of groups is not needed ahead of time.
154 (CustomRamp.next): Removed. CustomRamp does not support
155 interation anymore.
156 (CustomRamp.GetProperties): Returns a ClassGroupProperties
157 object based on the index value from 0 to 1 that is
158 passed to it.
159 (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
160 Made into instances of Monochromatic class instread of
161 deriving from it.
162 (HotToCold.SetNumGroups): Removed. See CustomRamp.
163 (HotToCold.next): Removed. See CustomRamp.
164
165 * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
166 (Classification.SetField, Classification.SetFieldType):
167 Replaced with SetFieldInfo.
168 (Classification.SetFieldInfo): New. Does a better job of
169 what SetField and SetFieldType used to do by combining
170 their function since they should really always be done
171 at the same time.
172 (Classification.SetLayer): Renamed to _set_layer.
173 (Classification._set_layer): Should only be called from
174 Layer's SetClassification. This does not cause a recursive
175 call as SetLayer did because we know that Layer knows about
176 the classification.
177
178 * Thuban/Model/color.py: Fixes RTbug #1971.
179 (_Transparent): Renamed from Transparent so it doesn't
180 conflict with the module variable.
181 (Transparent, Black): Renamed from Color.Transparent,
182 Color.Black so they are not class variables.
183
184 * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
185 (Layer.Destroy): We don't need to call SetClassification
186 anymore to clear out the back reference in the classifcation
187 to the layer. It's better to set it to None using _set_layer,
188 and we won't be creating another clas object too.
189 (Layer.SetClassification): Classification._set_layer is not
190 recursive so remove all the locking variables. Also clean
191 up the code so that it remains unchanged if something fails.
192
193 * Thuban/Model/load.py: Fixes RTbug #1971.
194 (SessionLoader.start_classification): Call
195 Classification.SetFieldInfo().
196
197 * Thuban/Model/save.py: Removed import of Color which wasn't
198 being used.
199
200 * Thuban/UI/classgen.py: Fixes RTbug #1972.
201 (ClassGenDialog.__init__): Color ramps are now instances
202 already so we don't need to create any new objects.
203 (ClassGenDialog.OnOK): Check for numGroups is no longer
204 necessary because we never use it.
205
206 * Thuban/UI/classifier.py: Fixes RTbug #1971.
207 (Classifier.__BuildClassification, Classifier.__SetGridTable):
208 Call Classification.SetFieldInfo() instead of SetFieldType.
209
210 * Thuban/UI/renderer.py: Fixes RTbug #1971.
211
212 * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
213 (MapCanvas.__init__): Subscribe to the idle time event. Set
214 background color to white.
215 (MapCanvas.OnPaint): Set a flag indicating that we should
216 render the map during idle time. If we already have a bitmap
217 just draw it now.
218 (MapCanvas.OnIdle): New. Render the map only during idle time.
219 This also fixes a problem with the busy cursor under gtk.
220
221 * test/test_classgen.py (ClassGenTest.test_generate_singletons):
222 Fix calls to generate_singletons because the signature changed.
223
224 * test/test_classification.py: Fix color references and
225 change calls to Classification.[SetField|SetFieldType] to
226 SetFieldInfo.
227
228 * test/test_load.py: Fix color references.
229
230 * test/test_load_0_2.py: Fix color references.
231
232 * test/test_save.py (SaveSessionTest.testClassifiedLayer):
233 Change calls to Classification.[SetField|SetFieldType] to
234 SetFieldInfo.
235
236 2003-07-01 Frank Koormann <[email protected]>
237
238 MERGE from the greater-ms3 branch.
239
240 * test/test_transientdb.py
241 (TestTransientTable.test_transient_joined_table_with_equal_column_names):
242 New. Test join of two tables with partly equal column names.
243
244 * Thuban/Model/transientdb.py (TransientJoinedTable.create):
245 If duplicates in left and right tables column names are found,
246 append '_' (underscores) to the name until it is unique.
247 Create always new internal names for the resulting table and reference
248 columns in the join statement with <table>.<column>
249
250 2003-07-01 Bernhard Herzog <[email protected]>
251
252 * test/test_transientdb.py
253 (TestTransientTable.test_transient_joined_table_same_column_name):
254 New. Test whether joining on columns with the same names in both
255 tables works.
256
257 * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
258 sure to use the right internal names even when joining on field
259 with the same names in both tables. Also, detect duplicate names
260 in the joined table correctly.
261
262 2003-07-01 Frank Koormann <[email protected]>
263
264 * Thuban/UI/renderer.py (ExportRenderer.render_legend):
265 Reverse List of layers to render in same order as in desktop legend.
266
267 2003-06-30 Jonathan Coles <[email protected]>
268
269 * Thuban/version.py (make_tuple): Takes a version string
270 and splits it into a tuple of at most three integers.
271 Used make_tuple() to make tuple versions of the version
272 numbers.
273
274 * Thuban/UI/about.py: Add Thuban email addresses.
275
276 2003-06-30 Jonathan Coles <[email protected]>
277
278 * Thuban/version.py: SQLite/PySQLite version dependencies
279 were too high.
280
281 2003-06-30 Jonathan Coles <[email protected]>
282
283 * Thuban/version.py: Update version to 0.8.1
284
285 * MANIFEST.in: Added Projections so that default.proj is
286 included.
287
288 2003-06-26 Jonathan Coles <[email protected]>
289
290 New About box with lots more information including library
291 versions and credits. More/better version checking before
292 Thuban starts.
293
294 * Thuban/UI/about.py: New. New About box that displays
295 library version information and credits.
296
297 * Thuban/version.py: Added new 'versions' dictionary which
298 contains the verions of various libraries which are checked
299 when the module loads.
300 (verify_versions): Check all version numbers and returns
301 a list of errors.
302
303 * Thuban/UI/classifier.py (Classifier.__EnableButtons):
304 Reset the status of the buttons as the situation warrants,
305 but in a better more reliable way by not relying on the
306 current status to determine what needs to change.
307
308 * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
309 (verify_versions): Remove most of the code since it is
310 now in Thuban.version.verify_versions.o
311
312 * Thuban/UI/mainwindow.py (MainWindow.About): Call new
313 About box in Thuban.UI.about.
314
315 * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
316 Returns the version of gdal library being used as a string.
317
318 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
319 Removed.
320 (get_proj_version): Return the version of PROJ that the file
321 was compiled with.
322 (get_gtk_version): Return th version of GTK that the file
323 was compiled with.
324
325 2003-06-25 Jonathan Coles <[email protected]>
326
327 * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
328 of the SelectPropertiesDialog should be self so the window
329 appears on top.
330 (ClassGroupPropertiesCtrl.DoEdit): The parent
331 of the SelectPropertiesDialog should be self so the window
332 appears on top.
333
334 * Thuban/UI/resource.py: Cleaned up how we determine file
335 extensions.
336 (GetImageResource): Return an wxImage from our Resources.
337
338 2003-06-24 Jonathan Coles <[email protected]>
339
340 * Thuban/UI/renderer.py (ExportRenderer.render_legend):
341 Check that a layer has a classification before trying
342 to get it. Raster layers don't have classifications.
343
344 2003-06-23 Jonathan Coles <[email protected]>
345
346 * setup.py: Add Resources/XML to resource list.
347
348 2003-06-23 Jonathan Coles <[email protected]>
349
350 * setup.cfg: Fix copyright dates
351
352 2003-06-23 Jonathan Coles <[email protected]>
353
354 * MANIFEST.in: Update with Resources/XML
355
356 * setup.py: Don't include Locale resources yet as we don't
357 have any and it causes problems building the distribution
358 for Windows. Update version to 0.8.0.
359
360 * Doc/thuban.dtd: Removed since it is now in Resources/XML.
361
362 * Thuban/UI/mainwindow.py: Add blank line at the end because
363 file was not being read correctly building the Windows
364 distribution.
365
366 2003-06-23 Jonathan Coles <[email protected]>
367
368 * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
369
370 * Thuban/version.py: Temporarily update longversion for
371 the 0.8 release so that it doesn't have the cvs revision.
372
373 2003-06-23 Jonathan Coles <[email protected]>
374
375 * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
376 to make sure that we don't create reentrant possibilities with
377 wxYield.
378
379 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
380 directly to avoid the wxSafeYield() call which generates an
381 OnPaint event causing infinite recursion. Don't try to catch
382 exception anymore. This was for before there were limits on map
383 scaling.
384
385 2003-06-23 Bernhard Herzog <[email protected]>
386
387 Bug fix for RT #1961:
388
389 * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
390 Register DerivedShapestores with the session
391
392 * Thuban/Model/session.py (Session.Tables): Make sure each table
393 is only listed once.
394
395 * test/test_load.py (TestJoinedTable.test): Add check_format call.
396 Update file contents to match the one written out.
397
398 2003-06-20 Bernhard Herzog <[email protected]>
399
400 * test/xmlsupport.py (SaxEventLister.startElementNS)
401 (SaxEventLister.endElementNS): Do not include the qname. Python
402 2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
403 is (presumably incorrectly) None, whereas it's a string with the
404 element name in the later versions.
405
406 * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
407 (TestEventList.test_even_list_namespace): Update tests to reflect
408 the new behaviour
409 (TestEventList.test_even_list_id_normalization): Fix doc-string
410
411 2003-06-20 Jonathan Coles <[email protected]>
412
413 * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
414 by deriving classes to determine if that layer supports shapes.
415 (Layer): Override HasShapes and return true.
416
417 * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
418 instead of a direct call to wx[Begin|End]CusyCursor().
419 (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
420 table data.
421
422 * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
423 New. Wrappers around the wxWindows functions that allow us to
424 make additional calls such as wxYield which gives the native
425 system a chance to update the cursor correctly.
426
427 * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
428 instead of a direct call to wx[Begin|End]CusyCursor().
429
430 * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
431 instead of a direct call to wx[Begin|End]CusyCursor().
432 (MapCanvas.find_shape_at): Check if the current search layer
433 support shapes, otherwise go on to the next layer.
434
435 * test/test_layer.py: Add tests in each type of layer for
436 HasClassification() and HasShapes()
437
438 2003-06-20 Jonathan Coles <[email protected]>
439
440 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
441 turning on the busy cursor to allow the system to change the
442 cursor before we begin painting. This fixes a problem that
443 was occuring only under GTK. Fixes RTbug #1840.
444
445 2003-06-20 Bernhard Herzog <[email protected]>
446
447 * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
448 version.
449
450 * Thuban/Model/save.py (sort_data_stores): New. Make topological
451 sort of the data sources so they can be written with sources that
452 data sources that depend on other data sources come after the
453 sources they depend on.
454 (SessionSaver.__init__): Add idmap instance variable to map from
455 objects to the ids used in the file.
456 (SessionSaver.get_id, SessionSaver.define_id)
457 (SessionSaver.has_id): New. Methods to manage the idmap
458 (SessionSaver.write): Use thuban-0.8.dtd
459 (SessionSaver.write_session): Add a namespace on the session and
460 write out the data sources before the maps.
461 (SessionSaver.write_data_containers): New. Write the data
462 containers.
463 (SessionSaver.write_layer): Layer elements now refer to a
464 shapestore and don't contain filenames anymore.
465
466 * Thuban/Model/load.py (LoadError): Exception class to raise when
467 errors in the files are discovered
468 (SessionLoader.__init__): Define dispatchers for elements with a
469 thuban-0.8 namespace too.
470 (SessionLoader.check_attrs): New helper method to check and
471 convert attributes
472 (AttrDesc): New. Helper class for SessionLoader.check_attrs
473 (SessionLoader.start_fileshapesource)
474 (SessionLoader.start_derivedshapesource)
475 (SessionLoader.start_filetable, SessionLoader.start_jointable):
476 Handlers for the new elements in the new fileformat
477 (SessionLoader.start_layer): Handle the shapestore attribute in
478 addition to filename.
479 (SessionLoader.start_table, SessionLoader.end_table): Removed.
480 They were never used in the old formats and aren't needed for the
481 new.
482
483 * Thuban/Model/session.py (Session.DataContainers): New method to
484 return all "data containers", i.e. shapestores and tables
485
486 * test/xmlsupport.py (SaxEventLister.__init__)
487 (SaxEventLister.startElementNS, sax_eventlist): Add support to
488 normalize IDs.
489
490 * test/test_xmlsupport.py
491 (TestEventList.test_even_list_id_normalization): New test case for
492 id normalization
493
494 * test/test_load.py (LoadSessionTest.check_format): Use ID
495 normalization
496 (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
497 class atrributes used for ID normalization
498 (TestSingleLayer, TestLayerVisibility, TestLabels.test)
499 (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
500 file format
501 (TestJoinedTable): New test for loading sessions with joined
502 tables.
503 (TestLoadError): New. Test whether missing required attributes
504 cause a LoadError.
505
506 * test/test_save.py (SaveSessionTest.thubanids)
507 (SaveSessionTest.thubanidrefs): New class attributes for ID
508 normalization in .thuban files.
509 (SaveSessionTest.compare_xml): Use id-normalization.
510 (SaveSessionTest.testEmptySession)
511 (SaveSessionTest.testLayerProjection)
512 (SaveSessionTest.testRasterLayer)
513 (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
514 (SaveSessionTest.testLayerProjection): The filename used was the
515 same as for testSingleLayer. Use a different one.
516 (SaveSessionTest.test_dbf_table)
517 (SaveSessionTest.test_joined_table): New test cases for saving the
518 new data sources structures.
519 (TestStoreSort, MockDataStore): Classes to test the sorting of the
520 data stores for writing.
521
522 * test/runtests.py: Add CVS keywords
523
524 2003-06-20 Jonathan Coles <[email protected]>
525
526 * test/test_session.py
527 (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
528 Use the cultural_landmark-point.dbf file for the store so that
529 the table rows and shape count match.
530
531 2003-06-20 Jonathan Coles <[email protected]>
532
533 * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
534 an exception if the number of shapes is different from the
535 number of rows in the table. Address RTbug #1933.
536
537 * test/test_layer.py (TestLayer.test_derived_store): Add
538 a test for the new exception in DerivedShapeStore.__init__.
539
540 * test/support.py (FloatTestCase): Removed since there is
541 already FloatComparisonMixin. Fixes RTbug #1954.
542 (FloatComparisonMixin.assertFloatEqual): Include test for
543 infinity that was part of FloatTestCase.
544
545 * test/test_range.py (RangeTest): Inherit from
546 support.FloatComparisonMixin now that we don't have
547 support.FloatTestCase.
548
549 2003-06-20 Bernhard Herzog <[email protected]>
550
551 * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
552 the implementation in xmlsupport instead.
553 (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
554
555 * test/test_proj.py: Import sax_eventlist from xmlsupport instead
556 of test_save
557
558 2003-06-20 Bernhard Herzog <[email protected]>
559
560 * test/test_load.py (LoadSessionTest.check_format): New helper
561 method to make sure the test files we load might have been written
562 by the current thuban version.
563 (ClassificationTest.TestLayers, TestSingleLayer.test)
564 (TestLayerVisibility.test, TestClassification.test)
565 (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
566 Add check_format() calls and fix the thuban data to match the data
567 that would be written by saving the session loaded from it.
568
569 * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
570 the same class and function in test_save.
571
572 * test/test_xmlsupport.py (TestEventList): New. test cases for
573 sax_eventlist
574
575 2003-06-20 Bernhard Herzog <[email protected]>
576
577 * Resources/XML/thuban.dtd: Add comment about which versions of
578 Thuban are covered by this DTD
579 (map): Fix content model for layers and raster layers. There can
580 be any number or layers and raster layers in any order.
581
582 2003-06-20 Jonathan Coles <[email protected]>
583
584 This is mainly about fixing RTbug #1949.
585
586 * Thuban/Model/classification.py: Remove "from __future__"
587 import statement since python 2.2 is the earliest supported
588 version.
589
590 * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
591 Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
592 depending on the units this projection *forwards* into.
593
594 * Thuban/Model/save.py (SessionSaver.write_classification):
595 Remove unnecessary use of lambdas and nested functions.
596
597 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
598 adjustment here if the map projection uses degrees.
599
600 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
601 scale adjust code since it is now done before calling
602 this method. Don't do anything if the map projection
603 is None.
604
605 2003-06-19 Bernhard Herzog <[email protected]>
606
607 Move version specific load tests to their own file.
608
609 * test/test_load.py: Expand the doc-string to explain a bit how to
610 handle file format changes.
611 (TestClassification.test): Update the docstring as this test is
612 not about Thuban 0.2 anymore.
613
614 * test/test_load_0_2.py: New file with the load tests for thuban
615 files created with Thuban 0.2 and earlier.
616
617 2003-06-19 Bernhard Herzog <[email protected]>
618
619 Add XML validation to some of the tests. Validation will only be
620 done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
621 To make the DTD available to the test cases it's moved into
622 Resources/XML
623
624 * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
625 for versions up to and including 0.2. Two slight changes: added an
626 encoding specification and fixed the comment which refered to
627 GRASS, not Thuban
628
629 * test/xmlsupport.py: New support module for tests involving XML.
630 Currently there's a mix-in class for XML validation.
631
632 * test/test_xmlsupport.py: New. Tests for the xmlsupport module
633
634 * test/test_save.py (SaveSessionTest): Derive from ValidationTest
635 so that we can validate the
636 (SaveSessionTest.testEmptySession)
637 (SaveSessionTest.testSingleLayer)
638 (SaveSessionTest.testSingleLayer)
639 (SaveSessionTest.testLayerProjection)
640 (SaveSessionTest.testRasterLayer)
641 (SaveSessionTest.testClassifiedLayer): Validate the generated XML
642
643 * test/runtests.py (main): Call print_additional_summary instead
644 of print_garbage_information
645
646 * test/support.py (resource_dir): New function to return the
647 "Resource" subdirectory
648 (print_additional_summary): New function to combine several
649 summary functions
650 (run_tests): Use print_additional_summary instead of calling
651 print_garbage_information directly
652
653 2003-06-19 Bernhard Herzog <[email protected]>
654
655 * Doc/thuban.dtd (classification): Correct the content model of
656 the classification element.
657 (projection): Add the "name" attribute
658
659 2003-06-19 Frank Koormann <[email protected]>
660
661 MERGE from the greater-ms3 branch.
662
663 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
664 scale if projection is latlong to get better estimate.
665
666 Fix problem of hidden properties dialog under windows after double
667 click on layer tree:
668 The tree control always gets an Expanded / Collapsed event after
669 the ItemActivated on double click, which raises the main window again. We add a second ItemActivated event to the queue, which simply
670 raises the already displayed window.
671
672 * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
673 raiseProperties initialized to prevent endless loops
674 (LegendTree._OnItemActivated): Depending on self.raiseProperties
675 simply raise the properties or open the dialog and issue a second
676 event.
677
678 2003-06-18 Jonathan Coles <[email protected]>
679
680 * setup.py: Fix a few problems that occured under Windows.
681
682 2003-06-18 Jonathan Coles <[email protected]>
683
684 When Thuban loaded the map was redrawn twice because the
685 legend was being opened after the mainwindow was created
686 and not during its creation. This meant the map was drawn
687 initially and then had to be redrawn when the legend
688 caused the display to change. Now the legend is opened
689 in the mainwindow constructor which resolves this issue.
690
691 Also, although we were checking for the existence of
692 gdal and gdalwarp modules, the gdalwarp extension was
693 still being compiled (which may fail if the system doesn't
694 have gdal installed). the build_ext command to setup.py
695 now accepts the flags --with-gdal and --without-gdal.
696 If --without-gdal is specified setup.py will try to
697 use the gdal parameters specified by gdal-config. Under
698 windows, those parameters have to be set in setup.py
699 as with proj4 an wxWindows.
700
701 * setup.py: Use a list instead of seperate variables for
702 extension parameters so we can create a generic function
703 that runs an appropriate *-config script.
704 (run_cs_script): Renamed from run_wx_script and modified
705 to accept a second argument which is a list of lists to
706 be filled in by the values returned from running the command.
707 (thuban_build_ext): New. Extends the build_ext command and
708 provides the options --with-gdal/--without-gdal which then
709 optionally includes the gdalwarp extension.
710
711 * Thuban/Model/resource.py: First check if we can import
712 the gdalwarp Thuban extension before checking for gdal.
713 Also added some comments.
714
715 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
716 the map is None which may be the case if none has been loaded
717 yet.
718
719 * Thuban/UI/main.py (main): Remove call to ShowLegend.
720
721 * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
722
723 * Thuban/UI/renderer.py: Check for gdal support before importing
724 gdalwarp.
725 (MapRenderer.render_map): Only try to optimize if we have gdal
726 support otherwise nothing will get drawn.
727
728 * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
729 during startup before a map has been created. Check if map is None
730 before using it and do nothing if it is.
731
732 2003-06-17 Jonathan Coles <[email protected]>
733
734 Fix the problem with raster layers under Windows that caused
735 Thuban to crash. The view should respond to layer projection
736 changed events to update the display. Changes to a projection
737 should not cause the map to be set to full extent.
738
739 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
740 current_map_proj to remember the current map projection so that
741 when the projection changes we know what the previous projection
742 was.
743 (MapCanvas.SetMap): Unsubscribe and subscribe to
744 LAYER_PROJECTION_CHANGED events.
745 (MapCanvas.projection_changed): Split into two methods that respond
746 to map and layer projection changes.
747 (MapCanvas.map_projection_changed): New. Takes the current view and
748 projects it using the new projection. This does not cause the
749 map to be redrawn at full extent.
750 (MapCanvas.layer_projection_changed): New. Cause a redraw which
751 will draw each layer in its new projection.
752
753 * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
754 VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
755 under Windows.
756
757 * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
758 to twice sizeof(void*) because there are two digits for each
759 hex byte.
760
761 2003-06-16 Bernhard Herzog <[email protected]>
762
763 Update to the layer interface: Direct access to the table,
764 shapetable, shapefile and filename attributes is now actively
765 deprecated by issuing deprecation warnings for all places where
766 this happens.
767
768 * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
769 to the instance variables table, shapetable, shapefile and
770 filename via __getattr__ so that we can issue a deprecation
771 warning.
772 (Layer.SetShapeStore): Don't set the deprecated instance variables
773 any more
774 (Layer.SetShapeStore): Don't use deprecated layer instance
775 variables
776 (Layer.Destroy): No need to explicitly remove the instance
777 variables any more
778 (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
779 instance variables
780
781 * Thuban/UI/classgen.py (ClassGenDialog.__init__)
782 (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
783 (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
784 use deprecated layer instance variables
785
786 * Thuban/UI/classifier.py (Classifier.__init__): Don't use
787 deprecated layer instance variables
788
789 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
790 (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
791 instance variables
792
793 * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
794 deprecated layer instance variables
795
796 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
797 deprecated layer instance variables
798
799 * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
800 deprecated layer instance variables
801
802 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
803 (MapRenderer.polygon_render_param): Don't use deprecated layer instance
804 variables
805
806 * test/runtests.py (main): Turn Thuban's deprecation warnings into
807 errors so that they're cought by the tests
808
809 * test/test_load.py (TestSingleLayer.test): Don't use deprecated
810 layer instance variables
811
812 2003-06-16 Jonathan Coles <[email protected]>
813
814 Fix a problem under Windows whereby if the user double-clicks on a
815 layer in the legend that tree item will expand or collapse as well
816 as open the layer properties dialog. The state of the tree item
817 should not be affected.
818
819 * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
820 preventExpandCollapse and subscribe to expanding and collapsing
821 events.
822 (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
823 collapsing events and will veto the event if it has been triggered
824 by the user double clicking on a layer.
825 (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
826 that an expanding/collapsing event should be vetoed.
827
828 2003-06-13 Bernhard Herzog <[email protected]>
829
830 * Thuban/UI/classifier.py (Classifier.OnClose)
831 (Classifier.map_layers_removed)
832 (Classifier.layer_shapestore_replaced): Unsubscribe the messages
833 in OnClose and not in map_layers_removed or
834 layer_shapestore_replaced to make sure it always happens when the
835 dialog is closed
836
837 2003-06-13 Jonathan Coles <[email protected]>
838
839 This puts back a fix for Windows where a panel is needed so that
840 the background of the table view appears correctly.
841
842 * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
843 object that can be used by derived classes to place any
844 controls (including the grid) onto.
845 (QueryTableFrame.__init__): Use the panel as the parent window
846 for all the controls. Reparent the grid so that the panel is
847 the parent. Call UpdateStatusText() to correctly initialize
848 the status bar.
849
850 2003-06-13 Jonathan Coles <[email protected]>
851
852 * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
853 from wxFrame (as opposed to wxDialog like the other classes)
854 but otherwise behaves like the other classes. This is needed
855 for the TableView which isn't really a dialog and needs to
856 have a status bar and control buttons.
857
858 * Thuban/UI/tableview.py (TableGrid.__init__): Create an
859 instance variable to keep track of how many rows are selected.
860 Subscribe once to the the events we are interested in.
861 (ThubanGrid.OnRangeSelect): Only handle event if event handling
862 hasn't been turned off.
863 (ThubanGrid.OnSelectCell): Only handle event if event handling
864 hasn't been turned off.
865 (ThubanGrid.ToggleEventListeners): Rather than subscribe None
866 as an event listener (which changes the event handler stack)
867 simply set an instance variable to False. This is checked in
868 the event handlers.
869 (ThubanGrid.GetNumberSelected): Return the number of currently
870 selected rows.
871 (TableFrame): Inherit from ThubanFrame so we can have a
872 status bar and control buttons.
873 (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
874 Explicitly set which items are selected in the operator choice and
875 action choice so there is always a valid selection. Fixes RTbug #1941.
876 Subscribe to grid cell selection events so we can update the
877 status bar.
878 (QueryTableFrame.UpdateStatusText): Update the status bar with
879 how many rows are in the grid, how many columns, and how many
880 rows are selected.
881 (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
882 Call UpdateStatusText when cells are (de)selected.
883 (QueryTableFrame.OnQuery): Use the string value in the value
884 combo if either the selected item index is 0 or if the string
885 cannot be found in the predefined list (this happens if the
886 user changes the text). Fixes RTbug #1940.
887 Only turn off the grid event listeners if there a query comes
888 back with a none empty list of ids. in the case that the list
889 is empty this causes a grid.ClearSelection() call to actually
890 clear the grid selection which causes the selected items in
891 the map to be deselected. Fixes RTbug #1939.
892
893 * test/test_save.py (XMLWriterTest.Encode): Check return values.
894 Fixes RTbug #1851.
895
896 2003-06-13 Bernhard Herzog <[email protected]>
897
898 * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
899 self.selected_shape with the current selection to make sure the
900 contents of the dialog are up to date when it's shown for the
901 first time.
902 The dialog used to work without this by luck. The recent fix to
903 the connector module 'broke' a 'feature' the identify view was
904 relying on, i.e that subscribing to a message in response to
905 receiving a message of that type would mean that the new
906 subscriber would also be called for the same message.
907
908 2003-06-12 Jonathan Coles <[email protected]>
909
910 * extensions/thuban/gdalwarp.cpp: Removed debug printing as
911 the image is rendered. Fixes RTbug #1937.
912
913 2003-06-12 Jonathan Coles <[email protected]>
914
915 * Thuban/Lib/fileutil.py: As is done under Windows, create the
916 user directory if it doesn't exist on a posix system.
917 Fixes RTbug #1815.
918
919 * Thuban/Model/resource.py (get_user_proj_files): Moved the
920 called to get_application_dir here, so that the directory
921 will only be called if this method is invoked.
922
923 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
924 the projfilepath if no projection is selected.
925
926 2003-06-12 Jonathan Coles <[email protected]>
927
928 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
929 the scalebar if the current map has no projection set.
930
931 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
932 projfilepath label to just the basename of the projection file
933 rather than include the entire path.
934
935 * Thuban/Model/resource.py: Fix missed proj functions that
936 needed to be renamed.
937
938 2003-06-12 Jonathan Coles <[email protected]>
939
940 * Thuban/Model/classification.py: Removed assert statements that
941 tested if the variable was an instance of Color.
942
943 * Thuban/Model/color.py (Color): Remove commented code that isn't
944 used.
945 (Transparent): Renamed from NoColor. Doesn't inherit from Color.
946 Fixes RTbug #1835.
947 (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
948 Needed now that the class doesn't inherit from Color.
949
950 2003-06-12 Jonathan Coles <[email protected]>
951
952 * test/test_save.py (XMLWriterTest.testEncode): Explicitly
953 check unicode strings.
954
955 * test/test_layer.py: Check for existence of gdal.
956
957 2003-06-12 Jonathan Coles <[email protected]>
958
959 * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
960 that was in load.py
961
962 * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
963 that was in save.py
964
965 2003-06-12 Jonathan Coles <[email protected]>
966
967 This is largely a collection of bug fixes. We also handle the
968 case where gdal is not on the system. The XMLReader and XMLWriter
969 classes were moved into there own files to resolve some circular
970 import references and because they shouldn't really be in the
971 file that is dediciated to reading/writing session files since
972 they are also used elsewhere.
973
974 * Thuban/Model/classgen.py: Renamed functions to follow the
975 function_names_with_underscores style. Fixes RTbug #1903.
976 (calculate_quantiles): Raise ValueError if 'percents' is invalid.
977
978 * Thuban/Model/layer.py: Import gdal only if it available.
979 (RasterLayer): Handle the case where the gdal library is unavailable.
980 Addresses RTbug #1877.
981
982 * Thuban/Model/load.py (XMLReader): Moved into seperate file
983 xmlreader.py.
984
985 2003-06-12 Jonathan Coles <[email protected]>
986
987 This is largely a collection of bug fixes. We also handle the
988 case where gdal is not on the system. The XMLReader and XMLWriter
989 classes were moved into there own files to resolve some circular
990 import references and because they shouldn't really be in the
991 file that is dediciated to reading/writing session files since
992 they are also used elsewhere.
993
994 * Thuban/Model/classgen.py: Renamed functions to follow the
995 function_names_with_underscores style. Fixes RTbug #1903.
996 (calculate_quantiles): Raise ValueError if 'percents' is invalid.
997
998 * Thuban/Model/layer.py: Import gdal only if it available.
999 (RasterLayer): Handle the case where the gdal library is unavailable.
1000 Addresses RTbug #1877.
1001
1002 * Thuban/Model/load.py (XMLReader): Moved into seperate file
1003 xmlreader.py.
1004
1005 * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
1006 file xmlwriter.py.
1007
1008 * Thuban/Model/resource.py: Renamed functions to following the
1009 function_names_with_underscores style.
1010 (has_gdal_support): New function that returns true if the gdal
1011 library is available. Addresses RTbug #1877.
1012
1013 * Thuban/UI/application.py (ThubanApplication.OpenSession):
1014 Display a message box if the gdal library is not available, but
1015 only if there are any layers that would use it. Addresses RTbug #1877.
1016
1017 * Thuban/UI/classgen.py: Use renamed projection resource functions.
1018 (GenUniformPanel.__CalcStepping): Fix a slight discrepency
1019 when using integers versus floats.
1020
1021 * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
1022 determine if the "Add Image Layer" menu option should be
1023 greyed out or not. Addresses RTbug #1877.
1024
1025 * Thuban/UI/projdialog.py: Use renamed projection resource functions.
1026
1027 * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
1028 optimize if a raster layer is visible. Fixes RTbug #1931.
1029 Only draw the raster layer if the gdal library is available.
1030 Addresses RTbug #1877.
1031
1032 * test/test_classgen.py: Add tests for generate_singletons,
1033 generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
1034 (test_calculate_quantiles): Fix some tests to catch the new
1035 ValueError that is raised.
1036
1037 * test/test_proj.py: Use renamed projection resource functions.
1038
1039 * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
1040 test for saving classified layers. Fixes RTbug #1902.
1041 (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
1042
1043 2003-06-12 Jan-Oliver Wagner <[email protected]>
1044
1045 Fix for http://intevation.de/rt/webrt?serial_num=1900.
1046
1047 * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
1048
1049 * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
1050 multiplechoicedialog.py rather than from the wxPython library.
1051
1052 2003-06-11 Frank Koormann <[email protected]>
1053
1054 * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
1055 update.
1056
1057 2003-06-11 Frank Koormann <[email protected]>
1058
1059 * Thuban/Lib/fileutil.py (get_application_dir): New function to
1060 determine the absolute .thuban/thuban directory under
1061 "posix" (os.expanduser) and "nt" (read AppData registry key).
1062
1063 * Thuban/Model/resource.py: Use get_application_dir
1064
1065 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1066 Use get_application_dir.
1067
1068 2003-06-10 Bernhard Herzog <[email protected]>
1069
1070 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
1071 the messages MAP_LAYERS_REMOVED messages
1072 (LayerTableFrame.OnClose): Unsubscribe from it.
1073 (LayerTableFrame.map_layers_removed): New. Receiver for
1074 MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
1075 dialog is showing is removed.
1076
1077 2003-06-10 Bernhard Herzog <[email protected]>
1078
1079 * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
1080 of the receivers list so that unsubscribing in a receiver doesn't
1081 modify it while iterating over it.
1082
1083 * test/test_connector.py
1084 (ConnectorTest.test_disconnect_in_receiver): New. Test whether
1085 unsubscribing in a receiver works correctly. See docstring for
1086 details
1087
1088 2003-06-10 Bernhard Herzog <[email protected]>
1089
1090 * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
1091 message.
1092
1093 * Thuban/Model/layer.py (Layer.SetShapeStore): Send
1094 LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
1095 LAYER_CHANGED will still be sent if the classification changes.
1096
1097 * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
1098 parameter so we can subscribe to some of its messages
1099 (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
1100 and the layer's LAYER_SHAPESTORE_REPLACED
1101 (Classifier.unsubscribe_messages): New. Unsubscribe from message
1102 subscribed to in __init__
1103 (Classifier.map_layers_removed)
1104 (Classifier.layer_shapestore_replaced): receivers for the messages
1105 subscribed to in __init__. Unsubscribe and close the dialog
1106
1107 * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
1108 the map to the Classifier dialog
1109
1110 * test/test_layer.py (SetShapeStoreTests): Derive from
1111 SubscriberMixin as well so we can test messages
1112 (SetShapeStoreTests.setUp): Subscribe to some of the layer's
1113 messages
1114 (SetShapeStoreTests.tearDown): Clear the messages again
1115 (SetShapeStoreTests.test_sanity): Expand the doc-string and check
1116 for the modified flag too
1117 (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
1118 to check whether SetShapeStore sets the modified flag
1119 (SetShapeStoreTests.test_set_shape_store_different_field_name)
1120 (SetShapeStoreTests.test_set_shape_store_same_field)
1121 (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
1122 Add tests for the messages. This checks both the new
1123 LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
1124
1125 2003-06-06 Jan-Oliver Wagner <[email protected]>
1126
1127 * Thuban/UI/mainwindow.py: Improved and partly added help texts for
1128 the menu items.
1129
1130 2003-06-05 Frank Koormann <[email protected]>
1131
1132 * Thuban/UI/identifyview.py (IdentifyView.__init__):
1133 Layout reimplemented without panel. Make life easier to fit the list
1134 in the dialog.
1135
1136 2003-06-05 Frank Koormann <[email protected]>
1137
1138 * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
1139 once on initialisation (Former implementation resulted in multiple
1140 entries for each projection).
1141 (ProjFrame.__FillAvailList): selectProj as second optional parameter,
1142 if set, select the projection found under the specified name. This
1143 overwrites any other selection estimate.
1144 Removed projchoice filling from this method.
1145 (ProjFrame._OnSave, ProjFrame._OnAddToList):
1146 Updated call of ProjFrame.__FillAvailList
1147 (LCCPanel._DoLayout): Moved parameter controls in more common order.
1148
1149 * Resources/Projections/defaults.proj: Extended defaults representing
1150 various common European projections.
1151
1152 2003-06-05 Frank Koormann <[email protected]>
1153
1154 * Thuban/UI/identifyview.py (IdentifyView.__init__):
1155 Use ListCtrl instead of GridCtrl
1156
1157 * Thuban/Model/resource.py:
1158 Guess location of .thuban directory from tempdir parent directory.
1159
1160 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1161 Guess location of .thuban directory from tempdir parent directory.
1162
1163 2003-06-04 Bernhard Herzog <[email protected]>
1164
1165 Do not cache the values returned by the tree widget's
1166 GetFirstChild and GetNextChild methods because it led to lots of
1167 segfaults. The new way requires more brute force but is more
1168 reliable.
1169
1170 * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
1171 variable layer2id
1172 (LegendTree.find_layer): New method to do with brute force what
1173 layer2id tried to accomplish
1174 (LegendTree._OnMsgLayerChanged)
1175 (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
1176 Use find_layer instead of layer2id
1177 (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
1178 update layer2id anymore
1179 (LegendTree._OnMsgMapLayersRemoved)
1180 (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
1181
1182 2003-06-03 Thomas Koester <[email protected]>
1183
1184 * Thuban/Model/classgen.py (GenQuantiles0): New function.
1185
1186 2003-06-02 Bernhard Herzog <[email protected]>
1187
1188 * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
1189 New commands.
1190 (main_menu): Add the new commands.
1191 (MainWindow.TableRename): New. Implementation of the table_rename
1192 command.
1193 (MainWindow.RenameLayer): New. Implementation of the layer_rename
1194 command.
1195
1196 * Thuban/Model/session.py (Session.AddTable): call self.changed to
1197 set the modified flag
1198
1199 * test/test_session.py (TestSessionSimple.test_add_table): Test
1200 whether the modified flag is set properly
1201
1202 * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
1203 instead of issue so that the modified flags get updated.
1204
1205 * test/test_base.py (SomeTitledObject): Derive from Modifiable
1206 instead of Publisher to reflect reality better and to accomodate
1207 the fact that SetTitle now calls changed instead of issue
1208
1209 2003-06-02 Bernhard Herzog <[email protected]>
1210
1211 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
1212 acquisition has to happen before the try in a try-finally.
1213
1214 2003-06-02 Bernhard Herzog <[email protected]>
1215
1216 * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
1217 possible that a layer is removed that is not currently selected in
1218 the legend so don't check for this.
1219
1220 2003-05-30 Bernhard Herzog <[email protected]>
1221
1222 * Thuban/Model/layer.py (Layer.Destroy): Set all instance
1223 variables to None that have direct or indirect references to
1224 shapefiles or dbf files to make sure that they do go away and the
1225 files are closed.
1226
1227 2003-05-30 Bernhard Herzog <[email protected]>
1228
1229 * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
1230 availImgListIndices when a new image list is created
1231
1232 2003-05-30 Bernhard Herzog <[email protected]>
1233
1234 * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
1235 changing_selection to indicate whether the LegendTree code itself
1236 is currently changing the selection
1237 (LegendTree.normalize_selection): New method to normalize the
1238 selection by selecting the layer item even if the user clicked on
1239 the classification.
1240 (LegendTree._OnSelChanged): normalize the selection. This works
1241 around a bug in wx which doesn't keep track of the selection
1242 properly when subtrees are deleted.
1243
1244 2003-05-30 Bernhard Herzog <[email protected]>
1245
1246 * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
1247 maximum and minimum scale factors.
1248
1249 * test/test_classgen.py (ClassGenTest.test): Update to reflect the
1250 changes in classgen.py
1251
1252 2003-05-30 Jonathan Coles <[email protected]>
1253
1254 * Thuban/Model/classgen.py: Remove ClassGenerator class but make
1255 all the methods functions. Fixes RTBug #1903.
1256
1257 * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
1258 to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
1259 RTBug #1907.
1260
1261 * Thuban/UI/classgen.py: Use classgen functions that were part
1262 of the ClassGenerator class. Put try/finally blocks around
1263 code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
1264 RTBug #1904.
1265
1266 * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
1267
1268 * Thuban/UI/legend.py: The legend was cleared and repopulated any
1269 time something changed which caused some state to be lost such
1270 as which children were expanded or collapsed. Fixes RTBug #1901.
1271 (LegendTree._OnMsgMapLayersAdded): Add only new layers.
1272 (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
1273 the legend but not in the map.
1274 (LegendTree.__FillTree): Move main functionality out into smaller
1275 methods that can be used by other methods.
1276 (LegendTree.__FillTreeLayer): Reuse old slots in the image list
1277 if they are available.
1278 (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
1279 that we override the wxTreeCtrl method. Iterate over children
1280 and call __RemoveLayer.
1281 (LegendTree.__AddLayer): New. Add a new layer to the legend.
1282 (LegendTree.__RemoveLayer): Remove a layer from the legend.
1283 (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
1284 Should only be called with the id of a layer branch.
1285 (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
1286 Returns the root item or creates one if necessary.
1287
1288 * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
1289 ProjectRasterFile with tuple arguments instead of strings.
1290
1291 * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
1292 with try/finally. Fixes RTBug #1904.
1293
1294 * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
1295 with try/finally. Fixes RTBug #1904.
1296 (MapCanvas.FitSelectedToWindow): If a single point is selected
1297 simply center it on the display. Fixes RTBug #1849.
1298
1299 * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
1300 to be compiled as a standalone app. Now the code can only be
1301 called from Python which simplifies the parameter passing.
1302 (ProjectRasterFile): Handle Python arguments. Remove code that
1303 checks for a destination dataset. Add more clean up code.
1304
1305 * test/test_map.py (TestMapWithContents.test_raise_layer_top,
1306 TestMapWithContents.test_lower_layer_bottom):
1307 Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
1308 Fixes RTBug #1907.
1309
1310 * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
1311 extent to the map when the legend is toggled. Fixes RTBug #1881.
1312
1313 2003-05-29 Jan-Oliver Wagner <[email protected]>
1314
1315 * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
1316 unsubscribes all that is subcribed in __init__.
1317
1318 2003-05-28 Bernhard Herzog <[email protected]>
1319
1320 * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
1321 (MainWindow.CanDuplicateLayer): New methods to implement the
1322 Layer/Duplicate command.
1323 (layer_duplicate command): New.
1324 (main_menu): Add layer_duplicate to the Layer menu.
1325
1326 2003-05-28 Bernhard Herzog <[email protected]>
1327
1328 * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
1329 renderer so that NULL/None values get displayed differently (by a
1330 gray rectangle).
1331 (TableGrid.__init__): Override the default renderers
1332
1333 2003-05-28 Bernhard Herzog <[email protected]>
1334
1335 * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
1336 classification to "None" if the type of the field has changed.
1337
1338 * test/test_layer.py (SetShapeStoreTests): New. Class with a few
1339 test for the Layer.SetShapeStore method
1340
1341 2003-05-28 Jan-Oliver Wagner <[email protected]>
1342
1343 * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
1344 does not necessarily have a filename).
1345
1346 2003-05-28 Jan-Oliver Wagner <[email protected]>
1347
1348 * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
1349 sort the selection list for the dialog.
1350
1351 2003-05-28 Frank Koormann <[email protected]>
1352
1353 * extensions/thuban/wxproj.cpp
1354 (project_point): Removed cast to int for projected point coordinates.
1355 (shape_centroid): Return last point if all polygon vertices fall
1356 to one point.
1357
1358 2003-05-28 Bernhard Herzog <[email protected]>
1359
1360 * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
1361 with layers that don't have shapestores, i.e. raster layers.
1362
1363 2003-05-28 Bernhard Herzog <[email protected]>
1364
1365 * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
1366 when determining the title from the filename.
1367
1368 * test/test_dbf_table.py (TestDBFTable.test_title): Update to
1369 reflect changes in the way the title is derived from the filename
1370
1371 2003-05-28 Frank Koormann <[email protected]>
1372
1373 * Thuban/UI/mainwindow.py (MainWindow.TableShow):
1374 Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
1375
1376 2003-05-27 Bernhard Herzog <[email protected]>
1377
1378 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
1379 delegate SelectedLayer.
1380 (MainWindow.LayerUnjoinTable): Implement.
1381 (_can_unjoin): New. Helper function for the sensitivity of the
1382 layer/unjoin command.
1383
1384 * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
1385 (DerivedShapeStore.OrigShapeStore): New. Return the original
1386 shapestore. Used to figure out how to unjoin.
1387 (DerivedShapeStore.Shapefile): Fix a typo.
1388
1389 2003-05-27 Bernhard Herzog <[email protected]>
1390
1391 * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
1392 well
1393 (JoinDialog.__init__): Use the layer parameter and only build the
1394 left choice when a layer is given
1395 (JoinDialog.OnJoin): Handle layer joins as well
1396 (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
1397 that the user selects the "Select..." item. The sensitivitly
1398 updating is now in update_sensitivity
1399 (JoinDialog.y): New method to refactor the sensitivity update of
1400 the join button into its own method.
1401
1402 * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
1403
1404 2003-05-27 Bernhard Herzog <[email protected]>
1405
1406 * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
1407 iff there are unreferenced tables in the session
1408
1409 2003-05-27 Bernhard Herzog <[email protected]>
1410
1411 * Thuban/Model/messages.py (TABLE_REMOVED): New message.
1412
1413 * Thuban/Model/session.py (Session.UnreferencedTables): New method
1414 to return tables that are not referenced by other tables or shape
1415 stores and can be removed.
1416 (Session.RemoveTable): Issue a TABLE_REMOVED message after
1417 removing the table
1418
1419 * Thuban/UI/mainwindow.py: Remove unused imports
1420 (MainWindow.TableClose): Implement.
1421
1422 * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
1423 messages so that the frame will be automatically closed when a new
1424 session is opened or the table is removed.
1425 (TableFrame.OnClose): Unsubscribe the Subscriptions made in
1426 __init__
1427 (TableFrame.close_on_session_replaced)
1428 (TableFrame.close_on_table_removed): New. Subscribers that close
1429 the window
1430
1431 * test/test_session.py (TestSessionMessages.test_remove_table)
1432 (TestSessionSimple.test_remove_table): Move the test to
1433 TestSessionSimple and add test for the TABLE_REMOVED message
1434 (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
1435 (TestSessionSimple.test_unreferenced_tables) New. Test for the
1436 UnreferencedTables method.
1437 (UnreferencedTablesTests): New. Class with some more sophisticated
1438 tests for UnreferencedTables.
1439
1440 2003-05-27 Frank Koormann <[email protected]>
1441
1442 * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
1443 display has some unwanted side effects. Removed again.
1444
1445 2003-05-27 Frank Koormann <[email protected]>
1446
1447 * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
1448
1449 * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
1450
1451 2003-05-27 Jan-Oliver Wagner <[email protected]>
1452
1453 * test/test_menu.py (MenuTest.test): Added test for
1454 Menu.RemoveItem().
1455
1456 * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
1457 the menu.
1458
1459 2003-05-27 Frank Koormann <[email protected]>
1460
1461 Nonmodal dialogs without parent (i.e. they can fall behind the main
1462 window)
1463
1464 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
1465 all dialogs in the dialogs dictionary and the canvas.
1466
1467 * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
1468 parent, i.e. can fall behind other windows.
1469 (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
1470 dictionary before removing it.
1471
1472 * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
1473
1474 * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
1475 * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
1476 * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
1477
1478 2003-05-27 Bernhard Herzog <[email protected]>
1479
1480 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
1481 tableview dialog
1482 (MainWindow.TableShow): Use ShowTableView to open the dialogs.
1483 Also, don't use the table's titles as the dialog names. The titles
1484 aren't guaranteed to be unique.
1485 (MainWindow.TableOpen): Open a table view dialog after opening the
1486 table
1487
1488 2003-05-27 Bernhard Herzog <[email protected]>
1489
1490 * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
1491 effect can be achieved by simply closing the window showing the
1492 table.
1493 (MainWindow.TableHide): Removed.
1494 (main_menu): Removed "table_hide"
1495
1496 2003-05-27 Frank Koormann <[email protected]>
1497
1498 Fix legend tree display problems under Win32
1499
1500 * Thuban/UI/legend.py: BMP_SIZE_W = 15
1501 (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
1502 (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
1503
1504 * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
1505
1506 2003-05-27 Jan-Oliver Wagner <[email protected]>
1507
1508 * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
1509 'after' now allows to insert separators almost anywhere in the menu.
1510
1511 2003-05-27 Frank Koormann <[email protected]>
1512
1513 * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
1514 "S" of selection box label to hint on hot key (Alt-S). Works under
1515 Win32 but is ignored under GTK.
1516
1517 2003-05-26 Frank Koormann <[email protected]>
1518
1519 * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
1520 Center Choices.
1521
1522 2003-05-26 Bernhard Herzog <[email protected]>
1523
1524 Remove the Precision methods again. They're too DBF specific to be
1525 part of the table interface and they're only used in table_to_dbf
1526 anyway.
1527
1528 * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
1529 fixed precision of 12 for doubles.
1530 (TransientTableBase.Precision): Removed
1531 (AutoTransientTable.Width): Delegate to self.table.
1532
1533 * Thuban/Model/table.py (DBFTable.Precision)
1534 (MemoryTable.Precision): Removed.
1535 (MemoryTable.Width): Use a fixed precision of 12 for doubles.
1536 (table_to_dbf): Use a fixed precision of 12 for floats unless the
1537 column object specifies something else.
1538
1539 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
1540 test for table_to_dbf
1541
1542 2003-05-26 Bernhard Herzog <[email protected]>
1543
1544 * test/test_transientdb.py
1545 (TestTransientTable.run_iceland_political_tests): Fix a comment.
1546
1547 2003-05-26 Bernhard Herzog <[email protected]>
1548
1549 * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
1550 implementation. Mark parts of the file format strings for
1551 localization.
1552
1553 * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
1554 file and add the table to the tables managed by the session
1555
1556 * test/test_session.py (TestSessionSimple.test_open_table_file):
1557 New. test case for OpenTableFile
1558
1559 2003-05-26 Jan-Oliver Wagner <[email protected]>
1560
1561 * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
1562 Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
1563 Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
1564 Replace the true/false of wxWindows by True/False of Python 2.2.1.
1565
1566 2003-05-26 Jan-Oliver Wagner <[email protected]>
1567
1568 * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
1569 already a selection present, update the grid accordingly.
1570
1571 * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
1572 resizeable and increase its initial size.
1573
1574 2003-05-26 Frank Koormann <[email protected]>
1575
1576 Table export functionality
1577
1578 * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
1579 Return width (in characters) for a column.
1580 (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
1581 (table_to_dbf): Write table to dbf file.
1582 (table_to_csv): Write table to csv file.
1583
1584 * Thuban/Model/transientdb.py (TransientTableBase.Width,
1585 TransientTableBase.Precision): Return column width and precision.
1586
1587 * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
1588 or table_to_csv depending on file selection.
1589
1590 * test/test_dbf_table.py:
1591 Test table_to_dbf (extension of former part of test).
1592
1593 * test/test_csv_table.py:
1594 Test table_to_csv.
1595
1596 2003-05-23 Jan-Oliver Wagner <[email protected]>
1597
1598 * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
1599 Use QueryTableFrame instead of TableFrame.
1600
1601 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
1602 table window with 'Layer Table:' instead of 'Table:'.
1603
1604 2003-05-23 Jan-Oliver Wagner <[email protected]>
1605
1606 Give all tables a title via mix-in TitledObject.LayerShowTable
1607
1608 * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
1609 only if it exists.
1610
1611 * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
1612 and call its init-method with a default title. Remove Title() method.
1613
1614 * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
1615 AutoTransientTable): mix-in TitledObject and call its init-method with
1616 a default title. Remove Title() method.
1617
1618 2003-05-23 Bernhard Herzog <[email protected]>
1619
1620 * Thuban/Model/session.py (Session.AddShapeStore): Define
1621 AddShapeStore analogously to AddTable.
1622
1623 * test/test_session.py (TestSessionSimple.test_add_shapestore):
1624 New. Test for AddShapeStore
1625
1626 2003-05-23 Jan-Oliver Wagner <[email protected]>
1627
1628 Introducing QueryTableFrame and a very coarse ShowTable implementation.
1629
1630 * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
1631 class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
1632 The latter implements the selection GUI without dependency on a layer.
1633 LayerTableFrame now is derived from QueryTableFrame and connects
1634 to a layer.
1635
1636 * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
1637 implementation that still needs work.
1638
1639 * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
1640
1641 2003-05-22 Frank Koormann <[email protected]>
1642
1643 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
1644 Added "outer_join = False" as optional parameter.
1645 (TransientJoinedTable.create): If outer join is true, perform a
1646 "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
1647 the left table. Records not matching are filled with 0 / None.
1648
1649 * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
1650 (JoinDialog.OnJoin): Consider outer join check box.
1651
1652 2003-05-22 Bernhard Herzog <[email protected]>
1653
1654 * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
1655 somewhat safer way. Storing the traceback in a local variable can
1656 lead to memory leaks
1657
1658 2003-05-22 Bernhard Herzog <[email protected]>
1659
1660 * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
1661 the wxMessageDialog's Destroy() method.
1662
1663 2003-05-22 Frank Koormann <[email protected]>
1664
1665 * Thuban/UI/join.py (JoinDialog.__init__): Make use of
1666 TransientTable.Title()
1667
1668 2003-05-22 Frank Koormann <[email protected]>
1669
1670 Join Dialog, initial version.
1671
1672 * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
1673
1674 * Thuban/UI/join.py (JoinDialog): Functional implementation of
1675 former framework. Renamed Table1/Table2 to LeftTable/RightTable
1676 in all occurences.
1677
1678 * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
1679 Typo fixed.
1680
1681 2003-05-22 Bernhard Herzog <[email protected]>
1682
1683 Give the tables titles so that the GUI can display more meaningful
1684 names. For now the titles are fixed but depend on e.g. filenames
1685 or the titles of the joined tables.
1686
1687 * Thuban/Model/transientdb.py (TransientTable.Title)
1688 (TransientJoinedTable.Title, AutoTransientTable.Title): New.
1689
1690 * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
1691
1692 * test/test_transientdb.py
1693 (TestTransientTable.test_auto_transient_table_title): New. Test
1694 for the Title method
1695 (TestTransientTable.test_transient_joined_table)
1696 (TestTransientTable.test_transient_table): Add test for the Title
1697 methods
1698
1699 * test/test_memory_table.py (TestMemoryTable.test_title): New.
1700 Test for the Title method
1701
1702 * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
1703 the Title method
1704
1705 2003-05-22 Bernhard Herzog <[email protected]>
1706
1707 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1708 Provide a better way to destroy the layers
1709 (TestLayer.test_base_layer, TestLayer.test_arc_layer)
1710 (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1711 (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
1712 the new way to destroy the layers.
1713 (TestLayer.test_derived_store): New. Test for using a layer with a
1714 DerivedShapeStore
1715
1716 * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
1717 filename if the shape store actually has one.
1718
1719 2003-05-22 Bernhard Herzog <[email protected]>
1720
1721 * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
1722 for the filename
1723
1724 * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
1725 for the FileName method
1726 (TestDBFTableWriting.test_write): Fix spelling of filename
1727
1728 2003-05-22 Thomas Koester <[email protected]>
1729
1730 * Thuban/Model/range.py, test/test_range.py: Brought over new Range
1731 from SciParam that now really is immutable.
1732
1733 2003-05-22 Frank Koormann <[email protected]>
1734
1735 Layer Top/Bottom placement added to legend.
1736
1737 * Thuban/UI/legend.py
1738 (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
1739 bound to tool events.
1740 (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
1741 New, methods binding the event methods with the map methods.
1742
1743 * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
1744 layer at top/bottom of layer stack.
1745
1746 * Resources/Bitmaps/top_layer.xpm: New button icon.
1747
1748 * Resources/Bitmaps/bottom_layer.xpm: New button icon.
1749
1750 2003-05-22 Bernhard Herzog <[email protected]>
1751
1752 * Thuban/Model/session.py (Session.RemoveTable): New method to
1753 remove tables
1754
1755 * test/test_session.py (TestSessionSimple.test_remove_table): New.
1756 Test for RemoveTable
1757
1758 2003-05-22 Thomas Koester <[email protected]>
1759
1760 * Thuban/Model/classgen.py: Added short module doc string and CVS id.
1761 (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
1762
1763 2003-05-22 Bernhard Herzog <[email protected]>
1764
1765 Implement a way to discover dependencies between tables and
1766 shapestores.
1767
1768 * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
1769 (TransientJoinedTable.Dependencies)
1770 (AutoTransientTable.SimpleQuery): New. Implement the dependencies
1771 interface
1772 (TransientJoinedTable.__init__): Keep tack of the original table
1773 objects in addition to the corresponding transient tables.
1774
1775 * Thuban/Model/table.py (DBFTable.Dependencies)
1776 (MemoryTable.Dependencies): New. Implement the dependencies
1777 interface
1778
1779 * Thuban/Model/data.py (ShapeTable): New. Helper class for
1780 ShapefileStore
1781 (ShapefileStore.__init__): Use ShapeTable instead of
1782 AutoTransientTable
1783 (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
1784 (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
1785 methods for filename and type
1786 (ShapefileStore.Dependencies): New. Implement the dependencies
1787 interface
1788 (DerivedShapeStore): New class to replace SimpleStore. The main
1789 difference to SimpleStore is that it depends not on a shapefile
1790 but another shapestore which expresses the dependencies a bit
1791 better
1792 (SimpleStore.__init__): Add deprecation warning.
1793
1794 * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
1795 Test for the Dependencies method.
1796
1797 * test/test_memory_table.py (TestMemoryTable.test_dependencies):
1798 New. Test for the Dependencies method.
1799
1800 * test/test_transientdb.py
1801 (TestTransientTable.test_auto_transient_table_dependencies): New.
1802 Test for the Dependencies method.
1803 (TestTransientTable.test_transient_joined_table): Add test for the
1804 Dependencies method.
1805
1806 * test/test_session.py (TestSessionSimple.setUp)
1807 (TestSessionSimple.tearDown): New. Implement a better way to
1808 destroy the sessions.
1809 (TestSessionSimple.test_initial_state)
1810 (TestSessionSimple.test_add_table): Bind session to self.session
1811 so that it's destroyed by tearDown
1812 (TestSessionSimple.test_open_shapefile): New. Test for
1813 OpenShapefile and the object it returns
1814
1815 2003-05-22 Bernhard Herzog <[email protected]>
1816
1817 * Thuban/Model/session.py (Session.AddTable): New method to
1818 register tables with the session.
1819 (Session.Tables): Return the tables registered with AddTable too.
1820
1821 * test/test_session.py (TestSessionSimple.test_add_table): New.
1822 Test case for the AddTable method
1823
1824 2003-05-22 Frank Koormann <[email protected]>
1825
1826 UI polishing updates: Place main buttons (OK, Cancel, etc) in the
1827 lower right corner, center labels for selections, initialize controls
1828 in reasonable order for keyboard navigation.
1829
1830 * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
1831 (ProjFrame.__DoOnProjAvail): Determine position of current projection
1832 using the wxListBox.FindString() method. Still a problem (#1886)
1833
1834 * Thuban/UI/classifier.py
1835 (Classifier.__init__, SelectPropertiesDialog.__init__)
1836
1837 * Thuban/UI/classgen.py (ClassGenDialog.__init__,
1838 (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
1839 different classification types from here to __init__.
1840 (GenUniquePanel.__init__): Set the column width of the first field
1841 in the Field ListCtrl to the full width.
1842
1843 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
1844 Button to 'Export'. Center Buttons in Selection Box, set Focus to
1845 Grid.
1846 (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
1847 changes focus to the Selection when pressing "Alt-S".
1848
1849 * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
1850 the text if not visible. The italic font sometimes exceeds the
1851 rendering area.
1852
1853 2003-05-21 Jonathan Coles <[email protected]>
1854
1855 * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
1856 to OnClose so that Thuban closes correctly.
1857
1858 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
1859 DockFrame.OnClose, not DockFrame._OnClose.
1860
1861 2003-05-21 Jonathan Coles <[email protected]>
1862
1863 * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
1864 references to 'inf' and use new Range __init__ to pass floats
1865 directly rather than converting them to strings first.
1866 Fixes RTBug #1876.
1867
1868 * Thuban/Model/classification.py (ClassGroupRange.SetRange):
1869 Use new Range ___init__ to pass floats.
1870
1871 * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
1872 filename is a valid image file. Throw IOError otherwise.
1873
1874 * Thuban/Model/range.py: Brought over new Range from SciParam that
1875 is immutable and has an __init__ which can accept floats.
1876
1877 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
1878 into try block. AddLayer doesn't throw any exceptions anymore.
1879 (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
1880 try block.
1881
1882 * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
1883 the first item in choices. Fixes RTBug #1882.
1884
1885 * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
1886 has gone to 0 which is a serious problem. abort.
1887 (MapRenderer.draw_raster_layer): Catch IOError seperately and
1888 print the error from GDAL.
1889
1890 * Thuban/UI/tableview.py (TableGrid.__init__): Call
1891 ToggleEventListeners to turn on listening.
1892 (TableGrid.ToggleEventListeners): New. Turns event listening on
1893 and off so as to prevent excessive messages.
1894 (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
1895 to suppress excessive messages when selecting many rows.
1896 Fixes RTBug #1880.
1897
1898 * Thuban/UI/view.py: Added checks against if scale == 0. This
1899 is a serious problem that can occur when an image without
1900 geo data is loading and causes the map projection bounds to
1901 go to infinity. Right now, the solution is to simply try
1902 to recover.
1903
1904 * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
1905 to set the MFILEReceiver attributes even if the data is NULL.
1906
1907 * extensions/thuban/gdalwarp.cpp: Improved the error handling
1908 and passed GDAL messages back up to the Python layer. Also
1909 tried to fix some memory leaks that were present in the original
1910 utility but didn't matter because the program aborted.
1911
1912 * test/test_range.py: Copied over tests from SciParam. Removed
1913 tests against importing. Fixes RTBug #1867.
1914
1915 2003-05-21 Bernhard Herzog <[email protected]>
1916
1917 * test/test_load.py: Remove unused imports and restructure the
1918 test code
1919 (LoadSessionTest): Split into one class for each test and turn
1920 LoadSessionTest itself into the base class for all such session
1921 tests.
1922 (ClassificationTest): New base class for load tests that test
1923 classifications
1924 (TestSingleLayer, TestLayerVisibility, TestClassification)
1925 (TestLabels, TestLayerProjection, TestRasterLayer): New classes
1926 for the individual tests
1927
1928 * test/support.py (FileLoadTestCase.filename): New base class for
1929 file loading tests
1930
1931 2003-05-21 Jan-Oliver Wagner <[email protected]>
1932
1933 * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
1934 Mercator' to 'UTM Zone 32' as a more convenient example.
1935 Added 'Gauss Krueger Zone 6'.
1936
1937 * Data/iceland_sample_raster.thuban: political polygon now
1938 filled transparent to have the raster image visible at once.
1939
1940 2003-05-21 Frank Koormann <[email protected]>
1941
1942 * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
1943 OnClose() to keep in sync with extensions. Internally Thuban
1944 still uses "underscored" names.
1945
1946 2003-05-20 Jonathan Coles <[email protected]>
1947
1948 This puts back Raster layer support. These layers support projections
1949 through the GDAL library. Currently, the CVS version is being used.
1950 There are no Debian packages available although this may change soon.
1951 A GDAL driver was extended to support writing to memory rather to
1952 files.
1953
1954 There is still some work that needs to be done, such as some error
1955 handling when loading invalid images or when there is a problem
1956 projecting the image. This putback simply checks in the majority
1957 of the work.
1958
1959 * setup.py: Add gdalwarp library extension.
1960
1961 * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
1962 Defaults to False, but can be overridden by subclasses if they
1963 support classification.
1964 (RasterLayer): New. Defines a new layer that represents an
1965 image.
1966
1967 * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
1968 tag handler.
1969 (SessionLoader.start_layer): Encode the filename.
1970 (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
1971 New. Supports reading a rasterlayer tag.
1972
1973 * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
1974
1975 * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
1976 get a string in Latin1. If we get such as string convert it to
1977 unicode first, otherwise leave if alone before encoding.
1978 (SessionSaver.write_layer): Add support for writing both Layers
1979 and RasterLayers.
1980
1981 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
1982 The right argument may not be a string, it could also be a Column.
1983
1984 * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
1985 Make initial window size 600x400. Fixes RTBug #1872.
1986
1987 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
1988 the dialog is constructed so that we can support layers that
1989 do not have classifications.
1990 (Classifier._OnTry): Only build a classification if the layer
1991 supports one.
1992
1993 * Thuban/UI/legend.py: Change all checks that a layer is an
1994 instance of Layer into checks against BaseLayer.
1995 (LegendTree.__FillTreeLayer): Only add children to a branch if
1996 the layer supports classification.
1997
1998 * Thuban/UI/mainwindow.py (MainWindow.NewSession,
1999 MainWindow.OpenSession): Don't proceed with an action if the
2000 user chooses Cancel when they are asked to save changes.
2001 (MainWindow.AddRasterLayer): New. Open a dialog to allow the
2002 user to select an image file. Create a new RasterLayer and add
2003 it to the map.
2004
2005 * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
2006 for rendering RasterLayer layers.
2007 (MapRenderer.draw_raster_layer): Actually method that calls
2008 the GDALWarp python wrapper and constructs an image from the
2009 data returned.
2010
2011 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
2012 Choices symbols to match those used in the table query method.
2013 Replace deprecated method calls on table with new method names.
2014
2015 * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
2016 how small the scale can get. This still needs more testing.
2017
2018 * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
2019 Provides a driver to output in .bmp format.
2020
2021 * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
2022 New. Provides IO routines which write to memory, rather than a file.
2023
2024 * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
2025 of the gdalwarp utility provided in GDAL. Added function calls
2026 that can be accessed from python.
2027
2028 * Data/iceland_sample_raster.thuban: New. Sample file that uses
2029 a raster layer.
2030
2031 * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
2032 layer image data.
2033
2034 * Doc/thuban.dtd: Added rasterlayer attribute definition.
2035
2036 * test/test_layer.py, test/test_load.py, test/test_save.py: Added
2037 tests associated with the raster layer code.
2038
2039 * test/test_transientdb.py
2040 (TestTransientTable.test_auto_transient_table_query): Added a test
2041 for using a Column object as the "right" parameter to a query.
2042
2043 2003-05-19 Frank Koormann <[email protected]>
2044
2045 * Thuban/version.py (get_changelog_date):
2046 Catch exceptions if ChangeLog does not exist.
2047
2048 * Thuban/UI/view.py (MapCanvas.Export): Bugfix
2049
2050 2003-05-19 Frank Koormann <[email protected]>
2051
2052 Extended version information for Thuban
2053
2054 * Thuban/version.py: New, version information for Thuban: Last
2055 modification date and last ChangeLog entry date.
2056
2057 * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
2058 information: Display Thuban, wxPython and Python version.
2059
2060 2003-05-16 Bernhard Herzog <[email protected]>
2061
2062 * Thuban/Model/save.py: Remove some unused imports including the
2063 __future__ import for nested_scopes as Thuban relies on Python 2.2
2064 now.
2065 (XMLWriter.encode): Remove the special case for a None argument.
2066 In the saver encode is always called with a string argument.
2067
2068 2003-05-16 Bernhard Herzog <[email protected]>
2069
2070 * Thuban/UI/__init__.py: Remove the work-around for the locale bug
2071 in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
2072 of the bug was that e.g. float("1.2") would fail. Thuban now
2073 requires 2.4.x.
2074
2075 2003-05-16 Frank Koormann <[email protected]>
2076
2077 Printing enhancement and WMF export (under Win32)
2078
2079 * Thuban/UI/renderer.py (ExportRenderer): New, derived from
2080 ScreenRenderer. Renders Map, Legend and Scalebar for export.
2081 (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
2082 PrintRender.
2083
2084 * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
2085 to fullfil information needed for PrinterRenderer.
2086 (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
2087 (MapCanvas.Print): Adapted to new MapPrintout.
2088 (OutputTransform): General calculations to transform from canvas
2089 coordinates to export/printing devices.
2090
2091 * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
2092 new method_command to call ExportMap, with platform dependency (only
2093 __WXMSW__)
2094
2095 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
2096 of scalebar drawing area as new parameters.
2097
2098 * Thuban/Model/scalebar.py (roundInterval): round long instead of int
2099
2100 * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
2101 Update to extended scalebar.DrawScalebar header.
2102
2103 * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
2104
2105 * test/test_scalebar.py: Made test executable as standalone.
2106
2107 2003-05-16 Bernhard Herzog <[email protected]>
2108
2109 * Thuban/Model/table.py (Table): Remove this compatibility alias
2110 for DBFTable.
2111
2112 * test/test_table.py: Import DBFTable as Table because that alias
2113 doesn't exist anymore.
2114
2115 * Thuban/UI/classgen.py: Remove some unused imports
2116
2117 2003-05-14 Jonathan Coles <[email protected]>
2118
2119 * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
2120 Fix docstring.
2121 (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
2122 (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
2123 values of the supplied range to determine the beginning and end
2124 bounds of the generated classes.
2125
2126 * Thuban/Model/range.py (Range.number_re): Now accepts floats that
2127 do not have a leading 0 (.5 is now accepted as well as 0.5).
2128
2129 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
2130 call to ClassGenerator.GenUniformDistribution.
2131
2132 * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
2133 layout bug with the 'Projection' label.
2134
2135 * test/support.py (FloatTestCase): New. Needed for the Range tests.
2136
2137 * test/test_range.py: New. Imported from SciParam.
2138
2139 2003-05-12 Jonathan Coles <[email protected]>
2140
2141 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
2142 to table.UniqueValues() with calls that retrieve all the values
2143 from the table. This will need to be replaced by a method on table
2144 which can simply return the list (perhaps more efficiently).
2145
2146 2003-05-12 Jonathan Coles <[email protected]>
2147
2148 The return value of ClassGenerator.CalculateQuantiles has changed.
2149 Refer to the documentation for details.
2150
2151 * test/test_classgen.py: Modified Quantile tests to use the
2152 new return values.
2153
2154 * Thuban/Model/classgen.py
2155 (ClassGenerator.GenQuantiles): Add comments describing the parameters,
2156 use new return values from CalculateQuantiles to produce the correct
2157 range bounds in the Classification.
2158 (ClassGenerator.CalculateQuantiles): Add more comments describing
2159 the return values and parameters. Make minor adjustments to improve
2160 the legibility of the code. Fix problem with adjusted not being set
2161 in most cases.
2162
2163 2003-05-12 Frank Koormann <[email protected]>
2164
2165 * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
2166 and latin1. Fixes #1851 finally.
2167
2168 2003-05-09 Jonathan Coles <[email protected]>
2169
2170 * test/test_classgen.py: New. Tests the Quantile algorithm.
2171
2172 * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
2173 Clean up debugging statement, add comments, fix a small bug in the
2174 returned adjusted percentiles.
2175
2176 2003-05-09 Jonathan Coles <[email protected]>
2177
2178 Introduces Range class from SciParam into the ClassGroupRange class,
2179 and such ranges can now be saved and loaded from disk.
2180
2181 Quantiles are now available in the Classification Generator.
2182
2183 Initial support for building Queries on a table. Doesn't do anything
2184 but run some tests.
2185
2186 * Thuban/Model/classification.py: Explicit imports.
2187 (ClassGroupRange): Use the Range class to store the underlying
2188 range information. The interface remains the same, except for
2189 GetRange(), and you can also supply a Range object as the min
2190 parameter to SetRange or __init__.
2191
2192 * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
2193 string appropriately for use in Thuban. Fixes RTbug #1851.
2194 (SessionLoader.end_projection): Handle the context of the
2195 projection tag a bit better by looking at what objects are not
2196 None. There was an assumption that a projection tag for a map
2197 could occur before any layers.
2198 (SessionLoader.start_clrange): Provide backward compatibility for
2199 reading min/max values as well as the new range parameter.
2200
2201 * Thuban/Model/map.py: Explicit imports.
2202
2203 * Thuban/Model/resource.py: Import _.
2204 (ProjFileSaver.write): write header using projfile.dtd.
2205
2206 * Thuban/Model/save.py: Explicit imports.
2207 (XMLWriter.encode): New. Encode the given string from a format
2208 used by Thuban into UTF-8. Fixes RTbug #1851.
2209
2210 * Thuban/UI/classgen.py: Explicit imports.
2211 (ClassGenDialog.__init__): Clean up the code and add support
2212 for Quantiles.
2213 (ClassGenDialog.OnOK): Add support for Quantiles.
2214 (GenQuantilesPanel): New. Input panel for Quantiles.
2215 (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
2216 GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
2217
2218 * Thuban/Model/classgen.py: New. Contains all the classes named above.
2219
2220 * Thuban/UI/classifier.py: Explicit imports.
2221 (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
2222 ClassTable.SetValueAsCustom): Reworked to use new Range class.
2223
2224 * Thuban/UI/legend.py: Explicit imports.
2225
2226 * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
2227 a Table menu and associated method calls.
2228 (MainWindow.choose_color): Removed. No longer needed.
2229
2230 * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
2231 should be disabled if no projection is selected in the available
2232 list.
2233
2234 * Thuban/UI/renderer.py: Explicit imports.
2235
2236 * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
2237 with correctly selecting the rows and issuing the right events.
2238 Be sure to call Skip() to allow the grid to do some of its own
2239 handling which allows the rows to actually be selected.
2240 (LayerTableGrid.select_shapes): Rename from select_shape. Supports
2241 selecting multiple shapes.
2242 (LayerTableFrame): Support for building Queries.
2243 (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
2244
2245 * Thuban/UI/tree.py: Explicit imports.
2246
2247 * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
2248 table view can call it.
2249
2250 * test/test_classification.py: Explicit imports.
2251 (TestClassification.test_ClassGroupRange): Fix test for new
2252 Range class.
2253
2254 * Doc/thuban.dtd: Add range parameter for clrange.
2255
2256 * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
2257 object in ClassGroupRange, and also uesd for inputting ranges in
2258 the classifer table and elsewhere.
2259
2260 * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
2261 yet.
2262
2263 2003-05-09 Frank Koormann <[email protected]>
2264
2265 * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
2266
2267 2003-05-08 Frank Koormann <[email protected]>
2268
2269 Coding style updates
2270
2271 * test/test_scalebar.py: Replaced tab indentation by spaces.
2272
2273 * Thuban/UI/scalebar.py: Explicit imports.
2274
2275 2003-05-08 Frank Koormann <[email protected]>
2276
2277 * Thuban/UI/scalebar.py
2278 (ScaleBar.DrawScalebar): Format string bug fixed.
2279
2280 2003-05-08 Frank Koormann <[email protected]>
2281
2282 Reorganization of scalebar component (no wx in Thuban/Model)
2283
2284 * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
2285 (deriveInterval):
2286 Calculate scalebar interval and unit which fits in width for scale.
2287 (roundInterval): Round float.
2288
2289 * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
2290
2291 * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
2292
2293 * Thuban/UI/legend.py: Import Thuban.UI.scalebar
2294
2295 2003-05-08 Frank Koormann <[email protected]>
2296
2297 * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
2298 Initialize ScaleBar with canvas.map
2299
2300 * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
2301 round intervals to display smarter lengths
2302 (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
2303 layer. If the maps has no projection applied grey the scalebar.
2304
2305 2003-05-07 Frank Koormann <[email protected]>
2306
2307 Basic Scalebar features added.
2308
2309 * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
2310
2311 * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
2312 (ScaleBarBitmap): New, links the scalebar bitmap with view messages
2313 and the renderer.
2314
2315 * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
2316
2317 * Thuban/UI/messages.py: SCALE_CHANGED added.
2318
2319 2003-05-07 Bernhard Herzog <[email protected]>
2320
2321 * Thuban/Model/session.py (Session.__init__): New instance
2322 variable shapestores to hold a list of all open shapestore objects
2323 (Session.ShapeStores): New. Accessor method for the shapestores
2324 list.
2325 (Session._add_shapestore, Session._clean_weak_store_refs): New.
2326 Internal methods to maintain the shapestores list.
2327 (Session.Tables): New. Return all tables open in the session.
2328 (Session.OpenShapefile): Insert the new ShapeStore into the
2329 shapestores list.
2330
2331 * test/test_session.py (TestSessionSimple.test_initial_state): Add
2332 tests for ShapeStores and Tables
2333 (TestSessionWithContent.test_shape_stores)
2334 (TestSessionWithContent.test_tables): New. Test cases for
2335 ShapeStores and Tables
2336
2337 2003-05-07 Bernhard Herzog <[email protected]>
2338
2339 * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
2340 Add comments about the optimizations used.
2341 (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
2342 Implement the ReadValue table interface method.
2343
2344 * test/test_transientdb.py
2345 (TestTransientTable.run_iceland_political_tests)
2346 (TestTransientTable.test_transient_joined_table): Add tests for
2347 ReadValue
2348
2349 2003-05-07 Frank Koormann <[email protected]>
2350
2351 * Resources/Bitmaps/fulllayerextent.xpm,
2352 Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
2353 new icons.
2354
2355 2003-05-06 Bernhard Herzog <[email protected]>
2356
2357 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
2358 New. Simply delegate to the transient table's version.
2359
2360 * test/test_transientdb.py
2361 (TestTransientTable.test_auto_transient_table_query): New. Test
2362 case for AutoTransientTable's SimpleQuery
2363
2364 2003-05-06 Bernhard Herzog <[email protected]>
2365
2366 * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
2367 Implement a simple query method for the query dialog
2368 (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
2369 the row index or shapeid.
2370 (TransientTable.create): Insert the right value of the row index
2371 (TransientJoinedTable.create): Copy the row index of the left
2372 table to the joined result table
2373
2374 * test/test_transientdb.py
2375 (TestTransientTable.test_transient_table_read_twice): Fix
2376 doc-string
2377 (TestTransientTable.test_transient_table_query): New. Test for the
2378 SimpleQuery method
2379
2380 2003-05-06 Bernhard Herzog <[email protected]>
2381
2382 Convert all table users to use the new table interface. This only
2383 covers Thuban itself, not GREAT-ER or other applications built on
2384 Thuban yet, so the compatibility interface stays in place for the
2385 time being but it now issues DeprecationWarnings.
2386
2387 Finally, the new Table interface has a new method, HasColumn.
2388
2389 * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
2390 issue deprecation warnings when they're. The warnings refer to the
2391 caller of the method.
2392 (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
2393 for the deprecation warnings
2394
2395 * test/test_table.py: Ignore the deprecation warnings for the old
2396 table in the tests in this module. The purpose of the tests is to
2397 test the old interface, after all.
2398
2399 * test/test_transientdb.py
2400 (TestTransientTable.run_iceland_political_tests): Use the
2401 constants for the types. Add a test for HasColumn
2402 (TestTransientTable.test_transient_joined_table): Adapt to new
2403 table interface. Add a test for HasColumn
2404 (TestTransientTable.test_transient_table_read_twice): Adapt to new
2405 table interface
2406
2407 * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
2408 Adapt to new table interface
2409
2410 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
2411 new table interface
2412
2413 * Thuban/UI/controls.py (RecordListCtrl.fill_list)
2414 (RecordTable.SetTable): Adapt to new table interface
2415
2416 * Thuban/UI/classifier.py (Classifier.__init__)
2417 (Classifier.__init__): Adapt to new table interface
2418
2419 * Thuban/UI/classgen.py (ClassGenDialog.__init__)
2420 (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
2421 to new table interface
2422
2423 * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
2424 (AutoTransientTable.HasColumn): Implement the new table interface
2425 method
2426 (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
2427 (AutoTransientTable.UniqueValues): Adapt to new table interface
2428
2429 * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
2430 Adapt to new table interface
2431
2432 * test/test_layer.py (TestLayer.open_shapefile): Helper method to
2433 simplify opening shapefiles a bit easier.
2434 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
2435 (TestLayer.test_point_layer): Use the new helper method
2436 (TestLayer.test_get_field_type): New. Test for the GetFieldType
2437 method
2438
2439 * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
2440 the new table method
2441
2442 * test/test_memory_table.py (TestMemoryTable.test_has_column):
2443 Test for the new table method HasColumn
2444
2445 2003-05-06 Jonathan Coles <[email protected]>
2446
2447 Addresses the "Selection Extent" wish of RTbug #1787.
2448
2449 * Resources/Bitmaps/fulllayerextent.xpm,
2450 Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
2451 extent. These are just place holders for the real bitmaps.
2452
2453 * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
2454 calculate the bounding box once (the first time compute_bbox() is
2455 called).
2456 (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
2457 the bounding box for the shapes in lat/long coordinates.
2458
2459 * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
2460 option.
2461 (MainWindow.has_selected_shapes): New. Returns true if there are
2462 any selected shapes.
2463 (MainWindow.FullSelectionExtent): New. Calls
2464 MapCanvas.FitSelectedToWindow() when the user selects the menu option.
2465 (_has_selected_shapes): New. Returns true if there are any
2466 selected shapes.
2467
2468 * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
2469 true if there are any selected shapes.
2470
2471 * Thuban/UI/view.py (MapCanvas): Added delegated method
2472 HasSelectedShapes.
2473 (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
2474 shapes on the canvas using the map projection (if any).
2475
2476 * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
2477 for Layer.ShapesBoundingBox().
2478
2479 2003-05-06 Bernhard Herzog <[email protected]>
2480
2481 * Resources/Projections/defaults.proj: Fix spelling of Mercator
2482
2483 2003-05-05 Jonathan Coles <[email protected]>
2484
2485 Addresses the "Full Layer Extent" wish of RTbug #1787.
2486
2487 * Resources/Projections/defaults.proj: Added UK National Grid.
2488
2489 * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
2490 (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
2491 when the user selects the menu option.
2492
2493 * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
2494 scales the given layer on the canvas using the map projection.
2495
2496 2003-05-05 Bernhard Herzog <[email protected]>
2497
2498 Convert the table implementations to a new table interface. All
2499 tables use a common mixin class to provide backwards compatibility
2500 until all table users have been updated.
2501
2502 * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
2503 provide backwards compatibility for table classes implementing the
2504 new interface
2505 (DBFTable, MemoryTable): Implement the new table interface. Use
2506 OldTableInterfaceMixin as base for compatibility
2507 (DBFColumn, MemoryColumn): New. Column description for DBFTable
2508 and MemoryTable resp.
2509
2510 * test/test_dbf_table.py: New. Test cases for the DBFTable with
2511 the new table interface.
2512
2513 * test/test_memory_table.py: New. Test cases for the MemoryTable
2514 with the new table interface.
2515
2516 * test/test_table.py: Document the all tests in this file as only
2517 for backwards compatibility. The equivalent tests for the new
2518 interface are in test_memory_table.py and test_dbf_table.py
2519 (MemoryTableTest.test_read): field_info should be returning tuples
2520 with four items
2521 (MemoryTableTest.test_write): Make doc-string a more precise.
2522
2523 * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
2524 table interface. Derive from from OldTableInterfaceMixin for
2525 compatibility.
2526 (TransientTableBase.create): New intance variable column_map to
2527 map from names and indices to column objects
2528 (TransientTable.create): Use the new table interface of the input
2529 table
2530 (AutoTransientTable): Convert to new table interface. Derive from
2531 from OldTableInterfaceMixin for compatibility.
2532 (AutoTransientTable.write_record): Removed. It's not implemented
2533 yet and we still have to decide how to handle writing with the new
2534 table and data framework.
2535
2536 * test/test_transientdb.py
2537 (TestTransientTable.run_iceland_political_tests)
2538 (TestTransientTable.test_transient_joined_table): Use the new
2539 table interface
2540
2541 2003-05-05 Jonathan Coles <[email protected]>
2542
2543 This is namely a collection of UI updates to improve user interactivity.
2544 Tabbing between controls now exists and you can use ESC to close dialog
2545 boxes; ENTER will active the default button.
2546
2547 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
2548 order that the controls are created so that tabbing works correctly.
2549 (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
2550 wxDialog can handle the default button correctly.
2551 (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
2552 same reasons as for OnOK.
2553 (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
2554 when we ask the table for the maximum/minimum values of a field
2555 which could take a very long time.
2556
2557 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
2558 order that the controls are created so that tabbing works correctly.
2559 (SelectPropertiesDialog.__init__): Rearrange the order that the
2560 controls are created so that tabbing works correctly.
2561
2562 * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
2563 to derive from a wxDialog but behave like the original implementation
2564 which was derived from a wxFrame. wxDialog provides useful key
2565 handling functionality like ESC calling OnCancel and ENTER calling
2566 OnOK which is lost with wxFrame.
2567
2568 * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
2569 new dialogs.
2570
2571 * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
2572 order that the controls are created so that tabbing works correctly.
2573 (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
2574 (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
2575 (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
2576 (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
2577 can provide the "UK National Grid" as a default projection.
2578 (UTMPanel.__init__): Rearrange the order that the controls are
2579 created so that tabbing works correctly.
2580
2581 2003-05-05 Bernhard Herzog <[email protected]>
2582
2583 * extensions/thuban/wxproj.cpp: Fix some of the comments.
2584 (project_point): If a map projection but no layer projection is
2585 given, convert degrees to radians before applying the map
2586 projection.
2587
2588 * Thuban/UI/tableview.py (TableGrid.disallow_messages)
2589 (TableGrid.allow_messages): New methods to make it possible to
2590 inhibit message sending.
2591 (TableGrid.issue): Only send the message if not inhibited.
2592 (LayerTableGrid.select_shape): Use the new methods to make sure
2593 that no ROW_SELECTED message is sent while we're updating the
2594 selected rows to match the selected shapes.
2595
2596 2003-05-02 Jan-Oliver Wagner <[email protected]>
2597
2598 Implementation of MemoryTable.
2599
2600 * Thuban/Model/table.py (MemoryTable): New. Quite simple table
2601 implementation that operates on a list of tuples. All of the data
2602 are kept in the memory.
2603
2604 * test/test_table.py (MemoryTableTest): New.
2605
2606 * test/test_transientdb.py (SimpleTable): Removed.
2607 (TestTransientTable.test_transient_joined_table,
2608 (TestTransientTable.test_transient_table_read_twice): Replaced
2609 SimpleTable by MemoryTable.
2610
2611 2003-04-30 Jonathan Coles <[email protected]>
2612
2613 * Data/iceland_sample.thuban: Now contains correct projections
2614 for each of the layers.
2615
2616 * Resources/Projections/defaults.proj: Geographic projection
2617 contains unit conversion parameter.
2618
2619 2003-04-30 Jonathan Coles <[email protected]>
2620
2621 The most important part of this putback is the projection changes.
2622 It should now be possible to specify the projection that a layer
2623 is in and then specify a different projection for the map. The
2624 projection dialog has an extra parameter for a geographic projection
2625 which lets the user select if the input is in degrees or radians.
2626
2627 * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
2628 to say that the parameter is a tuple of unprojected
2629 points (which is what the callers to this method were assuming).
2630 Also, since the points are unprojected we need to projected them.
2631
2632 * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
2633 LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
2634 groups are selected, move the layer up/down. Fixes RTbug #1833.
2635
2636 * Thuban/UI/mainwindow.py: Move menu item map_rename up.
2637
2638 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
2639 parameter in call to SetClientData.
2640 (GeoPanel): Add support for selecting the units that the
2641 source data is in (Radians or Degrees).
2642
2643 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
2644 the rendering loop by reducing the number of if's, removing the
2645 unnecessary try/except block, and checking if the old group
2646 is the same as the new one (which happens a lot if there is
2647 no classification, or lots of shapes are in the same group).
2648
2649 * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
2650 around the redraw routine to try to catch problems that the user
2651 may create by selecting invalid projections for the data set and
2652 map. Clears the display if there are any problems and prints the
2653 error.
2654 (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
2655 rectangle.
2656
2657 * extensions/thuban/wxproj.cpp (project_point): First invert the
2658 supplied point (which should be in projected coordinates) using
2659 the layer's projection and then project the point using the
2660 map's projection.
2661 (project_points): Use project_point() to project each point.
2662
2663 2003-04-30 Jan-Oliver Wagner <[email protected]>
2664
2665 * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
2666 don't set the Classification to None if the classfication field
2667 is None (ie only a DEFAULT).
2668
2669 2003-04-30 Bernhard Herzog <[email protected]>
2670
2671 * Thuban/UI/view.py: Fix some typos.
2672
2673 * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
2674 not pop up the dialog if the selection becomes empty (this could
2675 happen if e.g. a new selection is opened while the identify tool
2676 is active and dialog had been closed)
2677
2678 2003-04-30 Bernhard Herzog <[email protected]>
2679
2680 * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
2681 instance variable read_record_last_result
2682 (TransientTableBase.read_record): Make sure reading the same
2683 record twice works. The implementation uses the new instance
2684 variable read_record_last_result
2685
2686 * test/test_transientdb.py
2687 (TestTransientTable.test_transient_table_read_twice): New test
2688 case for the above bug-fix.
2689
2690 2003-04-29 Jonathan Coles <[email protected]>
2691
2692 * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
2693
2694 * Thuban/UI/classgen.py: Remove all uses of Str2Num.
2695
2696 * Thuban/UI/classifier.py: Remove all uses of Str2Num.
2697 (ClassTable.SetValueAsCustom): Rename keyword argument in
2698 ClassGroup* constructors to match argument name.
2699
2700 2003-04-29 Bernhard Herzog <[email protected]>
2701
2702 * Thuban/Model/session.py (Session.Destroy): Explicitly close the
2703 transient DB if it exists to make sure it doesn't leave a journal
2704 file in the temp directory.
2705
2706 * Thuban/Model/transientdb.py (TransientDatabase.close): Set
2707 self.conn to None after closing the connection to make sure it's
2708 not closed twice
2709
2710 2003-04-29 Jonathan Coles <[email protected]>
2711
2712 Add a visible parameter in the layer XML tag. The default value is
2713 "true". If anything other than "false" is specified we also assume
2714 "true". Addresses RTbug #1025.
2715
2716 * Doc/thuban.dtd: Add visible parameter to a layer.
2717
2718 * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
2719 of visible from 1 to True.
2720 (Layer.__init__): Change default value of visible from 1 to True.
2721
2722 * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
2723 parameter.
2724
2725 * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
2726 parameter.
2727
2728 * test/test_load.py: Add new test data contents_test_visible.
2729 (LoadSessionTest.setUp): save test data.
2730 (LoadSessionTest.testLayerVisibility): Test if the visible flag
2731 is loaded correctly.
2732
2733 * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
2734 for saving an invisible layer.
2735
2736 2003-04-29 Jonathan Coles <[email protected]>
2737
2738 * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
2739 legend dialog box and tell it to change its map to the one
2740 supplied to SetMap(). Fixes RTbug #1770.
2741
2742 2003-04-29 Bernhard Herzog <[email protected]>
2743
2744 Next step of table implementation. Introduce a transient database
2745 using SQLite that some of the data is copied to on demand. This
2746 allows us to do joins and other operations that require an index
2747 for good performance with reasonable efficiency. Thuban now needs
2748 SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
2749 haven't tested that.
2750
2751 * Thuban/Model/transientdb.py: New. Transient database
2752 implementation.
2753
2754 * test/test_transientdb.py: New. Tests for the transient DB
2755 classes.
2756
2757 * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
2758 classes to help automatically remove temporary files and
2759 directories.
2760 (Session.__init__): New instance variables temp_dir for the
2761 temporary directory and transient_db for the SQLite database
2762 (Session.temp_directory): New. Create a temporary directory if not
2763 yet done and return its name. Use AutoRemoveDir to have it
2764 automatically deleted
2765 (Session.TransientDB): Instantiate the transient database if not
2766 done yet and return it.
2767
2768 * Thuban/Model/data.py (ShapefileStore.__init__): Use an
2769 AutoTransientTable so that data is copied to the transient DB on
2770 demand.
2771 (SimpleStore): New class that simply combines a table and a
2772 shapefile
2773
2774 * Thuban/Model/table.py (Table, DBFTable): Rename Table into
2775 DBFTable and update its doc-string to reflect the fact that this
2776 is only the table interface to a DBF file. Table is now an alias
2777 for DBFTable for temporary backwards compatibility.
2778
2779 * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
2780 the last reference to the session goes away so that the temporary
2781 files are removed properly.
2782
2783 * test/test_load.py (LoadSessionTest.tearDown): Remove the
2784 reference to the session to make sure the temporary files are
2785 removed.
2786
2787 2003-04-29 Bernhard Herzog <[email protected]>
2788
2789 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
2790 the __parser instance variable into a normal local variable in
2791 read. It's only used there and read will never be called more than
2792 once. Plus it introduces a reference cycle that keeps can keep the
2793 session object alive for a long time.
2794
2795 2003-04-29 Jonathan Coles <[email protected]>
2796
2797 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
2798 Projection an immutable item. Fixes RTbug #1825.
2799 (Projection.__init__): Initialize instance variables here.
2800 (ProjFile.Replace): New. Replace the given projection object with
2801 the new projection object. This solves the problem of needing the
2802 mutator Projection.SetProjection() in the ProjFrame class and
2803 allows a projection to change parameters without changing its
2804 location in the file.
2805
2806 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
2807 be of type wxSAVE and should verify overwriting a file.
2808
2809 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
2810 ProjFile.Replace() method instead of the mutator
2811 Projection.SetProjection(). Also requires that we reassign the
2812 client data to the new projection.
2813
2814 * test/test_proj.py (TestProjection.test): Test GetName() and
2815 GetAllParameters()
2816 (TestProjFile.test): Remove tests for Set*() methods. Add tests
2817 for Replace().
2818
2819 2003-04-25 Jonathan Coles <[email protected]>
2820
2821 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
2822 to save the name of the projection.
2823
2824 * test/test_save.py (SaveSessionTest.testLayerProjection): New
2825 test to verify layer projections are saved correctly.
2826
2827 2003-04-25 Jonathan Coles <[email protected]>
2828
2829 * Thuban/Model/proj.py (Projection.SetName): Set the name
2830 to "Unknown" if name is None.
2831 (Projection.SetAllParameters): New. Set the projection's
2832 parameter list to the one supplied.
2833 (Projection.SetProjection): New. Set the projection's
2834 properties to those of the supplied Projection.
2835
2836 * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
2837 the dialog title to include the map's title.
2838 (MainWindow.LayerProjection): Set the dialog title to include
2839 the layer's title.
2840
2841 * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
2842 error dialogs into a single method call.
2843 (ProjFrame.__VerifyButtons): Add more states to check.
2844 (ProjFrame.__GetProjection): Return the current state of an
2845 edited projection or None.
2846 (ProjFrame.__FillAvailList): Remove checks for states that
2847 shouldn't exist.
2848 (ProjFrame._OnNew): Clear all selected items and supply
2849 a projection panel if necessary.
2850
2851 * test/test_proj.py (TestProjFile.test): Add tests for
2852 ProjFile.SetAllParameters, ProjFile.SetProjection,
2853 ProjFile.SetName.
2854
2855 2003-04-25 Jonathan Coles <[email protected]>
2856
2857 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
2858 takes an optional argument to select the current projection.
2859 This does not guarantee that the item is visible due to
2860 limited wxWindows functionality. Fixes RTBug #1821.
2861
2862 2003-04-25 Jonathan Coles <[email protected]>
2863
2864 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
2865 the projection name and use it when constructing the Projection
2866 object.
2867
2868 * Thuban/Model/proj.py (Projection.__init__): Change the default
2869 value for 'name' to None and then test if name is equal to None
2870 in the body of the constructor. This way the caller doesn't have to
2871 know what the default value should be. Namely, useful in load.py
2872 where we have to pick a default value if the 'name' parameter
2873 doesn't exist in the XML file.
2874
2875 * test/test_load.py (LoadSessionTest.testLayerProjection): New.
2876 Tests a file where a layer has a projection.
2877
2878 2003-04-25 Jonathan Coles <[email protected]>
2879
2880 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
2881 tree for projection information.
2882
2883 * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
2884 XMLReader.GetFileName.
2885 (SessionLoader): Added support for loading projection tags that
2886 appear inside a layer.
2887
2888 * Thuban/Model/proj.py (ProjFile): Document the class. Move
2889 back to using a list because the order of the projections in
2890 the file is important to maintain. Fixes RTbug #1817.
2891
2892 * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
2893 to ProjFile.GetFilename.
2894
2895 * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
2896 information.
2897
2898 * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
2899 ProjFrame._OnSaveAs. Removed old dead code from previous
2900 implementation.
2901 (ProjFrame._OnExport): Add support for exporting more than one
2902 projection to a single file.
2903 (ProjFrame.__FillAvailList): use string formatting (% operator)
2904 to build strings that are (partly) translated. Fixes RTbug #1818.
2905
2906 * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
2907 class.
2908
2909 2003-04-24 Bernhard Herzog <[email protected]>
2910
2911 * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
2912
2913 * po/fr.po: New. French translation by Daniel Calvelo Aros
2914
2915 * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
2916 empty strings.
2917
2918 2003-04-24 Jonathan Coles <[email protected]>
2919
2920 * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
2921 implement the interface that the ProjFrame dialog expects.
2922
2923 * Thuban/Model/proj.py (Projection.SetName): New. Allows the
2924 name of the projection to be changed.
2925 (ProjFile): Use a dictionary instead of a list so that removing
2926 projections is easier and we are sure about uniqueness.
2927 (ProjFile.Remove): Remove the given projection object.
2928
2929 * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
2930 Return a list with only one projection file instead of searching for
2931 any projection file. This simplifies many things if the user can
2932 only have one system file and one user file.
2933
2934 * Thuban/UI/classgen.py: Change all references to
2935 genCombo to genChoice.
2936
2937 * Thuban/UI/mainwindow.py: Add a Projection option under the
2938 layer menu.
2939 (MainWindow.LayerProjection): New. Open up a projection window
2940 for a layer.
2941
2942 * Thuban/UI/projdialog.py: Large changes to how the dialog is
2943 laid out. Use three panels instead of one. One for the list of
2944 projections, one for the edit controls, and one for the buttons.
2945 Fixed resizing problems so that the dialog resizes correctly
2946 when the projection panel changes. Added import/export, save, and
2947 new buttons/functionality.
2948
2949 2003-04-24 Bernhard Herzog <[email protected]>
2950
2951 First step towards table management. Introduce a simple data
2952 abstraction so that we replace the data a layer uses more easily
2953 in the next step.
2954
2955 * Thuban/Model/data.py: New file with a simple data abstraction
2956 that bundles shapefile and dbffile into one object.
2957
2958 * Thuban/Model/session.py (Session.OpenShapefile): New method to
2959 open shapefiles and return a shape store object
2960
2961 * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
2962 object instead of a shapefile filename. This introduces a new
2963 instance variable store holding the datastore. For intermediate
2964 backwards compatibility keep the old instance variables.
2965 (open_shapefile): Removed. No longer needed with the shape store.
2966 (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
2967 get the shape store used by a layer.
2968 (Layer.Destroy): No need to explicitly destroy the shapefile or
2969 table anymore.
2970
2971 * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
2972 (MainWindow.AddLayer): Use the session's OpenShapefile method to
2973 open shapefiles
2974
2975 * Thuban/Model/load.py (ProcessSession.start_layer): Use the
2976 session's OpenShapefile method to open shapefiles
2977
2978 * test/test_classification.py
2979 (TestClassification.test_classification): Use the session's
2980 OpenShapefile method to open shapefiles and build the filename in
2981 a more platform independed way
2982
2983 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
2984 Implement to have a session to use in the tests
2985 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
2986 (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
2987 session's OpenShapefile method to open shapefiles
2988 (TestLayerLegend.setUp): Instantiate a session so that we can use
2989 it to open shapefiles.
2990 (TestLayerLegend.tearDown): Make sure that all references to
2991 layers and session are removed otherwise we may get a resource
2992 leak
2993
2994 * test/test_map.py (TestMapAddLayer.test_add_layer)
2995 (TestMapWithContents.setUp): Instantiate a session so that we can
2996 use it to open shapefiles.
2997 (TestMapWithContents.tearDown): Make sure that all references to
2998 layers, maps and sessions are removed otherwise we may get a
2999 resource leak
3000 ("__main__"): use support.run_tests() so that more info about
3001 uncollected garbage is printed
3002
3003 * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
3004 session's OpenShapefile method to open shapefiles
3005 ("__main__"): use support.run_tests() so that more info about
3006 uncollected garbage is printed
3007
3008 * test/test_selection.py (TestSelection.tearDown): Make sure that
3009 all references to the session and the selection are removed
3010 otherwise we may get a resource leak
3011 (TestSelection.get_layer): Instantiate a session so that we can
3012 use it to open shapefiles.
3013 ("__main__"): use support.run_tests() so that more info about
3014 uncollected garbage is printed
3015
3016 * test/test_session.py (TestSessionBase.tearDown)
3017 (TestSessionWithContent.tearDown): Make sure that all references
3018 to the session and layers are removed otherwise we may get a
3019 resource leak
3020 (TestSessionWithContent.setUp): Use the session's OpenShapefile
3021 method to open shapefiles
3022
3023 2003-04-24 Jonathan Coles <[email protected]>
3024
3025 * Thuban/Model/load.py (XMLReader.read): Should have been checking
3026 if the file_or_filename object had the 'read' attribute.
3027
3028 2003-04-23 Jonathan Coles <[email protected]>
3029
3030 * Thuban/Model/resource.py: Fixes RTbug #1813.
3031 (ReadProjFile): Add documentation about which exceptions are raised.
3032 Always pass the exceptions up to the caller.
3033 (GetProjFiles): If the directory can't be read return an empty list.
3034 If any of the proj files can't be read skip that file and go
3035 on to the next one.
3036
3037 * test/test_proj.py: Added test cases to handle nonexistent files,
3038 unreadable files, and files that don't parse correctly.
3039
3040 2003-04-23 Jonathan Coles <[email protected]>
3041
3042 Projection dialog. Allows the user to select from a list
3043 of projection templates and optionally edit them and save new ones.
3044
3045 * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
3046 (ProjPanel): Base class for projection specific panels.
3047 (TMPanel): Projection panel for Transverse Mercartor.
3048 (UTMPanel): Projection panel for Universal Transverse Mercartor.
3049 (LCCPanel): Projection panel for Lambert Conic Conformal.
3050 (GeoPanel): Projetion panel for Geographic Projection.
3051
3052 2003-04-23 Jonathan Coles <[email protected]>
3053
3054 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
3055 promote symmetry. There now exists XMLReader and XMLWriter.
3056 (XMLReader.read): New. Call to read the given file descriptor or
3057 filename.
3058 (XMLReader.close): New. Make sure the file is closed.
3059 (XMLReader.GetFileName): New. Return just the file name that is being
3060 read from.
3061 (XMLReader.GetDirectory): New. Return just the directory of the file
3062 that is being read.
3063 (XMLReader.AddDispatchers): New. Take a dictionary which contains
3064 the names of functions to call as the XML tree is parsed.
3065 (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
3066 (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
3067 (SessionLoader): Removed class variables start_dispatcher and
3068 end_dispatcher since this functionality is now part of a class
3069 instance. Fixes RTbug #1808.
3070 (SessionLoader.__init__): Add dispatcher functions.
3071 (load_xmlfile): Code was moved into the XMLReader.read().
3072 (load_session): Use modified SessionLoader.
3073
3074 * Thuban/Model/map.py (Map.GetProjection): New. Returns the
3075 map's projection.
3076
3077 * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
3078 GetAllParameters.
3079 (Projection.GetParameter): Returns the value for the given parameter.
3080
3081 * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
3082 (GetProjFiles): Renamed from GetProjections. Now returns a list
3083 of ProjFile objects.
3084 (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
3085 a list of ProjFile objects whose files are not user defined.
3086 (GetUserProjFiles): Renamed from GetUserProjections. Returns a
3087 list of ProjFile objects whose files are user defined.
3088 (ProjFileReader): Extend new XMLReader.
3089
3090 * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
3091 promote symmetry.
3092
3093 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
3094 control instead of a wxComboBox. wxChoice controls do not generate
3095 events as the uses highlights possible choices which fixes problems
3096 with resizing the dialog when the use selects an option.
3097
3098 * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
3099 control instead of a wxComboBox.
3100
3101 * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
3102 dialog.
3103
3104 * test/test_proj.py (TestProjection.test): New tests for GetParameter
3105 method.
3106
3107 2003-04-22 Bernhard Herzog <[email protected]>
3108
3109 * Thuban/UI/mainwindow.py: Remove some unused imports and global
3110 constants
3111
3112 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
3113 (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
3114
3115 2003-04-17 Bernhard Herzog <[email protected]>
3116
3117 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
3118 (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
3119 anymore.
3120 (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
3121 (Layer.ShapeType, Layer.Shape): No need to call
3122 self.open_shapefile since it's always called in __init__
3123
3124 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
3125 In wxPython 2.4 there's no need to extend MainLoop anymore since
3126 wxPython itself makes sure OnExit is called.
3127
3128 2003-04-16 Jonathan Coles <[email protected]>
3129
3130 Initial putback of projection management code. Includes new
3131 classes to read and write projection files. The current load
3132 and save classes were abstracted a bit so they could be reused.
3133 The Projection class was extended to provide new methods and
3134 have a name.
3135
3136 * Thuban/Model/load.py (XMLProcessor): New. Contains all the
3137 general XML reading methods that were part of ProcessSession.
3138
3139 * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
3140 name.
3141 (ProjFile): New. Represents a file that contains projection
3142 information.
3143
3144 * Thuban/Model/resource.py: New. Contains general utilities
3145 for read and writing projection files.
3146
3147 * Thuban/Model/save.py (XMLSaver): New. Contains all the
3148 general XML writing methods that were part of SessionSaver.
3149 (SessionSaver): Renamed from Saver.
3150
3151 * test/test_proj.py: New test cases for the projection
3152 file read and write functions.
3153
3154 2003-04-16 Jonathan Coles <[email protected]>
3155
3156 * Thuban/Model/classification.py: Use repr() around values
3157 in the ClassGroup*.__repr__() methods so it is clearer when
3158 a value is a string and when it is a number.
3159
3160 * test/test_load.py: Rework the classification test to test
3161 that we can load old files.
3162 (testLabels): Test a file where the groups have labels.
3163
3164 2003-04-16 Bernhard Herzog <[email protected]>
3165
3166 Safer implementation of the performance enhancements of the
3167 low-level renderer:
3168
3169 * extensions/thuban/wxproj.cpp (extract_projection)
3170 (extract_pointer): Rename extract_projection to extract_pointer
3171 and redefine its purpose to return the pointer stored in a CObject
3172 returned by the object's cobject method. Update all callers.
3173 (s_draw_info, free_draw_info, draw_polygon_init): Implement the
3174 handling of these low-level parameters so that each s_draw_info
3175 instance is handled as a CObject at python level that also
3176 contains real references to the actual python objects which
3177 contain the values in the struct. Add free_draw_info as the
3178 destructor.
3179 (draw_polygon_shape): Add the py_draw_info parameter which must a
3180 cobject containing an s_draw_info pointer.
3181
3182 * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
3183 method to instantiat the low-level render parameter
3184 (MapRenderer.draw_shape_layer): Use the new method. Remove some
3185 commented out code.
3186 (MapRenderer.draw_polygon_shape): Make the first parameter not the
3187 layer but the low-level render parameter
3188 (ScreenRenderer.draw_shape_layer): Use the low-level render
3189 parameter.
3190
3191 2003-04-15 Jonathan Coles <[email protected]>
3192
3193 * Thuban/Model/classification.py: Implemented __repr__ for
3194 the ClassGroup* classes to make debugging a bit easier.
3195 (ClassGroup.SetLabel): Check that the string is an instance
3196 of StringTypes not StringType. Accounts for Unicode strings.
3197
3198 * Thuban/Model/color.py: Implemented __repr__ to make
3199 debugging a bit easier.
3200
3201 * Thuban/Model/save.py (Saver.write_classification): Need to
3202 save the group label.
3203
3204 * test/test_load.py (testClassification): New. Loads the
3205 iceland_sample_test.thuban file and checks if it was loaded
3206 correctly.
3207
3208 2003-04-15 Jonathan Coles <[email protected]>
3209
3210 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
3211 to improve rendering performance by initializing the variables
3212 that are not change each time draw_polygon_shape() is called.
3213 The values are stored in a global struct draw_info.
3214 (draw_polygon_shape): Removed initialization code that is
3215 now in draw_polygon_init().
3216
3217 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
3218 drawing initialization call to draw_polygon_init()
3219 (MapRenderer.draw_polygon_shape): Use new signature of
3220 draw_polygon_shape.
3221
3222 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
3223 weirdness by setting the range to (1, maxint).
3224
3225 * Thuban/Model/classification.py (ClassGroupProperties): Make
3226 instance variables private and optimize comparison operator
3227 by first checking if the color references are the same.
3228 (ClassGroupSingleton): Make instance variables private.
3229 (ClassGroupRange): Make instance variables private.
3230
3231 * HOWTO-Release: Filled in missing steps for releasing packages.
3232
3233 2003-04-15 Bernhard Herzog <[email protected]>
3234
3235 First stab at internationalized messages:
3236
3237 * Thuban/__init__.py (_): Implement the translation function for
3238 real using the python gettext module.
3239
3240 * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
3241 translate empty strings.
3242
3243 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
3244 Add a missing space to a warning message
3245
3246 * po/README: New. Notes about the management of the translation
3247 files.
3248
3249 * po/Makefile: New. Makefile to help manage the translation files.
3250
3251 * po/es.po: New. Spanish translation by Daniel Calvelo Aros
3252
3253 * MANIFEST.in: Include the *.mo files in Resources/Locale and the
3254 translations and support files in po/
3255
3256 * setup.py (data_files): Add the *.mo files to the data_files too
3257
3258 * README: Add note about the translations when building from CVS
3259
3260 2003-04-14 Jonathan Coles <[email protected]>
3261
3262 * Thuban/UI/dock.py: Fixes some window resizing problems most
3263 noticable under windows. Always assume the button bitmaps will
3264 be there. Code clean up.
3265 (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
3266 images for the dock/undock button to the same images.
3267 Work around for RTbug #1801.
3268
3269 * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
3270 be allowed to grow within the sizer. Fixes a bug under Windows
3271 where the toolbar wasn't being drawn.
3272
3273 2003-04-14 Frank Koormann <[email protected]>
3274
3275 * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
3276 Updated design to try to make the button functionality more
3277 transparent.
3278
3279 2003-04-14 Jonathan Coles <[email protected]>
3280
3281 * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
3282 finalize the intialization of the panel.
3283
3284 * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
3285 creation of the panel. Should be the last thing called in the
3286 initializer of a subclass.
3287
3288 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
3289 set the current selections in the combo boxes. This is needed
3290 under Windows.
3291
3292 * Thuban/UI/classifier.py (Classifier.__init__): Add a top
3293 level panel to the dialog so that the background colors are
3294 consistent under Windows.
3295
3296 2003-04-11 Jonathan Coles <[email protected]>
3297
3298 * Thuban/UI/classgen.py: Change color ramps to start at white
3299 not black.
3300
3301 * Thuban/UI/legend.py: Enable/disable the legend buttons when
3302 the legend changes. Fixes RTbug #1793.
3303
3304 * test/test_classification.py: Added test for copying of
3305 classifications.
3306
3307 2003-04-11 Jonathan Coles <[email protected]>
3308
3309 * Thuban/UI/resource.py: New. Centralize the loading of resources
3310 such as bitmaps.
3311
3312 * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
3313 added images to the move buttons, added 'reverse' button.
3314 (CustomRampPanel.__init__): Added images to the move buttons.
3315 (GreyRamp): New. Generates a ramp from white to black.
3316 (HotToColdRamp): New. Generates a ramp from cold to hot colors.
3317
3318 * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
3319 ID_PROPERTY_*.
3320 (Classifier.__init__): Minor changes to the layout.
3321 (Classifier._OnTitleChanged): Listen for when the user edits the
3322 title and update the dialog's title and the layer's title.
3323
3324 * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
3325
3326 * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
3327 (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
3328 if the layer's title changes.
3329
3330 * Thuban/UI/mainwindow.py: Added new menu item and associated code
3331 to open a dialog to rename the map.
3332 (MainWindow): Use new resource class to import bitmaps.
3333
3334 2003-04-11 Jonathan Coles <[email protected]>
3335
3336 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
3337 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
3338 Resources/Bitmaps/group_use_none.xpm,
3339 Resources/Bitmaps/group_use_not.xpm,
3340 Resources/Bitmaps/hide_layer.xpm,
3341 Resources/Bitmaps/layer_properties.xpm,
3342 Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
3343 Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
3344 New.
3345
3346 2003-04-10 Jonathan Coles <[email protected]>
3347
3348 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
3349 Should pass group to ClassGroup constructor.
3350
3351 2003-04-10 Jonathan Coles <[email protected]>
3352
3353 * Thuban/Model/classification.py: (ClassGroup): Move all the common
3354 methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
3355 here. Implement SetVisible(), IsVisible().
3356 (ClassGroup.__init__): Add group parameter which acts as a copy
3357 constructor.
3358
3359 * Thuban/UI/classifier.py (ClassTable): Add a new column for the
3360 "Visible" check boxes.
3361 (Classifier): Rename the buttons and refactor the code to match
3362 the new labels.
3363
3364 * Thuban/UI/legend.py: Classify button is now called "Properties".
3365 Refactored the code to change variable names.
3366 (LegendTree.__FillTreeLayer): Only list a group if it is visible.
3367
3368 * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
3369 MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
3370 renamed to MainWindow.LayerEditProperties.
3371 (MainWindow.ToggleLegend): Don't include map name in legend title.
3372 (MainWindow.SetMap): Added the map name to the window title.
3373 (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
3374 MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
3375 Functionality is found in the layer properties dialog.
3376
3377 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
3378 draw visible groups.
3379
3380 2003-04-09 Jonathan Coles <[email protected]>
3381
3382 * Thuban/UI/classgen.py: Modifications to allow simple
3383 addition and selection of new color schemes.
3384 (MonochromaticRamp): New. Generates a ramp between two colors.
3385 (RedRamp): New. Generates a ramp of all red.
3386 (GreenRamp): New. Generates a ramp of all green.
3387 (BlueRamp): New. Generates a ramp of all blue.
3388
3389 2003-04-09 Jonathan Coles <[email protected]>
3390
3391 * Thuban/Model/classification.py (Classification.__deepcopy__):
3392 Need to copy over field and fieldType attributes.
3393
3394 * Thuban/Model/table.py (Table.field_range): New. Retrive the
3395 maximum and minimum values over the entire table for a given
3396 field.
3397 (Table.GetUniqueValues): New. Retrieve all the unique values
3398 in the table for a given field.
3399
3400 * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
3401 (GenUniquePanel): New. Controls to allow the user to select
3402 which unique field values they would like in the classification.
3403 (CustomRampPanel): Code that was in ClassGenDialog that allows
3404 the user to select the properties for a custom ramp.
3405 (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
3406
3407 * Thuban/UI/classifier.py: Removed a lot of debugging code.
3408 (Classifier._SetClassification): Callback method so that the
3409 class generator can set the classification in the grid.
3410 (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
3411 editing of a group properties class into a wxWindows control.
3412
3413 * Thuban/UI/dock.py: It was decided that if the user closes
3414 a dockable window the window should simply hide itself. That
3415 way if the user wants to show the dock again it appears in the
3416 same place as it was when it was closed.
3417 (DockableWindow.Destroy): Call renamed method OnDockDestroy().
3418 (DockableWindow._OnButtonClose): Hide the window instead of
3419 destroying it.
3420 (DockableWindow._OnClose): Hide the window instead of
3421 destroying it.
3422
3423 * Thuban/UI/legend.py (LegendTree): Use a private method to
3424 consistently set the font and style of the text. Fixes RTbug #1786.
3425
3426 * Thuban/UI/mainwindow.py: Import just the Classifier class.
3427
3428 2003-04-07 Bernhard Herzog <[email protected]>
3429
3430 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
3431 to the map module
3432
3433 2003-04-07 Bernhard Herzog <[email protected]>
3434
3435 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
3436 favor of ToggleSessionTree
3437 (MainWindow.ToggleSessionTree): New method to toggle visibility of
3438 the session tree.
3439 (MainWindow.SessionTreeShown): New method to return whether the
3440 session tree is currently shown.
3441 (MainWindow.ToggleLegend): New method to toggle visibility of the
3442 legend
3443 (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
3444 LegendShown
3445 (MainWindow.LegendShown): New method to return whether the legend
3446 is currently shown.
3447 (_method_command): Add checked parameter so we can define check
3448 menu items
3449 (_has_tree_window_shown, _has_legend_shown): Use the appropriate
3450 mainwindow methods.
3451 (show_session_tree, show_legend commands): Removed.
3452 (toggle_session_tree, toggle_legend commands): New commands to
3453 toggle the visibility of the dialogs
3454
3455 2003-04-07 Jonathan Coles <[email protected]>
3456
3457 * Thuban/UI/classgen.py: Fix Windows problem.
3458
3459 * Thuban/UI/dock.py: Fix Windows problem.
3460
3461 * Thuban/UI/mainwindow.py: Use False instead of false.
3462 (MainWindow.ShowLegend): Remove unnecessary switch parameter.
3463
3464 2003-04-07 Jonathan Coles <[email protected]>
3465
3466 Since we now say that the order of the groups in a classification
3467 matters, it makes sense to be able to manipulate that order. Most
3468 of the changes to Thuban/Model/classification.py are to that end.
3469
3470 * Thuban/Model/classification.py (Classification.AppendGroup,
3471 Classification.InsertGroup, Classification.ReplaceGroup,
3472 Classification.RemoveGroup, Classification.GetGroup): Do as the
3473 names imply.
3474 (Classification.FindGroup): This was called GetGroup, but GetGroup
3475 takes an index, while FindGroup takes a value.
3476 (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
3477 REFERENCE. Currently there is a cyclic reference between the layer
3478 and its classification. If the classification doesn't need to know
3479 its owning layer we can change this, since it may make sense to be
3480 able to use the same classification with different layers.
3481
3482 * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
3483
3484 * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
3485 not AddGroup()
3486
3487 * Thuban/UI/classifier.py: Now that we can depend on the order in
3488 a Classification and have methods to manipulate that order we don't
3489 need to use our own data structures in the grid. We can simply make
3490 the grid/table access the information they need from a copy of
3491 the classification object.
3492 (Classifier._OnCloseBtn): Event handler for when the user clicks
3493 'Close'. This is needed so if the user applies changes and then
3494 continues to change the table the user has the option of discarding
3495 the most recent changes and keeping what they applied.
3496
3497 * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
3498 into the same group.
3499
3500 * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
3501 with a really old version of proj, PJ_VERSION won't even be defined.
3502 If it isn't defined then just compile so that the function always
3503 returns Py_False.
3504
3505 * test/test_classification.py: Fix tests to use the renamed methods.
3506 Still need to write tests for the new methods.
3507
3508 2003-04-04 Jonathan Coles <[email protected]>
3509
3510 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
3511 call to SetSelection out of the method and before the call
3512 to __SelectField in __init__. This prevents a recursion of events
3513 when _OnFieldSelect is triggered by the user.
3514
3515 2003-04-04 Jonathan Coles <[email protected]>
3516
3517 * Thuban/Model/classification.py: Rename Color.None to
3518 Color.Transparent.
3519 (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
3520 Don't bother copying the color, since Colors are immutable.
3521
3522 * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
3523 Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
3524 Thuban/UI/renderer.py, Thuban/UI/view.py:
3525 Rename Color.None to Color.Transparent.
3526
3527 * test/test_classification.py, test/test_load.py: Rename Color.None
3528 to Color.Transparent.
3529
3530 2003-04-04 Jonathan Coles <[email protected]>
3531
3532 * Thuban/Model/classification.py: Fix assert calls.
3533 (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
3534 Copy the color parameter rather than hold onto a reference.
3535
3536 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
3537 the color object.
3538 (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
3539 are sure there exists only one refernce to Color.None in the system.
3540 This allows us to use 'is' rather than the comparision functions.
3541
3542 * Thuban/Model/save.py: Fix assert calls.
3543
3544 * Thuban/UI/classifier.py: Fix assert calls.
3545 (ClassGrid._OnCellDClick): Call up to the classifier to open the
3546 dialog to edit the groups properties.
3547 (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
3548 correctly if a cell is resized.
3549 (ClassTable.SetClassification): New. Changes the classification
3550 that is in the table.
3551 (ClassTable.__SetRow): Allow groups to be prepended.
3552 (Classifier): New code for opening the EditProperties and
3553 GenerateRanges dialogs.
3554 (SelectPropertiesDialog.__GetColor): Only set the color in the
3555 color dialog if the current color is not None.
3556
3557 * Thuban/UI/dock.py: Fix assert calls.
3558
3559 * Thuban/UI/legend.py: Fix assert calls.
3560
3561 * Thuban/UI/renderer.py: Fix assert calls.
3562
3563 * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
3564 classifications.
3565 (GenRangePanel): Panel specific to range generation.
3566 (GenSingletonPanel): Panel specific to singleton generation.
3567 (ClassGenerator): Class responsible for actually generating
3568 the classification from the data gathered in the dialog box.
3569 (PropertyRamp): Generates properties whose values range from
3570 a starting property to an ending property.
3571
3572 2003-04-03 Bernhard Herzog <[email protected]>
3573
3574 * test/support.py (print_garbage_information): New function that
3575 prints information about still connected messages and memory
3576 leaks.
3577 (run_suite): Removed.
3578 (run_tests): New function for use as a replacement of
3579 unittest.main in the test_* files. This one calls
3580 print_garbage_information at the end.
3581
3582 * test/runtests.py (main): Use support.print_garbage_information
3583
3584 * test/test_layer.py: Use support.run_tests instead of
3585 unittest.main so we get memory leak information
3586 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
3587 (TestLayer.test_point_layer, TestLayer.test_empty_layer)
3588 (TestLayerLegend.test_visibility): Call the layer's Destroy method
3589 to fix a memory leak.
3590
3591 * test/test_classification.py: Use support.run_tests instead of
3592 unittest.main so we get memory leak information
3593 (TestClassification.test_classification): Call the layer's Destroy
3594 method to fix a memory leak.
3595
3596 2003-04-02 Bernhard Herzog <[email protected]>
3597
3598 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
3599 Handle the reference counts of the return value and errors in
3600 PyArg_ParseTuple correctly.
3601
3602 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
3603 sure the filename is absolute to avoid problems when saving the
3604 session again
3605
3606 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
3607
3608 2003-04-01 Jonathan Coles <[email protected]>
3609
3610 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
3611 that there actually are points in the returned list of points
3612 before trying to index into the list. The list may be empty if
3613 the shape is a Null Shape.
3614
3615 2003-04-01 Bernhard Herzog <[email protected]>
3616
3617 * test/test_map.py: Don't use from <module> import *
3618
3619 2003-04-01 Jonathan Coles <[email protected]>
3620
3621 * Thuban/Model/session.py: Use LAYER_CHANGED instead of
3622 LAYER_LEGEND_CHANGED
3623
3624 * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
3625 self.Destroy() to close the window after yesterday's changes.
3626
3627 * test/test_map.py, test/test_session.py: Fix messages that
3628 are sent from maps and layers.
3629
3630 2003-03-31 Jonathan Coles <[email protected]>
3631
3632 * Thuban/UI/classifier.py: Commented out some debugging statements.
3633 (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
3634 RTbug #1769.
3635
3636 * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
3637 position (although position doesn't work yet under GTK).
3638 (DockableWindow.Destroy): New. Called when the window must be
3639 closed. Namely needed when the DockFrame closes and must close
3640 its children.
3641 (DockFrame): Listen for EVT_CLOSE and destroy all children.
3642
3643 * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
3644 when then window is told to close.
3645 (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
3646 comment in source for more info.
3647
3648 * Thuban/UI/main.py: Show the legend by default when Thuban starts.
3649
3650 * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
3651 symmetry with other such methods.
3652 (MainWindow.ShowLegend): Show the legend docked by default.
3653
3654 2003-03-28 Jonathan Coles <[email protected]>
3655
3656 * Thuban/UI/classifier.py: Support for highlighting a specific
3657 group within the grid when the classification dialog is opened.
3658 Also contains a lot of debugging printouts which will later
3659 be removed.
3660
3661 * Thuban/UI/dock.py: Complete rework on the dock code so that
3662 that it is fairly removed from the rest of the Thuban application.
3663 It is easy to add new docks which the rest of the program having
3664 to be aware of them.
3665
3666 * Thuban/UI/legend.py: Modifications to support selecting a
3667 specific group in the classification dialog. Changed how layers
3668 are drawn when the layer is visible/invisible.
3669
3670 * Thuban/UI/mainwindow.py: Removed legend specific code and
3671 replaced it with calls to the new dock code.
3672
3673 * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
3674 to check if scale > 0. Trying to track down a divide by zero.
3675
3676 2003-03-26 Jonathan Coles <[email protected]>
3677
3678 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
3679 (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
3680 now part of DockableWindow.
3681 (LegendPanel.DoOnSelChanged): Select the current layer in the
3682 map.
3683 (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
3684 with the selected layer and/or group.
3685
3686 2003-03-26 Jonathan Coles <[email protected]>
3687
3688 This putback contains the code for dockable windows. There is
3689 no support in wxWindows as of this date for windows that can
3690 attach themselves to other windows.
3691
3692 The current model contains a DockableWindow which has a parent
3693 window for when it is detached and a dock window that it puts
3694 its contents in when it is docked. The contents of a DockableWindow
3695 must be a DockPanel. DockPanel itself derives from wxPanel.
3696
3697 * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
3698 message, not a LAYER_LEGEND_CHANGED message.
3699
3700 * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
3701
3702 * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
3703 as one of the style properties for the fieldTypeText item to
3704 be sure that its size is correct when the text changes.
3705
3706 * Thuban/UI/dock.py: New. Classes for the DockPanel and
3707 DockableWindow.
3708
3709 * Thuban/UI/legend.py: Added some more buttons and made the
3710 LegendPanel a DockPanel.
3711
3712 * Thuban/UI/mainwindow.py: Added sash windows to the main window
3713 and supporting functions for manipulating the sashes.
3714 (MainWindow.ShowLegend): Create a DockableWindow with the
3715 LegendPanel as the contents.
3716
3717 * Thuban/UI/messages.py: Added DOCKABLE_* messages
3718
3719 * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
3720 not LAYER_LEGEND_CHANGED, messages.
3721
3722 2003-03-25 Jonathan Coles <[email protected]>
3723
3724 * setup.py: Added custom script bdist_rpm_build_script so that
3725 when the rpm is built the path to wx-config is correct.
3726
3727 * setup.cfg: Added line saying to use the custom build script
3728
3729 2003-03-20 Jonathan Coles <[email protected]>
3730
3731 Initial implementation of the Legend.
3732
3733 * Thuban/UI/legend.py: New. Creates a window that shows the map's
3734 Legend information and allows the user to add/modify classifications
3735 and how the layers are drawn on the map.
3736
3737 * setup.py: New command 'build_docs' which currently uses
3738 happydoc to generate html documentation for Thuban.
3739
3740 * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
3741 Returns a string which is appropriately describes the group.
3742
3743 * Thuban/Model/layer.py (Layer.SetClassification): Generate a
3744 LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
3745
3746 * Thuban/Model/map.py (Map): Rename messages and use new, more
3747 specific, messages.
3748
3749 * Thuban/Model/messages.py: New message to indicate that a layer's
3750 data has changed (LAYER_CHANGED). New map messages to indicate
3751 when layers have been added/removed/changed or if the stacking order
3752 of the layers has changed.
3753
3754 * Thuban/Model/session.py: Rename and use new messages.
3755
3756 * Thuban/UI/classifier.py: Remember if any changes have actually
3757 been applied so that if the dialog is cancelled without an application
3758 of changes we don't have to set a new classification.
3759 (ClassDataPreviewer): Pulled out the window specific code and put it
3760 ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
3761 symbols on any DC.
3762
3763 * Thuban/UI/mainwindow.py: New code to open the legend.
3764
3765 * Thuban/UI/view.py: Use new message names.
3766
3767 2003-03-19 Jonathan Coles <[email protected]>
3768
3769 * Thuban/UI/main.py (verify_versions): New. Checks the versions
3770 of Python, wxPython, and some other libraries.
3771
3772 * extensions/thuban/wxproj.cpp (check_version): Checks the given
3773 version against what wxproj was compiled with.
3774 (check_version_gtk): If wxproj was compiled with gtk then check
3775 the given version against the version of the gtk library
3776 currently being used.
3777
3778 2003-03-14 Bernhard Herzog <[email protected]>
3779
3780 * test/test_command.py: Run the tests when the module is run as a
3781 script
3782
3783 2003-03-14 Bernhard Herzog <[email protected]>
3784
3785 Implement selection of multiple selected shapes in the same layer:
3786
3787 - Introduce a new class to hold the selection. This basically
3788 replaces the interactor which was nothing more than the
3789 selection anyway. A major difference is of course that the new
3790 selection class supports multiple selected shapes in one layer
3791
3792 - Move the object that represents the selection from the
3793 application to the canvas. The canvas is a better place than the
3794 application because the selection represents which shapes and
3795 layer of the map displayed by the canvas are selected and
3796 affects how the map is drawn.
3797
3798 - Make the selection and its messages publicly available through
3799 the mainwindow.
3800
3801 - The non-modal dialogs do not get a reference to the interactor
3802 anymore as they can simply refer to their parent, the
3803 mainwindow, for the what the interactor had to offer.
3804
3805 * Thuban/UI/selection.py: New module with a class to represent the
3806 selection.
3807
3808 * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
3809 these unused messages
3810
3811 * Thuban/UI/application.py (ThubanApplication.OnInit)
3812 (ThubanApplication.OnExit, ThubanApplication.SetSession): The
3813 interactor is gone now.
3814 (ThubanApplication.CreateMainWindow): There is no interactor
3815 anymore so we pass None as the interactor argument for now for
3816 compatibility.
3817
3818 * Thuban/UI/view.py (MapCanvas.delegated_messages)
3819 (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
3820 Unsubscribe, delegate messages according to the delegated_messages
3821 class variable.
3822 (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
3823 attributes from instance variables as described with the
3824 delegated_methods class variable.
3825 (MapCanvas.__init__): New instance variable selection holding the
3826 current selection
3827 (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
3828 pass them on to the renderer
3829 (MapCanvas.SetMap): Clear the selection when a different map is
3830 selected.
3831 (MapCanvas.shape_selected): Simple force a complete redraw. The
3832 selection class now takes care of only issueing SHAPES_SELECTED
3833 messages when the set of selected shapes actually does change.
3834 (MapCanvas.SelectShapeAt): The selection is now managed in
3835 self.selection
3836
3837 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
3838 (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
3839 Unsubscribe, delegate messages according to the delegated_messages
3840 class variable.
3841 (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
3842 attributes from instance variables as described with the
3843 delegated_methods class variable.
3844 (MainWindow.__init__): The interactor as ivar is gone. The
3845 parameter is still there for compatibility. The selection messages
3846 now come from the canvas.
3847 (MainWindow.current_layer, MainWindow.has_selected_layer):
3848 Delegate to the the canvas.
3849 (MainWindow.LayerShowTable, MainWindow.Classify)
3850 (MainWindow.identify_view_on_demand): The dialogs don't need the
3851 interactor parameter anymore.
3852
3853 * Thuban/UI/tableview.py (TableFrame.__init__)
3854 (LayerTableFrame.__init__, LayerTableFrame.OnClose)
3855 (LayerTableFrame.row_selected): The interactor is gone. It's job
3856 from the dialog's point of view is now done by the mainwindow,
3857 i.e. the parent. Subscribe to SHAPES_SELECTED instead
3858 of SELECTED_SHAPE
3859
3860 * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
3861 is gone. It's job from the dialog's point of view is now done by
3862 the mainwindow, i.e. the parent.
3863
3864 * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
3865 gone. It's job from the dialog's point of view is now done by the
3866 mainwindow, i.e. the parent.
3867
3868 * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
3869 gone. It's job from the dialog's point of view is now done by the
3870 mainwindow, i.e. the parent.
3871 (SessionTreeCtrl.__init__): New parameter mainwindow which is
3872 stored as self.mainwindow. The mainwindow is need so that the tree
3873 can still subscribe to the selection messages.
3874 (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
3875 (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
3876 selection is now accessible through the mainwindow. Subscribe to
3877 SHAPES_SELECTED instead of SELECTED_SHAPE
3878
3879 * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
3880 SHAPES_SELECTED message now.
3881 (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
3882 so deal with multiple shapes
3883 (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
3884 gone. It's job from the dialog's point of view is now done by the
3885 mainwindow, i.e. the parent.
3886
3887 * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
3888 parameter is now a list of shape ids.
3889 (RecordTable.SetTable): The second parameter is now a list of
3890 indices.
3891
3892 * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
3893 selected_shape parameter and ivar to selected_shapes. It's now a
3894 list of shape ids.
3895 (MapRenderer.draw_label_layer): Deal with multiple selected
3896 shapes. Rearrange the code a bit so that the setup and shape type
3897 distinctions are only executed once.
3898
3899 * test/test_selection.py: Test cases for the selection class
3900
3901 2003-03-11 Jonathan Coles <[email protected]>
3902
3903 * Thuban/Model/load.py: Temporary fix so that the xml reader
3904 doesn't cause Thuban to crash.
3905
3906 * Thuban/Model/layer.py: Handle the cyclic references between
3907 a layer and its classification better, and be sure to disconnect
3908 the classification from the layer when the layer is destroyed
3909 so that we don't maintain a cyclic reference that may not be
3910 garbage collected.
3911
3912 * Thuban/Model/classification.py: See comment for layer.py.
3913
3914 2003-03-12 Jan-Oliver Wagner <[email protected]>
3915
3916 * HOWTO-Release: New. Information on the steps for releasing
3917 a new version of Thuban.
3918
3919 2003-03-11 Jonathan Coles <[email protected]>
3920
3921 * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
3922 Use True instead of true.
3923 (Classifier): Should have a single panel in which all the controls lie.
3924
3925 * Thuban/UI/proj4dialog.py: Add normal border.
3926
3927 * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
3928
3929 * Thuban/UI/mainwindow.py: Use True instead of true.
3930
3931 * setup.py: Update some definitions to use wxWindows2.4 files
3932
3933 * Data/iceland_sample_class.thuban: Fixed file so that the
3934 field_type information is present.
3935
3936 2003-03-10 Jonathan Coles <[email protected]>
3937
3938 * Thuban/UI/classifier.py (Classifier.__init__): Make the
3939 field type label grow so that when the text changes the
3940 size is updated correctly. This may be a wxWindows bug.
3941
3942 2003-03-10 Jonathan Coles <[email protected]>
3943
3944 * Thuban/UI/application.py: Changed SESSION_CHANGED to
3945 SESSION_REPLACED.
3946
3947 * Thuban/UI/classifier.py: Wrap text with _().
3948 (ClassGrid.CreateTable): Set dimensions and size hints here,
3949 instead of in Reset, so we only set the size once.
3950
3951 * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
3952
3953 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
3954 Call Close() instead of Shutdown().
3955
3956 * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
3957
3958 * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
3959 Go back to using OnClose() instead of Shutdown().
3960
3961 2003-03-10 Jonathan Coles <[email protected]>
3962
3963 * Thuban/UI/classifier.py (Classifier): SelectField() needed
3964 to know the old field index as well as the new one.
3965
3966 2003-03-10 Jonathan Coles <[email protected]>
3967
3968 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
3969 to correctly set the table information and call this from
3970 __init__ and from _OnFieldSelect so that all the information
3971 is up to date when the dialog opens and when a field is changed.
3972
3973 2003-03-10 Jonathan Coles <[email protected]>
3974
3975 * Thuban/Model/classification.py (Classification): Don't use
3976 layer's message function directly, use the ClassChanged() method
3977 when then classification changes. SetField/SetFieldType/SetLayer
3978 must keep the information about field name and field type in
3979 sync when an owning layer is set or removed.
3980
3981 * Thuban/Model/layer.py: Added ClassChanged() so that the
3982 classification can tell the layer when its data has changed.
3983 (Layer.SetClassification): Accepts None as an arguement to
3984 remove the current classification and correctly handles
3985 adding a new classification.
3986
3987 * Thuban/Model/load.py: Comment out print statement
3988
3989 * test/test_classification.py, test/test_save.py: New and
3990 improved tests.
3991
3992 2003-03-07 Jonathan Coles <[email protected]>
3993
3994 * Thuban/Model/classification.py: Implemented __copy__ and
3995 __deepcopy__ for ClassGroup* and ClassGroupProperites so
3996 they can easily be copied by the classifier dialog.
3997 (ClassGroupProperites.__init__): The default line color should
3998 have been Color.Black.
3999
4000 * Thuban/UI/classifier.py: Setting and Getting table values now
4001 uses a consistent set of functions.
4002 (Classifier): Now non-modal. Has field type label which changes
4003 as the field changes. Keep track of buttons in a list so that
4004 we can enable/disable the buttons when the None field is selected.
4005 (SelectPropertiesDialog): Add buttons to make the colors transparent.
4006
4007 * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
4008 does what OnClose did, but can be called by the application to
4009 close a window. Needed when a session changes, and we have to
4010 close the classifier windows.
4011
4012 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
4013 Shuts down open dialogs. Used when a new session is created
4014 or a session is opened.
4015 (MainWindow.SaveSession): Should only call application.SaveSession()
4016 if we don't call SaveSessionAs first.
4017 (MainWindow.Classify): Allow different classifier dialogs for
4018 different layers.
4019
4020 * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
4021 the parent class handle it. Add Shutdown() to unsubscibe from
4022 event notification and call the parent Shutdown(). This was
4023 necessary so the application can close the tree window.
4024
4025 2003-03-06 Jonathan Coles <[email protected]>
4026
4027 * Thuban/Model/classification.py: Minor documentation changes,
4028 Addition of __eq__ and __ne__ methods.
4029 (Classification.SetLayer): prevent recursion between this method
4030 and Layer.SetClassification().
4031
4032 * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
4033
4034 * Thuban/Model/layer.py (SetClassification): prevent recursion
4035 between this method and Classification.SetLayer().
4036
4037 * test/test_classification.py, test/test_load.py,
4038 test/test_session.py: Fixed and added tests for the classification
4039 classes.
4040
4041 2003-03-06 Bernhard Herzog <[email protected]>
4042
4043 * Thuban/UI/classifier.py (ClassGrid.__init__)
4044 (ClassGrid.CreateTable): Move the SetSelectionMode call to
4045 CreateTable because otherwise it triggers an assertion in
4046 wxPython/wxGTK 2.4.
4047
4048 2003-03-05 Jonathan Coles <[email protected]>
4049
4050 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
4051
4052 * Thuban/Model/load.py: import FIELDTYPE constants from table.
4053
4054 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
4055
4056 * Thuban/Model/table.py: Put FIELDTYPE constants back.
4057
4058 2003-03-05 Jonathan Coles <[email protected]>
4059
4060 * Thuban/UI/classifier.py: Added class documentation.
4061 Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
4062 Store just the groups in the table and generate the other
4063 column information when it is requested. Add "None" field
4064 to pull-down to select no classification.
4065
4066 * Thuban/common.py: Moved FIELDTYPE constants from table.py
4067 (Str2Num): Only catch ValueError exceptions.
4068
4069 * Thuban/Model/classification.py: Class documentation. Renaming
4070 of methods with Stroke to Line. Groups are stored in a single
4071 list with the default as the first element. Groups are searched
4072 in the order they appear in the list.
4073
4074 * Thuban/Model/color.py: Documentation.
4075
4076 * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
4077 the kind of data represented by a field.
4078
4079 * Thuban/Model/load.py (ProcessSession): Use proper string
4080 conversion function; fixes RTbug #1713.
4081
4082 * Thuban/Model/save.py (Saver): Store field type information.
4083
4084 * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
4085 (Table): Add field_info_by_name() to retrieve field information
4086 by specifying the field name, not the number.
4087
4088 * Thuban/UI/mainwindow.py: Function name changes.
4089
4090 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
4091 get the layer classification once. Don't try to classify
4092 values when the field is None: just use the default properties.
4093
4094 * Thuban/UI/view.py: Function name changes.
4095
4096 * Doc/thuban.dtd: Add field_type attribute to a classification.
4097
4098 2003-03-04 Bernhard Herzog <[email protected]>
4099
4100 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
4101 the fill and stroke layer attributes optional with suitable
4102 default values. Add the stroke_width layer attribute. Use correct
4103 syntax for empty elements. Make the attribute list for labels
4104 refer to the label element.
4105
4106 2003-03-04 Bernhard Herzog <[email protected]>
4107
4108 * setup.py (thuban_build_py.build): Add a comment about distutils in
4109 Python 2.3 containing some of the functionality we implement in
4110 setup.py ourselves.
4111
4112 * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
4113 before the selection mode. Doing it the other way round triggers
4114 an assertion in wxWindows.
4115
4116 * Thuban/Model/save.py (escape): Fix typo in doc-string
4117
4118 * Thuban/Model/classification.py: Remove unnecessary wxPython
4119 import
4120
4121 2003-03-04 Jonathan Coles <[email protected]>
4122
4123 * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
4124 Parameter 'value' should default to None.
4125
4126 * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
4127 the class attribute __classification is now private.
4128
4129 * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
4130 Classifier to ClassGrid. Added support for removing selected rows,
4131 which including code for keeping track of when cells are selected,
4132 and deselected.
4133 (ClassTable): Support for added/removing rows. Fixed a problem
4134 with __ParseInput whereby it would not allow strings (only numbers)
4135 to be entered.
4136 (Classifier): Added button and supporting code for removing
4137 selected rows.
4138
4139 2003-02-27 Jonathan Coles <[email protected]>
4140
4141 * Thuban/common.py: Moved color conversion functions into
4142 Thuban/UI/common.py.
4143 (Str2Num): Now converts the float (not the string) to a long/int
4144 so that an exception isn't thrown.
4145
4146 * Thuban/UI/common.py: Common functions used in several UI modules
4147
4148 * Thuban/Model/classification.py: Changed the class hierarchy
4149 so that a Classification consists of Groups which return
4150 Properties when a value matches a Group.
4151
4152 * Thuban/Model/layer.py: Fixed name resolution problem.
4153
4154 * Thuban/Model/load.py: Use new Classification and Group functions.
4155
4156 * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
4157 failure.
4158 (Saver.write_classification): Use new Classification and Group
4159 functions.
4160
4161 * Thuban/UI/classifier.py: Changes to use new Classification and Group
4162 functions. Fix to create a tuple with a single value instead of
4163 simply returning the value.
4164
4165 * Thuban/UI/renderer.py: Use new Classification and Group functions.
4166 Use common.py functions.
4167
4168 * Thuban/UI/tree.py: Use common.py functions.
4169
4170 * test/test_classification.py: Use new Classification and Group
4171 classes.
4172
4173 2003-02-24 Jonathan Coles <[email protected]>
4174
4175 * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
4176 functions from Thuban color objects to wxWindow colour objects.
4177
4178 * Thuban/Model/classification.py (Classification): Renamed
4179 GetProperties() to GetClassData(). Used the new iterator
4180 in TreeInfo().
4181 (ClassIterator): Iterator implementation to iterate over the
4182 ClassData objects in a classification object.
4183
4184 * Thuban/Model/save.py (Saver.write_classificaton): Uses
4185 the new iterator to save the classification information.
4186
4187 * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
4188 for changing the stroke and fill colors and previewing the
4189 changes.
4190
4191 * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
4192 MainWindow.SaveSessionAs): Text string changes so the dialogs
4193 have more meaningful titles.
4194
4195 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
4196 Classification method name from GetProperties to GetClassData.
4197
4198 * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
4199 instead of accessing now non-existent class variables.
4200
4201 2003-02-24 Bernhard Herzog <[email protected]>
4202
4203 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
4204 unneeded Shape() call. Rendering is substantially faster without
4205 it and it avoids some problems with broken shape files.
4206
4207 2003-02-20 Frank Koormann <[email protected]>
4208
4209 Force minimal size of identify and label dialogs. The autosizing
4210 looked too ugly.
4211
4212 * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
4213 * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
4214 Set size of listctrl.
4215 * Thuban/UI/identifyview.py (IdentifyView.__init__):
4216 Set size of dialog.
4217
4218 2003-02-19 Jonathan Coles <[email protected]>
4219
4220 * test/test_classification.py, test/test_layer.py,
4221 test/test_load.py, test/test_map.py, test/test_session.py:
4222 Updated the tests to use the new functions that are in the
4223 respective classes.
4224
4225 * Thuban/Model/classification.py (Classification):
4226 Uses the new ClassData* classes. Modification messages are
4227 passed up to the parent layer (if it exists).
4228 (ClassData): New class to encapsulate the common data in each
4229 classification property.
4230 (ClassDataDefault): Represents the Default class. data.
4231 (ClassDataPoint): Represents a single class. data point
4232 (ClassDataRange): Represents a class. range
4233 (ClassDataMap): Represents a class. map (unused).
4234
4235 * Thuban/Model/color.py: Added Color.None to represent something
4236 with no color. Color.Black represents the color black.
4237 (NoColor): Helper class derived from Color to represent something
4238 with no color.
4239
4240 * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
4241 stroke_width attributes. Made the 'classification' attribute private.
4242 New methods for setting/getting the classification.
4243
4244 * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
4245 to get the classifcation and use the new ClassData* classes to
4246 hold the classification data. Use Str2Num to convert numbers
4247 properly.
4248
4249 * Thuban/Model/save.py (Saver): Use new Color and Classification
4250 methods
4251
4252 * Thuban/UI/classifier.py (ClassGrid): New class to represent a
4253 custom grid.
4254 (ClassTable): Support for editing Values and Labels and for
4255 changing what type (point or range) of data is stored in each
4256 property based on how the user enters the data.
4257 (Classifier): Support for saving the new classifications and
4258 launching the dialog to edit a property.
4259 (SelectPropertiesDialog): New class for editing the visual
4260 properties of a classification (stroke color, width, and fill color)
4261 (ClassPreviewer): Took the Draw method from ClassRenderer and
4262 made most of it into this new class. Intend to use this class in
4263 the SelectPropertiesDialog for previewing changes.
4264
4265 * Thuban/UI/renderer.py: Use new Color and Classification methods.
4266
4267 * Thuban/UI/tree.py: Formatting changes.
4268
4269 * Doc/thuban.dtd: Add 'label' element
4270
4271 * Thuban/common.py: New. Contains common routines used throughout
4272 the code.
4273 (Str2Num): Takes a string and converts it to the "best" type of
4274 number.
4275
4276 2003-02-14 Bernhard Herzog <[email protected]>
4277
4278 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
4279 dragging flag is always set to 0 even when the tool implementation
4280 raises an exception
4281
4282 2003-02-11 Bernhard Herzog <[email protected]>
4283
4284 * Thuban/UI/application.py (ThubanApplication.splash_screen): New
4285 method to create a splash screen.
4286 (ThubanApplication.ShowMainWindow): New. Show the main window.
4287 Needed so the splash screen can display the mainwindow
4288 (ThubanApplication.OnInit): Call the
4289 new splash_screen method to determine whether the application
4290 should display a splash screen. If it displays a splash screen do
4291 not immediately show the main window.
4292
4293 2003-02-11 Jonathan Coles <[email protected]>
4294
4295 * Thuban/Model/classification.py: Added import line to fix
4296 feature conflicts between running on python2.2 and python2.1.
4297
4298 * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
4299 onto the clinfo parameter, so removed the deepcopy().
4300
4301 2003-02-10 Jonathan Coles <[email protected]>
4302
4303 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
4304 Added element_open variable to track opening and closing of tags
4305 so that tags that don't span more than one line are closed with
4306 /> instead of </tag_name>. Use the GetDefault*() methods of
4307 the Classification class.
4308
4309 * Thuban/Model/classification.py (Classificaton): Added set and
4310 get methods for the default data. The class also takes a layer
4311 reference so that modification messages can be sent. Fixed the
4312 methods to use the new ClassData class.
4313 (ClassData): New class to encapsulate the classification data
4314
4315 * Thuban/Model/layer.py (Layer): Remove the
4316 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
4317 SetDefault*() methods on the layer's classification object.
4318 (Layer.__init__): Use the new SetDefault*() methods in the
4319 Classification class.
4320
4321 * Thuban/Model/load.py (ProcessSession): Use the new ClassData
4322 object instead of a dictionary.
4323
4324 * Thuban/UI/classifier.py (ClassRenderer): New class to
4325 draw the classifications in the dialog box's table.
4326 (Classifier): Modified to use the ClassRenderer class.
4327
4328 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
4329 methods of the Classification class.
4330
4331 * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
4332 of the ClassData class.
4333
4334 * test/test_classification.py, test/test_layer.py,
4335 test/test_map.py, test/test_session.py: Fix the tests to work
4336 with the above code changes.
4337
4338 2003-02-03 Jonathan Coles <[email protected]>
4339
4340 * Thuban/Model/classification.py (Classification): Added getNull()
4341 to return the NullData reference
4342
4343 * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
4344 Layer.SetStrokeWidth): Modified these functions to change the
4345 null data in the classification rather than keep these values
4346 directly in the Layer class. Menu options to change these values
4347 work again.
4348
4349 2003-01-28 Jonathan Coles <[email protected]>
4350
4351 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
4352 Fixed crashing problem on some systems. Dialog box shows
4353 classification data.
4354
4355 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
4356 Colors in the tree view.
4357
4358 * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
4359 the tree info for classifications. Commented out unnecessary lines.
4360
4361 * Thuban/Model/classification.py (Classification.TreeInfo): New
4362 function to add information about the classification into the
4363 tree view.
4364
4365 2003-01-27 Jan-Oliver Wagner <[email protected]>
4366
4367 * Thuban/__init__.py (_): New.
4368
4369 * Thuban/Model/classification.py, Thuban/Model/extension.py,
4370 Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
4371 Thuban/Model/session.py, Thuban/UI/application.py,
4372 Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
4373 Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
4374 Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
4375 Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
4376 Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
4377
4378 2003-01-27 Jonathan Coles <[email protected]>
4379
4380 * Thuban/Model/layer.py: Classification initialization calls.
4381
4382 * Thuban/Model/classification.py: Created class to encapsulate
4383 a layer classification. Supports specific data points and
4384 ranges.
4385
4386 * Thuban/Model/load.py: Added support for loading classification
4387 information.
4388
4389 * Thuban/Model/save.py: Added support for saving classification
4390 information.
4391
4392 * Thuban/UI/classifier.py: Initial class for a dialog box for
4393 specifying classification information.
4394
4395 * Thuban/UI/mainwindows.py: Support for opening the classifier
4396 dialog.
4397
4398 * Thuban/UI/renderer.py: Support for drawing a layer with the
4399 classification information.
4400
4401 * Data/iceland_sample_class.thuban: iceland_sample with
4402 classification data.
4403
4404 * test/test_classification: Tests for the Classification class.
4405
4406 2002-12-09 Bernhard Herzog <[email protected]>
4407
4408 * test/test_command.py: New. Tests for the command classes.
4409
4410 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
4411 (Command.IsTool): New method to distinguish between command
4412 switching tools and other commands.
4413
4414 * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
4415 the tool to avoid direct assignments to instance variables
4416 (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
4417 (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
4418 change the tool
4419
4420 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
4421 active tool's command turns insensitive, disable the tool.
4422 (_tool_command): Use the new ToolCommand class
4423
4424 * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
4425 SelectTool method to change the tool
4426 (iconfile): Use the ToolCommand class
4427
4428 2002-12-03 Bernhard Herzog <[email protected]>
4429
4430 * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
4431 the case of selected items that are not children of Layers or Maps
4432 properly. Previously this bug would trigger an assertion in
4433 wxWindows.
4434
4435 2002-11-06 Frank Koormann <[email protected]>
4436
4437 * Thuban/UI/mainwindow.py: Altered the order of tools in the
4438 toolbar: First now are all navigation tools (Zoom In/Out, Pan,
4439 Full Extent).
4440
4441 2002-10-23 Bernhard Herzog <[email protected]>
4442
4443 * setup.py (setup call): version now 0.1.3
4444
4445 * MANIFEST.in: Add the files in test/
4446
4447 * test/README: Add note about tests requiring the iceland data
4448
4449 * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
4450 copyright notice.
4451
4452 2002-10-18 Bernhard Herzog <[email protected]>
4453
4454 * test/test_map.py
4455 (TestMapWithContents.test_projected_bounding_box): Use an explicit
4456 epsilon.
4457
4458 * test/support.py (FloatComparisonMixin.assertFloatEqual)
4459 (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
4460 message if the assertion fails and don't return the return value
4461 of self.assert_. In assertFloatSeqEqual the return meant that not
4462 all items of the sequence were compared.
4463
4464 2002-09-20 Bernhard Herzog <[email protected]>
4465
4466 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
4467
4468 * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
4469
4470 * test/test_map.py (TestMapWithContents.test_tree_info): Create
4471 the string with the bounding box on the fly because of platform
4472 differences in the way %g is handled.
4473
4474 * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
4475 DBFfile too because Thuban layers can't yet cope missing DBF
4476 files.
4477
4478 2002-09-20 Bernhard Herzog <[email protected]>
4479
4480 * test/test_menu.py: Use initthuban instead of
4481 add_thuban_dir_to_path to initialize Thuban.
4482
4483 * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
4484 Mixin class for float comparisons
4485 (SubscriberMixin): New. Mixin class to test messages sent through
4486 the Connector class
4487
4488 * test/README: Fix a typo and add the -v flag to the command for
4489 individual tests
4490
4491 * test/test_session.py: New. Test cases for Thuban.Model.session
4492
4493 * test/test_proj.py: New. Test cases for Thuban.Model.proj
4494
4495 * test/test_map.py: New. Test cases for Thuban.Model.map
4496
4497 * test/test_layer.py: New. Test cases for Thuban.Model.layer
4498
4499 * test/test_label.py: New. Test cases for Thuban.Model.label
4500
4501 * test/test_connector.py: New. Test cases for Thuban.Lib.connector
4502
4503 * test/test_color.py: New. Test cases for Thuban.Model.color
4504
4505 * test/test_base.py: New. Test cases for Thuban.Model.base
4506
4507 2002-09-13 Bernhard Herzog <[email protected]>
4508
4509 * Thuban/Model/session.py (Session.forwarded_channels): Forward
4510 the CHANGED channel too.
4511
4512 * Thuban/Model/map.py (Map.forwarded_channels): Forward the
4513 CHANGED channel too.
4514 (Map.__init__): Call the Modifiable constructor as well.
4515
4516 * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
4517 event if the modified flag changes.
4518 (Modifiable.changed): Tweak the doc-string.
4519
4520 * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
4521 (MainWindow.set_position_text): Put the code that puts the text
4522 with the mouse position into the status bar into the new method
4523 set_position_text so that it can overwritten in derived classes.
4524
4525 2002-09-12 Bernhard Herzog <[email protected]>
4526
4527 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
4528 message box on the main window.
4529
4530 2002-09-11 Bernhard Herzog <[email protected]>
4531
4532 * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
4533 the 'E' because it's less likely to interfere with other menu
4534 entries.
4535 (MainWindow.build_menu): remove an incorrect comment.
4536
4537 2002-09-10 Bernhard Herzog <[email protected]>
4538
4539 * Thuban/UI/mainwindow.py (MainWindow.Map): New.
4540 (_tool_command): Add sensitive parameter
4541 (_has_visible_map): Sensitivity callback to tools and other
4542 commands that require a visible map. Use it in map_zoom_in_tool,
4543 map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
4544 and map_full_extent
4545
4546 2002-09-06 Bernhard Herzog <[email protected]>
4547
4548 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
4549 VIEW_POSITION
4550
4551 2002-09-04 Frank Koormann <[email protected]>
4552
4553 * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
4554
4555 2002-09-02 Bernhard Herzog <[email protected]>
4556
4557 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
4558 wxWindows already and our implementation doesn't work correctly
4559 with wxGTK 2.3:
4560 (MapCanvas.__init__): Remove the instance variable
4561 (MapCanvas.OnPaint): Always call do_redraw when there's a map to
4562 be drawin
4563 (MapCanvas.OnIdle): Removed.
4564
4565 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
4566 a parameter to determine the size of the rectangle.
4567 (MapCanvas.find_shape_at): Create the box around the point on a
4568 layer by layer basis and make the size depend on the shape type.
4569 This solves a problem with the selection of point shapes at the
4570 border of the layer's bounding box
4571
4572 2002-08-30 Bernhard Herzog <[email protected]>
4573
4574 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
4575 for the sensitivity of remove layer.
4576 (_can_remove_layer): New. Sensitivity callback for remove layer
4577 (Command layer_remove): Use _can_remove_layer
4578
4579 * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
4580 determine whether a given layer can be deleted.
4581
4582 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
4583 (MapCanvas.do_redraw): Get rid of the unused update_region
4584 instance variable
4585
4586 * Thuban/UI/view.py: Add/update some doc-strings.
4587
4588 * test/: new subdirectory with a bunch of unit tests.
4589
4590 * test/README, test/test_table.py, test/test_save.py,
4591 test/test_menu.py, test/test_load.py: Initial set of tests and
4592 brief instructions on how to run them
4593
4594 2002-08-29 Bernhard Herzog <[email protected]>
4595
4596 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
4597 arcs with multiple parts.
4598
4599 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
4600 Handle degenrate rectangles.
4601
4602 * Thuban/Model/table.py: Make writing records work correctly:
4603 (Table.__init__): Keep track of whether the DBF is open for
4604 writing
4605 (Table.write_record): Open the DBF file for writing when necessary
4606
4607 2002-08-27 Bernhard Herzog <[email protected]>
4608
4609 * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
4610 dbf files only for reading by default. Use a new writable dbf
4611 object for writing.
4612
4613 2002-08-26 Bernhard Herzog <[email protected]>
4614
4615 * Thuban/UI/mainwindow.py: Refactor the context creation:
4616 (MainWindow.Context): New method to return a context
4617 (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
4618 new method
4619
4620 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
4621 layer table specific code from TableGrid into LayerTableGrid
4622 (TableFrame, LayerTableFrame): Split the layer table specific code
4623 from TableFrame into LayerTableFrame
4624 (LayerTableGrid.select_shape): Remove a debug print
4625
4626 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
4627 LayerTableFrame
4628
4629 2002-08-23 Bernhard Herzog <[email protected]>
4630
4631 * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
4632 absolute filename.
4633
4634 2002-08-22 Bernhard Herzog <[email protected]>
4635
4636 * Thuban/Model/table.py (Table.write_record): New method to write
4637 records.
4638 (Table.__init__): Open the DBF file for writing too.
4639
4640 * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
4641 into the underlying table.
4642
4643 * extensions/shapelib/shapefil.h (DBFCommit),
4644 extensions/shapelib/dbfopen.c (DBFCommit): New API function to
4645 commit any changes made to the DBF file.
4646
4647 * Thuban/UI/mainwindow.py (make_check_current_tool)
4648 (_tool_command): Put the code that generates the "checked"
4649 callback into a separate function so that we can reuse it
4650 elsewhere
4651
4652 * Thuban/Model/save.py (Saver): New class to handle serializing a
4653 session into an XML file. The main reason to introduce a class is
4654 that applications built on Thuban can derive from it so that they
4655 can save additional information in a session file.
4656 (save_session): Delegate almost all the work to the Saver class.
4657 Rename the filename argument to file because it may be a file like
4658 object now.
4659
4660 * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
4661 code. Remove the little test code which would be executed when the
4662 module is run as a script which didn't work anymore since it can't
4663 import the other Thuban modules.
4664 (ProcessSession, load_session): Refactor the ProcessSession to
4665 have one method for each element start and end tag so that derived
4666 classes can easily override the processing of individual tags.
4667 Also, always parse with namespaces enabled because applications
4668 built on top of Thuban will likely use namespaces if they extend
4669 the session file format.
4670
4671 2002-08-21 Bernhard Herzog <[email protected]>
4672
4673 * setup.py (ThubanInstall.run): Don't repr install_lib_orig
4674 because thubaninit_contents will do it for us.
4675
4676 2002-08-16 Jan-Oliver Wagner <[email protected]>
4677
4678 * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
4679 tree window already open
4680
4681 2002-08-15 Bernhard Herzog <[email protected]>
4682
4683 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
4684 with self.
4685
4686 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
4687 when we have actually captured it.
4688
4689 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
4690 shapefile and destroy the table.
4691
4692 * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
4693
4694 2002-08-14 Bernhard Herzog <[email protected]>
4695
4696 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
4697 instance variable columns
4698 (RecordTable.GetTypeName): row and col may be negative in some
4699 cases.
4700
4701 * setup.py (InstallLocal.initialize_options)
4702 (InstallLocal.finalize_options, InstallLocal.user_options): New
4703 option create-init-file to build a thubaninit.py when running
4704 install_local
4705 (InstallLocal.run): Create the thubaninit.py module when requested
4706 (thubaninit_contents): Split the template into several parts and
4707 create a new function thubaninit_contents that creates the
4708 contents of a thubaninit module.
4709 (ThubanInstall.run): Use the new function to create the thubaninit
4710 module.
4711
4712 2002-07-30 Bernhard Herzog <[email protected]>
4713
4714 * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
4715 cleanup.
4716 (ThubanApplication.MainLoop): Extend to automatically call OnExit.
4717
4718 * Thuban/Model/session.py (Session.Destroy): Don't bypass the
4719 direct base class' Destroy method.
4720
4721 * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
4722 layers.
4723 (Map.Destroy): Destroy the label_layer as well and call the
4724 inherited Desatroymethod first so that no more messages are
4725 issued.
4726 (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
4727 message if the stacking order actually has changed. Add
4728 doc-strings.
4729 (Map.BoundingBox): Correct the doc-string.
4730 (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
4731 (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
4732
4733 * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
4734 all labels.
4735
4736 2002-07-29 Bernhard Herzog <[email protected]>
4737
4738 * Thuban/Model/map.py (Map.subscribe_layer_channels)
4739 (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
4740 to a layer's channels into separate methods.
4741 (Map.RemoveLayer, Map.AddLayer): Call the new methods
4742 (Map.Destroy): Unsubscribe from a layer's channels before
4743 destroying it.
4744
4745 * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
4746 selected_layer parameter to searched_layer which is the layer to
4747 search in.
4748 (MapCanvas.SelectShapeAt): New parameter layer to restrict the
4749 search to that layer. Return the selected layer and shape.
4750
4751 * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
4752 typo
4753
4754 2002-07-24 Bernhard Herzog <[email protected]>
4755
4756 * Thuban/UI/application.py (ThubanApplication.create_session):
4757 Extend the doc string.
4758 (ThubanApplication.subscribe_session)
4759 (ThubanApplication.unsubscribe_session): New methods to
4760 subscribe/unsubscribe to/from session channels.
4761 (ThubanApplication.SetSession): Call the new methods here.
4762 (ThubanApplication.maps_changed, ThubanApplication.set_map):
4763 Renamed set_map to maps_changed. Its now a subscriber for
4764 MAPS_CHANGED.
4765
4766 * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
4767 x-coordinate in case of simple clicks
4768
4769 * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
4770 don't pass it as a parameter
4771
4772 * Thuban/Model/session.py (Session.RemoveMap): New
4773
4774 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
4775 window size into a parameter.
4776
4777 2002-07-23 Bernhard Herzog <[email protected]>
4778
4779 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
4780 just commands.
4781
4782 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
4783 parameter list a bit to allow setting the window title and the
4784 initial message in the status bar. Update the callers.
4785
4786 * Thuban/UI/application.py (ThubanApplication.OnInit)
4787 (ThubanApplication.CreateMainWindow): Put the mainwindow
4788 instantiation into a separate method so that it can be overridden
4789 by a subclass.
4790
4791 2002-07-19 Bernhard Herzog <[email protected]>
4792
4793 * Thuban/Model/session.py: Issue a CHANGED message every time
4794 another changed message is issued to make it easier to get
4795 notified of changes.
4796 (Session): Update the doc string
4797 (Session.forward): Issue changed-events as CHANGED as well.
4798 (Session.changed): Overwrite the inherited version to issue
4799 CHANGED events as well.
4800
4801 * Thuban/UI/tree.py: We can now simply subscribe to the session's
4802 CHANGED channel to be informed of changes.
4803 (SessionTreeCtrl.session_channels): Not needed any longer.
4804 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
4805 Only have to (un)subscribe CHANGED
4806
4807 * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
4808
4809 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
4810 for the wxPython locale bug to __init__.py so that it's
4811 automatically executed by anybody using UI code from Thuban.
4812
4813 2002-07-18 Bernhard Herzog <[email protected]>
4814
4815 * Thuban/UI/main.py (main): app no longer needs to be global
4816
4817 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
4818 as parameter and store it in an instance variable
4819 (MainWindow.invoke_command, MainWindow.update_command_ui)
4820 (MainWindow.save_modified_session, MainWindow.NewSession)
4821 (MainWindow.OpenSession, MainWindow.SaveSession)
4822 (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
4823 application object.
4824
4825 * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
4826 the main window with self.
4827
4828 * Thuban/UI/context.py: New module with the context class
4829
4830 * Thuban/UI/command.py (Command): Update doc string.
4831
4832 * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
4833 MainWindow.update_command_ui): Pass an instance of the context
4834 class to the command's methods
4835 (check_current_tool, call_method): Handle the new context
4836 implementation
4837
4838 * Examples/simple_extensions/simple_tool.py (simple_tool,
4839 check_simple_tool): Handle the new context implementation
4840
4841 * Examples/simple_extensions/simple_command.py (simple_command):
4842 Handle the new context implementation. Update the comments about
4843 the context.
4844
4845 * Thuban/UI/application.py (ThubanApplication.SetSession): Add
4846 doc-string
4847 (ThubanApplication.Session): New method to return the session
4848 object
4849
4850 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
4851 interactor's selected_layer may not be a layer of the current
4852 session when the tree is updated while a new session is being set.
4853
4854 2002-07-17 Bernhard Herzog <[email protected]>
4855
4856 * Thuban/UI/tree.py (color_string): Removed. No longer used.
4857 (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
4858 update_tree into update_tree and add_items. The tree now uses a
4859 more generic way to display the contents of the tree.
4860 (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
4861
4862 * Thuban/Model/layer.py (Layer.TreeInfo),
4863 Thuban/Model/extension.py (Extension.TreeInfo),
4864 Thuban/Model/map.py (Map.TreeInfo),
4865 Thuban/Model/session.py (Session.TreeInfo):
4866 Add TreeInfo methods to implement the new tree view update scheme
4867
4868 2002-07-16 Bernhard Herzog <[email protected]>
4869
4870 * Thuban/UI/application.py: Don't use "import from" for the
4871 MainWindow. It can't always be resolved.
4872 (ThubanApplication.OnInit): change reference to MainWindow
4873 accordingly.
4874
4875 * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
4876 completely
4877
4878 2002-07-10 Bernhard Herzog <[email protected]>
4879
4880 * setup.py (create_init_module): New configurable variable whose
4881 default depends on the platform we're running on.
4882 (ThubanInstall.initialize_options): Initialize
4883 self.create_init_module from the global create_init_module
4884 (ThubanInstall.user_options): indictate that the options
4885 create-init-module and init-module-dir have arguments.
4886
4887 * setup.py: In the setup call change the version number to include
4888 cvs.
4889
4890 * MANIFEST.in: Add the files in Examples
4891
4892 2002-07-09 Bernhard Herzog <[email protected]>
4893
4894 * setup.py: In the setup call, use the thuban homepage as the
4895 value of the url parameter.
4896
4897 * Examples: New subdirectory for examples.
4898
4899 * Examples/simple_extensions/simple_tool.xpm,
4900 Examples/simple_extensions/simple_tool.py,
4901 Examples/simple_extensions/simple_command.py,
4902 Examples/simple_extensions/README: Simple examples showing how to
4903 add new commands and tools.
4904
4905 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
4906 bdist_rpm that we also have an install script.
4907 (bdist_inno): Add 2002 to the copyright notice.
4908
4909 * setup.py: Create a file in python's site-packages directory to
4910 make installation of Thuban as a library easier.
4911 (ThubanInstall.user_options): Add two new options,
4912 create-init-module and init-module-dir
4913 (ThubanInstall.expand_with_pure_python_dirs): New method to expand
4914 filenames for installation in the default directories.
4915 (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
4916 the inherited methods to capture some filenames before they're
4917 transformed too much by distutils.
4918 (ThubanInstall.run): Create the init module if requested.
4919 (ThubanInstall.thuban_init_filename): New method to return the
4920 full name of the init module.
4921 (ThubanInstall.get_outputs): Append the filename of the init
4922 module.
4923
4924 2002-07-08 Bernhard Herzog <[email protected]>
4925
4926 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
4927 handle the prefix properly which means that the default for the
4928 installation prefix should be /usr for RPMs and /usr/local when
4929 doing a normal source install.
4930 (bdist_rpm_install_script): Script to override the default install
4931 commands in the specfile generated by the bdist_rpm command.
4932 (thuban_bdist_rpm.user_options): Add a prefix option
4933 (thuban_bdist_rpm.initialize_options): Init the prefix option.
4934 Create the script files for the spec files as empty files here
4935 (thuban_bdist_rpm._make_spec_file): Override the inherited method
4936 to fill the script files with content.
4937
4938 * Thuban/Model/save.py (relative_filename): Wrapper around
4939 Thuban.Lib.fileutil.relative_filename that accepts an empty dir
4940 argument. save_session now automatically uses this version,
4941 solving a problem when saving to a relative filename.
4942
4943 * setup.py: In the setup call, make sure that the library
4944 directories are under $prefix/lib not directly under $prefix.
4945
4946 2002-06-20 Jan-Oliver Wagner <[email protected]>
4947
4948 * Thuban/Model/extension.py: new module to handle extension objects.
4949 * Thuban/Model/messages.py: new messages for extensions.
4950 * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
4951 Session.AddExtension): new for handling extensions.
4952 Also some other minor changes to round up extension handling.
4953 * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
4954 of Extension titles and title and names of its objects.
4955
4956 2002-05-29 Bernhard Herzog <[email protected]>
4957
4958 * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
4959 the events for a command.
4960 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
4961 Call bind_command_events to bind the events. add_toolbar_command
4962 can now bind events too so that it's possible to have commands
4963 that are only available through the toolbar.
4964 (MainWindow.init_ids): New instance variable events_bound to keep
4965 track of for which commands events have been bound.
4966
4967 2002-05-28 Bernhard Herzog <[email protected]>
4968
4969 * Thuban/UI/menu.py: New module to build and manage menus.
4970
4971 * Thuban/UI/mainwindow.py: Remove some unused imports.
4972 (MainWindow.__init__, main_menu): move the definition of the main
4973 menu from __init__ to the Menu instance main_menu.
4974 (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
4975 build the menu bar and sub-menus from a menu description.
4976
4977 * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
4978 startup file
4979 (ThubanApplication.read_startup_files): New method to run
4980 ~/.thuban/thubanstart.py
4981
4982 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
4983 Move the toolbar definition to the Menu instance main_toolbar.
4984 (MainWindow.build_toolbar): New method to build the toolbar
4985 similar to the build_menu methods
4986
4987 2002-05-23 Bernhard Herzog <[email protected]>
4988
4989 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
4990 layer_outline_color. Fix it in the definition of the command too.
4991
4992 * Thuban/UI/command.py (Command): Fix typo in doc string
4993
4994 2002-05-22 Bernhard Herzog <[email protected]>
4995
4996 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
4997 in the docstring
4998
4999 2002-05-15 Bernhard Herzog <[email protected]>
5000
5001 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
5002 when the shapefile is empty.
5003 (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
5004 now return None for empty shapefiles. Update doc-strings.
5005
5006 * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
5007 the layer's bbox being None.
5008
5009 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
5010 layer's bbox being None.
5011
5012 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
5013 necessary.
5014 (MapCanvas.__init__): New instance variables, last_selected_layer
5015 and last_selected_shape to determine how the selection has
5016 changed.
5017
5018 * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
5019 AutoSizeColumns because it will cause a traversal of the entire
5020 table which for large .dbf files will take a very long time.
5021
5022 2002-05-14 Bernhard Herzog <[email protected]>
5023
5024 * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
5025 maximum depth for the tree than shapelib does by default.
5026
5027 2002-05-10 Bernhard Herzog <[email protected]>
5028
5029 * setup.py (py_modules): The shptree modules doesn't have a
5030 wrapper, so don't include it in the py_modules
5031
5032 2002-05-08 Bernhard Herzog <[email protected]>
5033
5034 * extensions/shapelib/shptree.c (compare_ints): Make arguments
5035 const void * as in the qsort prototype
5036 (SHPTreeFindLikelyShapes): Remove some unused variables.
5037
5038 * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
5039 maintains to redraw the window during a drag.
5040 (MapCanvas.unprojected_rect_around_point): New method to determine
5041 a small region around a point for hit-testing.
5042 (MapCanvas.find_shape_at): Only test the shapes in a small region
5043 around the point.
5044
5045 * setup.py: Increment the version to 0.1.2
5046
5047 * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
5048 debug print and set session to None after unsubscribing
5049
5050 2002-05-07 Bernhard Herzog <[email protected]>
5051
5052 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
5053 the file to have a .thuban extension.
5054
5055 * Thuban/UI/tree.py (session_channels): New class constant with
5056 all the session channels to subscribe to to update the tree
5057 (SessionTreeCtrl.session_changed): Remember the session so that we
5058 can unsubscribe properly. Use the new class constant to
5059 unsubscribe from the old session and subscribe to the new one.
5060 (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
5061 subscriptions of the SessionTreeCtrl.
5062 (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
5063
5064 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
5065 Session Tree" command to the file menu.
5066
5067 * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
5068 as update_region to the renderer.
5069
5070 * Thuban/UI/renderer.py
5071 (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
5072 update box is now directly a tuple, not a wxRect anymore.
5073
5074 * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
5075 prints.
5076
5077 2002-05-07 Bernhard Herzog <[email protected]>
5078
5079 * setup.py: Add the shptree extension module. See
5080 extensions/pyshapelib/ChangeLog for more details.
5081
5082 * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
5083 extensions/shapelib/dbfopen.c: Really update to the versions of
5084 shapelib 1.2.9. For some reason it wasn't really done on
5085 2002-04-11.
5086
5087 * extensions/shapelib/shptree.c: Modified version of shptree.c of
5088 shapelib 1.2.9. The only real difference is the use of qsort
5089 instead of a bubble sort implementation
5090
5091 * Thuban/Model/layer.py (Layer.__init__): New instance variable
5092 shapetree to hold the shapelib quadtree for the shapefile
5093 (Layer.open_shapefile): Create the quad tree.
5094 (Layer.ShapesInRegion): New method to return the ids of shapes in
5095 a given region using the quad tree.
5096
5097 * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
5098 comment
5099 (draw_polygon_shape): Accept both arcs and polygons.
5100 (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
5101 the api.
5102
5103 * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
5104 return the shape ids to be rendered in a given layer.
5105 (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
5106 ids. Use draw_polygon_shape to draw arc shapes as well.
5107 (ScreenRenderer.RenderMap): New parameter for the rectangle that
5108 has to be updated
5109 (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
5110 calling it's ShapesInRegion method.
5111
5112 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
5113 update_region for the update region.
5114 (MapCanvas.OnPaint): Maintain the update region
5115 (MapCanvas.do_redraw): Pass the bounding box of the update_region
5116 to the renderer when drawing the bitmap. Reset the update_region.
5117
5118 2002-05-03 Bernhard Herzog <[email protected]>
5119
5120 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
5121 MainWindow.OpenSession): Change the file extension of the session
5122 files to .thuban
5123
5124 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
5125 Move the map channels to be forwarded by the session into the
5126 class constant with forwarded_channels. Also add
5127 LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
5128 forwarded_channels
5129
5130 * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
5131 typo and some rewording).
5132
5133 2002-05-02 Bernhard Herzog <[email protected]>
5134
5135 * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
5136 around to speed up most redraws:
5137 (MapCanvas.__init__): New instance variable bitmap which holds the
5138 bitmap
5139 (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
5140 self.bitmap to draw.
5141 (MapCanvas.full_redraw): New method to force a full redraw
5142 including the bitmap
5143 (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
5144 make sure the bitmap is redrawn.
5145 (MapCanvas.projection_changed, MapCanvas.set_view_transform,
5146 MapCanvas.shape_selected): Call full_redraw instead of readraw to
5147 make sure the bitmap is redrawn.
5148 (MapCanvas.OnSize): New method to handle size events so that the
5149 bitmap can be redrawn.
5150
5151 2002-04-29 Bernhard Herzog <[email protected]>
5152
5153 * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
5154 canvas' VIEW_POSITION event
5155 (MainWindow.view_position_changed): Handler for VIEW_POSITION.
5156 Update the text in the status-bar accordingly.
5157
5158 * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
5159 (MapCanvas.__del__): Implement because Publisher.__del__ has to be
5160 called.
5161 (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
5162 current_position
5163 (MapCanvas.set_current_position): New method to set
5164 current_position. Issue a VIEW_POSITION event
5165 (MapCanvas.CurrentPosition): New public method to return the value
5166 of current_position. Should be called when the VIEW_POSITION event
5167 is processed.
5168 (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
5169 Update the position.
5170 (MapCanvas.OnLeaveWindow): Set the position to None.
5171
5172 * Thuban/UI/messages.py (VIEW_POSITION): New message for the
5173 position in the statusbar
5174
5175 2002-04-26 Frank Koormann <[email protected]>
5176
5177 * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
5178
5179 2002-04-24 Frank Koormann <[email protected]>
5180
5181 * Resources/Bitmaps/identify.xpm: shadow added
5182
5183 * Resources/Bitmaps/fullextent.xpm: new
5184
5185 2002-04-22 Jan-Oliver Wagner <[email protected]>
5186
5187 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
5188 box
5189
5190 2002-04-21 Jan-Oliver Wagner <[email protected]>
5191
5192 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
5193
5194 * Thuban/UI/tree.py (update_tree): added added map extent
5195
5196 * Thuban/UI/mainwindow.py (_method_command): extended by parameter
5197 icon; added map_full_extend as tool
5198
5199 2002-04-19 Jan-Oliver Wagner <[email protected]>
5200
5201 * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
5202 saving _new_ sessions
5203
5204 * Thuban/Model/session.py (create_empty_session): new session
5205 don't have a filename (set to None)
5206
5207 * Thuban/UI/tree.py (update_tree): added filename and modified flag
5208
5209 * Thuban/Model/load.py (ProcessSession): convert projection
5210 parameters from unicode to regular string
5211
5212 * Data/iceland_sample.session: Added UTM Zone 26 projection.
5213
5214 2002-04-11 Bernhard Herzog <[email protected]>
5215
5216 * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
5217 extensions/shapelib/dbfopen.c: Update to the versions of shapelib
5218 1.2.9
5219
5220 * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
5221 the pyshapelib directoy into the list of include dirs, so that
5222 pyshapelib_api.h can be found.
5223
5224 * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
5225 holds the pyshapelib C-API
5226 (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
5227 pyshapelib_api to access the shapelib functions.
5228 (initwxproj): Import the c_api from the shapelib module and
5229 initialize pyshapelib_api.
5230
5231 2002-04-04 Bernhard Herzog <[email protected]>
5232
5233 * setup.py (thuban_bdist_rpm.initialize_options): Use
5234 initialize_options to create the scripts for the rpm.
5235
5236 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
5237
5238 2002-04-03 Bernhard Herzog <[email protected]>
5239
5240 * setup.py: Increment version to 0.1.1
5241
5242 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
5243 Layer" and "Remove Layer" commands from the layer menu to the map
5244 menu
5245
5246 2002-02-15 Bernhard Herzog <[email protected]>
5247
5248 * Thuban/Model/layer.py (Layer.Shape): list append only takes one
5249 argument (python <= 1.5.2 erroneously accepted multiuple
5250 arguments)
5251
5252 2002-02-04 Bernhard Herzog <[email protected]>
5253
5254 * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
5255 RecordGrid in the identifyview.
5256 (IdentifyView.__init__): Use IdentifyGridCtrl instead of
5257 IdentifyListCtrl. The grid allows editing of the values.
5258
5259 * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
5260 implementing a grid for a single row of a thuban table.
5261
5262 * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
5263 layers by default. Easier to use than the previous default of only
5264 searching through the select layer which meant that if no layer
5265 was selected, you couldn't select a shape.
5266
5267 * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
5268
5269 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
5270 stroke_width attribute
5271
5272 * Thuban/Model/save.py (save_session): Write the new stroke_width
5273 attribute
5274
5275 * Thuban/Model/load.py (ProcessSession.startElement): Read the
5276 stroke_width attribute
5277
5278 * Thuban/Model/layer.py (Layer.__init__): New parameter and
5279 instance variable stroke_width
5280 (Layer.SetStrokeWidth): Set the stroke_width.
5281
5282 2002-02-01 Bernhard Herzog <[email protected]>
5283
5284 * extensions/thuban/wxproj.cpp (project_points): Fix two
5285 off-by-one errors in the last loop that joins the various parts
5286 together.
5287
5288 2002-01-14 Bernhard Herzog <[email protected]>
5289
5290 * setup.py (data_dist.make_distribution): Fix some typos
5291
5292 2001-09-18 Bernhard Herzog <[email protected]>
5293
5294 * README: Slight tweaking in preparation for the 0.1 release
5295
5296 * setup.cfg: Add section for sdist to create both tgz and zip
5297 archives
5298
5299 * setup.py: increase version number to 0.1
5300 (data_dist): New command class for data distribution
5301
5302 2001-09-14 Bernhard Herzog <[email protected]>
5303
5304 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
5305 Handle the case of no layer (i.e. layer is None) properly.
5306
5307 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
5308 Set the initial selection of the combo boxes to reflect the
5309 projection we're starting with in a way that works on windows,
5310 too.
5311
5312 * Thuban/Lib/connector.py (Connector.print_connections): Print the
5313 puiblisher's ids in hex to make it easier to compare them to the
5314 standard repr of python methods
5315
5316 * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
5317 messages
5318
5319 2001-09-13 Bernhard Herzog <[email protected]>
5320
5321 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
5322 deselect the layer if no layer is selected
5323
5324 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
5325 idle time when there actually is something to draw. If there's
5326 nothing to draw simply clear the window
5327 (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
5328 (MapCanvas.SetMap): force a redraw in all cases because
5329 FitMapToWindow doesn't always do it.
5330 (MapCanvas.ZoomFactor): Add an optional parameter, center, to
5331 specify the point to move into the center of the window
5332 (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
5333 dragged, zoon in/out by a factor of 2
5334 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
5335 index, i.e. reversed drawing order) so that objects appearing to
5336 be in from of others are selected first. This is probably mostly
5337 relevant for point shapes where the symbols used may overlap
5338
5339 * Thuban/Model/session.py (create_empty_session): Unset the
5340 modified bit before returning it
5341
5342 * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
5343 create_empty_session session to create the new, empty session.
5344
5345 * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
5346 the tool bitmaps.
5347 (MainWindow.OnClose, MainWindow.save_modified_session): Separate
5348 the code that asks whether the session should be saved into the
5349 new method save_modified_session.
5350 (MainWindow.OpenSession, MainWindow.NewSession): Use the new
5351 method to save modified session here too.
5352
5353 2001-09-11 Bernhard Herzog <[email protected]>
5354
5355 * setup.py (InnoIconItem): fix typo
5356
5357 (thuban_bdist_inno.run):
5358 (bdist_inno.run): Move the decision not to create symlinks on
5359 non-nt platforms to thuban_bdist_inno and do it unconditinally
5360 since we never want to create the symlinks here
5361
5362 2001-09-10 Bernhard Herzog <[email protected]>
5363
5364 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
5365 identify view immediately
5366
5367 * Thuban/UI/controls.py: New file with two classes RecordListCtrl
5368 and SelectableRecordListCtrl that implement the code shared by the
5369 identify view and the label dialog
5370
5371 * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
5372 new class RecordListCtrl
5373
5374 * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
5375 return value of GetValue is None instead of using it as a boolean
5376 directly so that Zero numbers are handled properly.
5377 (LabelListCtrl): Derive from the new class
5378 SelectableRecordListCtrl
5379
5380 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
5381 (Proj4Dialog.dialogLayout): Make the window resizable and set the
5382 size of the text control explicitly to make the sizers work on
5383 both Windows and X.
5384
5385 2001-09-07 Bernhard Herzog <[email protected]>
5386
5387 * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
5388 that can limit the search to the currently selected layer.
5389 (MapCanvas.SelectShapeAt): Make sure that the currently selected
5390 layer stays selected even when no shape is found
5391 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
5392 height do nothing (avoids zero division errors)
5393
5394 2001-09-06 Bernhard Herzog <[email protected]>
5395
5396 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
5397 Correct the spelling of SessionTreeCtrl. dabbrev is too damn
5398 convenient :-)
5399 (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
5400 a new instvar layer_to_item to map layers to tree items
5401 (SessionTreeCtrl.layer_selected): Select the appropriate tree item
5402 to match the current selection in the interactor
5403
5404 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
5405 (Interactor.HasSelectedLayer): New methods to query the current
5406 selection
5407
5408 * Thuban/UI/mainwindow.py (MainWindow.current_layer):
5409 (MainWindow.has_selected_layer): Simply call the appropriate
5410 interactor method
5411
5412 * Thuban/UI/mainwindow.py (MainWindow.__init__):
5413 (MainWindow.LayerShowTable):
5414 (MainWindow.identify_view_on_demand): Store the interactor in an
5415 instvar and use that reference instead of going through main.app
5416
5417 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
5418 * Thuban/UI/application.py (ThubanApplication.OnInit):
5419 * Thuban/UI/main.py (main): Create the session tree view in main
5420 with the new mainwindow method ShowSessionTree and not directly
5421 the application's OnInit method
5422
5423 * Thuban/UI/tree.py (myTreeCtrlPanel):
5424 (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
5425 TreeCtrl isntead of a panel. This affects most method since we now
5426 refer to self instead of self.tree
5427 (SessionTreeView): New class implementing a non-modal dialog
5428 showing the session tree.
5429
5430 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
5431 layer to the tableview dialog.
5432
5433 * Thuban/UI/tableview.py: Add some doc-strings
5434 (TableGrid):
5435 (TableGrid.OnRangeSelect):
5436 (TableGrid.OnSelectCell):
5437 (TableFrame.__init__):
5438 (TableFrame.row_selected):
5439 Selecting rows in the grid view now updates the selected shapes
5440 through the TableFrame. To achieve this we derive TableGrid from
5441 Publisher and introduce the message type ROW_SELECTED which the
5442 TableFrame subscribes to and which is issued by OnRangeSelect and
5443 OnSelectCell
5444
5445 (DataTable.SelectRow): Removed because it's no longer needed in
5446 the row/shape selection scheme
5447
5448 * Thuban/UI/dialogs.py: New file implementing common classes for
5449 dialogs
5450
5451 * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
5452 the SELECTED_SHAPE message anymore. This is now handled by the
5453 parent.
5454 (TableGrid.select_shape): Only update the selection if the shape
5455 is not None.
5456 (TableFrame): Inherit from the new NonModalDialog class.
5457 (TableFrame.__init__, TableFrame.select_shape): Handle the
5458 SELECT_SHAPE message.
5459 (TableFrame.OnClose): Extend the inherited method to unsubscribe
5460 SELECT_SHAPE
5461
5462 * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
5463 (MainWindow.add_dialog):
5464 (MainWindow.dialog_open):
5465 (MainWindow.remove_dialog):
5466 (MainWindow.get_open_dialog): New methods to maintain a dictionary
5467 of opened non-modal dialogs.
5468
5469 (MainWindow.__init__): Initialize the new non-modal dictionary
5470 management code
5471 (MainWindow.LayerShowTable): maintain separate dialogs for each
5472 table using the non-modal dialog management code to only open a
5473 view once for each table.
5474
5475 (MainWindow.IdentifyTool):
5476 (MainWindow.__init__):
5477 (MainWindow.identify_view_on_demand): Don't open the identify view
5478 in IdentifyTool anymore. This will be done automatically by the
5479 new method identify_view_on_demand which handles the
5480 SELECTED_SHAPE message so that the identify view will be opened on
5481 demand
5482
5483 * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
5484 the interactor argument. The SELECTED_SHAPE message is now handled
5485 by the parent.
5486 (IdentifyView.__init__): Add the interactor argument so that we
5487 can handle the SELECTED_SHAPE message here
5488 (IdentifyView.selected_shape): New method to handle the
5489 SELECTED_SHAPE messages
5490
5491 * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
5492 NonModalDialog class
5493 (IdentifyView.OnClose): Extend the inherited version to
5494 unsubscribe SELECT_SHAPE
5495
5496 * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
5497
5498 2001-09-05 Bernhard Herzog <[email protected]>
5499
5500 * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
5501
5502 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
5503 interactor to pass through to the MapCanvas
5504
5505 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
5506 argument to the MainWindow constructor to get rid of the ugly hack
5507 that made main.app available early just so that the mapcanvas
5508 could access the interactor object.
5509
5510 2001-09-04 Bernhard Herzog <[email protected]>
5511
5512 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
5513 that runs a modal message box
5514 (MainWindow.OnClose): Use the new method
5515 (MainWindow.RemoveLayer): Just do nothing in case no layer is
5516 selected. The command should be grayed out anyway, so there's no
5517 need to pop up a message box.
5518 (MainWindow.AddLayer): Pop up a message box with an error message
5519 if the shape file can't be opened
5520
5521 * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
5522 immediately. This will cause an exception in case the file can't
5523 be opened and we can display an appropriate message.
5524
5525 * MANIFEST.in: Add extensions/pyprojection/LICENSE
5526
5527 * setup.py (thuban_bdist_rpm): New class implementing a Thuban
5528 specific bdist_rpm command.
5529
5530 * Thuban/UI/main.py: Catch ImportError exceptions when importing
5531 the locale module because it may not be available on some
5532 installations.
5533
5534 * extensions/pyprojection/LICENSE: Copy of the license text in
5535 Projection.i. Having it in a separate file makes it easier to
5536 refer to license text in e.g. RPMs
5537
5538 2001-09-03 Bernhard Herzog <[email protected]>
5539
5540 * setup.py: use wx-config instead of wxgtk-config because it's
5541 more generic
5542
5543 * setup.py (ThubanInstall.get_outputs): Add the symlink in
5544 <prefix>/bin to the outputs
5545 (ThubanInstall.link_file): New method to link files. We need this
5546 because the standard copy_files refuses to link non-existing
5547 files.
5548 (ThubanInstall.run): Remove the leading install root from the
5549 script filename if an install root was specified and use the new
5550 link_file method
5551
5552 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
5553 the window when the first layer is added to the map.
5554
5555 * setup.py (ThubanInstall.run): Honor the build root (self.root)
5556 when linking thuban.py to <prefix>/bin
5557
5558 2001-08-31 Bernhard Herzog <[email protected]>
5559
5560 * setup.py: In the setup call, the install parameters shouldn't
5561 have trailing slashes because distutils on non-posix platforms
5562 doesn't like that. The same applies to other directories like
5563 "Resources/Bitmaps"
5564
5565 In the configuration section for nt, move the wxWindows directory
5566 optins into the part clearly marked as editable.
5567
5568 (InstallLocal.initialize_options):
5569 (InstallLocal.user_options): remove the currently unused debug
5570 flag
5571 (thuban_build_py.find_all_modules): Add this method so that it
5572 works for our case of having packages and modules in one
5573 distribution as well.
5574 (ThubanInstall.initialize_options):
5575 (ThubanInstall.finalize_options):
5576 (ThubanInstall.user_options):
5577 (ThubanInstall.boolean_options): Add new options, do-symlink and
5578 extra files. Since these are the first ThubanInstall specific
5579 options, override user_options and boolean_options
5580 (ThubanInstall.run): Honor the new do-symlink and extra-files
5581 options.
5582 (ThubanInstall.get_outputs): Add to override the base-class's
5583 version and add the extra-files to the outputs
5584 (bdist_inno): New class for windows distributions with Inno Setup
5585 (InnoIconItem): Helper class for bdist_inno
5586 (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
5587 this together with the appropriate parameters, to the setup call.
5588
5589 * setup.cfg (bdist_inno): added new section for the inno setup
5590 installer
5591
5592 * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
5593 changing_selection to avoid recursive selection events when
5594 modifying the selection in response to a selection event.
5595 (myTreeCtrlPanel.normalize_selection): Set the new inst var when
5596 changing the tree's selection.
5597 (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
5598 we're not being called indirectly from normalize_selection.
5599
5600 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
5601 event.Check only if the command is actuall checkable.
5602 (MainWindow.__init__): Call the toolbar's Realize method to make
5603 sure that the items are actually shown
5604
5605 2001-08-28 Bernhard Herzog <[email protected]>
5606
5607 * setup.py: Fix some doc strings
5608
5609 * ChangeLog: started
5610

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26