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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1382 - (show annotations)
Tue Jul 8 16:37:57 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 217627 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26