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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1358 - (hide annotations)
Wed Jul 2 09:38:36 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 212997 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26