/[thuban]/branches/greater-ms3/thuban/ChangeLog
ViewVC logotype

Annotation of /branches/greater-ms3/thuban/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 997 - (hide annotations)
Thu May 22 18:21:23 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 151388 byte(s)
update ChangeLog

1 bh 995 2003-05-22 Bernhard Herzog <[email protected]>
2    
3 bh 997 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
4     Provide a better way to destroy the layers
5     (TestLayer.test_base_layer, TestLayer.test_arc_layer)
6     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
7     (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
8     the new way to destroy the layers.
9     (TestLayer.test_derived_store): New. Test for using a layer with a
10     DerivedShapeStore
11    
12     * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
13     filename if the shape store actually has one.
14    
15     2003-05-22 Bernhard Herzog <[email protected]>
16    
17 bh 995 * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
18     for the filename
19    
20     * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
21     for the FileName method
22     (TestDBFTableWriting.test_write): Fix spelling of filename
23    
24 tkoester 993 2003-05-22 Thomas Koester <[email protected]>
25    
26     * Thuban/Model/range.py, test/test_range.py: Brought over new Range
27     from SciParam that now really is immutable.
28    
29 frank 992 2003-05-22 Frank Koormann <[email protected]>
30    
31     Layer Top/Bottom placement added to legend.
32    
33     * Thuban/UI/legend.py
34     (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
35     bound to tool events.
36     (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
37     New, methods binding the event methods with the map methods.
38    
39     * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
40     layer at top/bottom of layer stack.
41    
42     * Resources/Bitmaps/top_layer.xpm: New button icon.
43    
44     * Resources/Bitmaps/bottom_layer.xpm: New button icon.
45    
46 bh 988 2003-05-22 Bernhard Herzog <[email protected]>
47    
48     * Thuban/Model/session.py (Session.RemoveTable): New method to
49     remove tables
50    
51     * test/test_session.py (TestSessionSimple.test_remove_table): New.
52     Test for RemoveTable
53    
54 tkoester 986 2003-05-22 Thomas Koester <[email protected]>
55    
56     * Thuban/Model/classgen.py: Added short module doc string and CVS id.
57     (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
58    
59 bh 983 2003-05-22 Bernhard Herzog <[email protected]>
60    
61 bh 985 Implement a way to discover dependencies between tables and
62     shapestores.
63    
64     * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
65     (TransientJoinedTable.Dependencies)
66     (AutoTransientTable.SimpleQuery): New. Implement the dependencies
67     interface
68     (TransientJoinedTable.__init__): Keep tack of the original table
69     objects in addition to the corresponding transient tables.
70    
71     * Thuban/Model/table.py (DBFTable.Dependencies)
72     (MemoryTable.Dependencies): New. Implement the dependencies
73     interface
74    
75     * Thuban/Model/data.py (ShapeTable): New. Helper class for
76     ShapefileStore
77     (ShapefileStore.__init__): Use ShapeTable instead of
78     AutoTransientTable
79     (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
80     (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
81     methods for filename and type
82     (ShapefileStore.Dependencies): New. Implement the dependencies
83     interface
84     (DerivedShapeStore): New class to replace SimpleStore. The main
85     difference to SimpleStore is that it depends not on a shapefile
86     but another shapestore which expresses the dependencies a bit
87     better
88     (SimpleStore.__init__): Add deprecation warning.
89    
90     * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
91     Test for the Dependencies method.
92    
93     * test/test_memory_table.py (TestMemoryTable.test_dependencies):
94     New. Test for the Dependencies method.
95    
96     * test/test_transientdb.py
97     (TestTransientTable.test_auto_transient_table_dependencies): New.
98     Test for the Dependencies method.
99     (TestTransientTable.test_transient_joined_table): Add test for the
100     Dependencies method.
101    
102     * test/test_session.py (TestSessionSimple.setUp)
103     (TestSessionSimple.tearDown): New. Implement a better way to
104     destroy the sessions.
105     (TestSessionSimple.test_initial_state)
106     (TestSessionSimple.test_add_table): Bind session to self.session
107     so that it's destroyed by tearDown
108     (TestSessionSimple.test_open_shapefile): New. Test for
109     OpenShapefile and the object it returns
110    
111     2003-05-22 Bernhard Herzog <[email protected]>
112    
113 bh 983 * Thuban/Model/session.py (Session.AddTable): New method to
114     register tables with the session.
115     (Session.Tables): Return the tables registered with AddTable too.
116    
117     * test/test_session.py (TestSessionSimple.test_add_table): New.
118     Test case for the AddTable method
119    
120 frank 981 2003-05-22 Frank Koormann <[email protected]>
121    
122     UI polishing updates: Place main buttons (OK, Cancel, etc) in the
123     lower right corner, center labels for selections, initialize controls
124     in reasonable order for keyboard navigation.
125    
126     * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
127     (ProjFrame.__DoOnProjAvail): Determine position of current projection
128     using the wxListBox.FindString() method. Still a problem (#1886)
129    
130     * Thuban/UI/classifier.py
131     (Classifier.__init__, SelectPropertiesDialog.__init__)
132    
133     * Thuban/UI/classgen.py (ClassGenDialog.__init__,
134     (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
135     different classification types from here to __init__.
136     (GenUniquePanel.__init__): Set the column width of the first field
137     in the Field ListCtrl to the full width.
138    
139     * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
140     Button to 'Export'. Center Buttons in Selection Box, set Focus to
141     Grid.
142     (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
143     changes focus to the Selection when pressing "Alt-S".
144    
145     * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
146     the text if not visible. The italic font sometimes exceeds the
147     rendering area.
148    
149 jonathan 972 2003-05-21 Jonathan Coles <[email protected]>
150 jonathan 971
151 jonathan 975 * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
152     to OnClose so that Thuban closes correctly.
153    
154     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
155     DockFrame.OnClose, not DockFrame._OnClose.
156    
157     2003-05-21 Jonathan Coles <[email protected]>
158    
159 jonathan 971 * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
160     references to 'inf' and use new Range __init__ to pass floats
161     directly rather than converting them to strings first.
162     Fixes RTBug #1876.
163    
164     * Thuban/Model/classification.py (ClassGroupRange.SetRange):
165     Use new Range ___init__ to pass floats.
166    
167     * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
168     filename is a valid image file. Throw IOError otherwise.
169    
170     * Thuban/Model/range.py: Brought over new Range from SciParam that
171     is immutable and has an __init__ which can accept floats.
172    
173     * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
174     into try block. AddLayer doesn't throw any exceptions anymore.
175     (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
176     try block.
177    
178     * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
179     the first item in choices. Fixes RTBug #1882.
180    
181     * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
182     has gone to 0 which is a serious problem. abort.
183     (MapRenderer.draw_raster_layer): Catch IOError seperately and
184     print the error from GDAL.
185    
186     * Thuban/UI/tableview.py (TableGrid.__init__): Call
187     ToggleEventListeners to turn on listening.
188     (TableGrid.ToggleEventListeners): New. Turns event listening on
189     and off so as to prevent excessive messages.
190     (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
191     to suppress excessive messages when selecting many rows.
192     Fixes RTBug #1880.
193    
194     * Thuban/UI/view.py: Added checks against if scale == 0. This
195     is a serious problem that can occur when an image without
196     geo data is loading and causes the map projection bounds to
197     go to infinity. Right now, the solution is to simply try
198     to recover.
199    
200     * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
201     to set the MFILEReceiver attributes even if the data is NULL.
202    
203     * extensions/thuban/gdalwarp.cpp: Improved the error handling
204     and passed GDAL messages back up to the Python layer. Also
205     tried to fix some memory leaks that were present in the original
206     utility but didn't matter because the program aborted.
207    
208     * test/test_range.py: Copied over tests from SciParam. Removed
209     tests against importing. Fixes RTBug #1867.
210    
211 bh 958 2003-05-21 Bernhard Herzog <[email protected]>
212    
213     * test/test_load.py: Remove unused imports and restructure the
214     test code
215     (LoadSessionTest): Split into one class for each test and turn
216     LoadSessionTest itself into the base class for all such session
217     tests.
218     (ClassificationTest): New base class for load tests that test
219     classifications
220     (TestSingleLayer, TestLayerVisibility, TestClassification)
221     (TestLabels, TestLayerProjection, TestRasterLayer): New classes
222     for the individual tests
223    
224     * test/support.py (FileLoadTestCase.filename): New base class for
225     file loading tests
226    
227 jan 955 2003-05-21 Jan-Oliver Wagner <[email protected]>
228    
229     * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
230     Mercator' to 'UTM Zone 32' as a more convenient example.
231     Added 'Gauss Krueger Zone 6'.
232    
233     * Data/iceland_sample_raster.thuban: political polygon now
234     filled transparent to have the raster image visible at once.
235    
236 frank 952 2003-05-21 Frank Koormann <[email protected]>
237    
238     * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
239     OnClose() to keep in sync with extensions. Internally Thuban
240     still uses "underscored" names.
241    
242 jonathan 949 2003-05-20 Jonathan Coles <[email protected]>
243    
244     This puts back Raster layer support. These layers support projections
245     through the GDAL library. Currently, the CVS version is being used.
246     There are no Debian packages available although this may change soon.
247     A GDAL driver was extended to support writing to memory rather to
248     files.
249    
250     There is still some work that needs to be done, such as some error
251     handling when loading invalid images or when there is a problem
252     projecting the image. This putback simply checks in the majority
253     of the work.
254    
255     * setup.py: Add gdalwarp library extension.
256    
257     * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
258     Defaults to False, but can be overridden by subclasses if they
259     support classification.
260     (RasterLayer): New. Defines a new layer that represents an
261     image.
262    
263     * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
264     tag handler.
265     (SessionLoader.start_layer): Encode the filename.
266     (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
267     New. Supports reading a rasterlayer tag.
268    
269     * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
270    
271     * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
272     get a string in Latin1. If we get such as string convert it to
273     unicode first, otherwise leave if alone before encoding.
274     (SessionSaver.write_layer): Add support for writing both Layers
275     and RasterLayers.
276    
277     * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
278     The right argument may not be a string, it could also be a Column.
279    
280     * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
281     Make initial window size 600x400. Fixes RTBug #1872.
282    
283     * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
284     the dialog is constructed so that we can support layers that
285     do not have classifications.
286     (Classifier._OnTry): Only build a classification if the layer
287     supports one.
288    
289     * Thuban/UI/legend.py: Change all checks that a layer is an
290     instance of Layer into checks against BaseLayer.
291     (LegendTree.__FillTreeLayer): Only add children to a branch if
292     the layer supports classification.
293    
294     * Thuban/UI/mainwindow.py (MainWindow.NewSession,
295     MainWindow.OpenSession): Don't proceed with an action if the
296     user chooses Cancel when they are asked to save changes.
297     (MainWindow.AddRasterLayer): New. Open a dialog to allow the
298     user to select an image file. Create a new RasterLayer and add
299     it to the map.
300    
301     * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
302     for rendering RasterLayer layers.
303     (MapRenderer.draw_raster_layer): Actually method that calls
304     the GDALWarp python wrapper and constructs an image from the
305     data returned.
306    
307     * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
308     Choices symbols to match those used in the table query method.
309     Replace deprecated method calls on table with new method names.
310    
311     * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
312     how small the scale can get. This still needs more testing.
313    
314     * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
315     Provides a driver to output in .bmp format.
316    
317     * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
318     New. Provides IO routines which write to memory, rather than a file.
319    
320     * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
321     of the gdalwarp utility provided in GDAL. Added function calls
322     that can be accessed from python.
323    
324     * Data/iceland_sample_raster.thuban: New. Sample file that uses
325     a raster layer.
326    
327     * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
328     layer image data.
329    
330     * Doc/thuban.dtd: Added rasterlayer attribute definition.
331    
332     * test/test_layer.py, test/test_load.py, test/test_save.py: Added
333     tests associated with the raster layer code.
334    
335     * test/test_transientdb.py
336     (TestTransientTable.test_auto_transient_table_query): Added a test
337     for using a Column object as the "right" parameter to a query.
338    
339 frank 924 2003-05-19 Frank Koormann <[email protected]>
340    
341 frank 927 * Thuban/version.py (get_changelog_date):
342     Catch exceptions if ChangeLog does not exist.
343    
344     * Thuban/UI/view.py (MapCanvas.Export): Bugfix
345    
346     2003-05-19 Frank Koormann <[email protected]>
347    
348 frank 924 Extended version information for Thuban
349    
350     * Thuban/version.py: New, version information for Thuban: Last
351     modification date and last ChangeLog entry date.
352    
353     * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
354     information: Display Thuban, wxPython and Python version.
355    
356 bh 919 2003-05-16 Bernhard Herzog <[email protected]>
357    
358 bh 921 * Thuban/Model/save.py: Remove some unused imports including the
359     __future__ import for nested_scopes as Thuban relies on Python 2.2
360     now.
361     (XMLWriter.encode): Remove the special case for a None argument.
362     In the saver encode is always called with a string argument.
363    
364     2003-05-16 Bernhard Herzog <[email protected]>
365    
366 bh 919 * Thuban/UI/__init__.py: Remove the work-around for the locale bug
367     in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
368     of the bug was that e.g. float("1.2") would fail. Thuban now
369     requires 2.4.x.
370    
371 frank 917 2003-05-16 Frank Koormann <[email protected]>
372    
373     Printing enhancement and WMF export (under Win32)
374    
375     * Thuban/UI/renderer.py (ExportRenderer): New, derived from
376     ScreenRenderer. Renders Map, Legend and Scalebar for export.
377     (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
378     PrintRender.
379    
380     * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
381     to fullfil information needed for PrinterRenderer.
382     (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
383     (MapCanvas.Print): Adapted to new MapPrintout.
384     (OutputTransform): General calculations to transform from canvas
385     coordinates to export/printing devices.
386    
387     * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
388     new method_command to call ExportMap, with platform dependency (only
389     __WXMSW__)
390    
391     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
392     of scalebar drawing area as new parameters.
393    
394     * Thuban/Model/scalebar.py (roundInterval): round long instead of int
395    
396     * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
397     Update to extended scalebar.DrawScalebar header.
398    
399     * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
400    
401     * test/test_scalebar.py: Made test executable as standalone.
402    
403 bh 908 2003-05-16 Bernhard Herzog <[email protected]>
404    
405     * Thuban/Model/table.py (Table): Remove this compatibility alias
406     for DBFTable.
407    
408     * test/test_table.py: Import DBFTable as Table because that alias
409     doesn't exist anymore.
410    
411     * Thuban/UI/classgen.py: Remove some unused imports
412    
413 jonathan 906 2003-05-14 Jonathan Coles <[email protected]>
414    
415     * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
416     Fix docstring.
417     (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
418     (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
419     values of the supplied range to determine the beginning and end
420     bounds of the generated classes.
421    
422     * Thuban/Model/range.py (Range.number_re): Now accepts floats that
423     do not have a leading 0 (.5 is now accepted as well as 0.5).
424    
425     * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
426     call to ClassGenerator.GenUniformDistribution.
427    
428     * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
429     layout bug with the 'Projection' label.
430    
431     * test/support.py (FloatTestCase): New. Needed for the Range tests.
432    
433     * test/test_range.py: New. Imported from SciParam.
434    
435 jonathan 897 2003-05-12 Jonathan Coles <[email protected]>
436    
437 jonathan 899 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
438     to table.UniqueValues() with calls that retrieve all the values
439     from the table. This will need to be replaced by a method on table
440     which can simply return the list (perhaps more efficiently).
441    
442     2003-05-12 Jonathan Coles <[email protected]>
443    
444 jonathan 897 The return value of ClassGenerator.CalculateQuantiles has changed.
445     Refer to the documentation for details.
446    
447     * test/test_classgen.py: Modified Quantile tests to use the
448     new return values.
449    
450     * Thuban/Model/classgen.py
451     (ClassGenerator.GenQuantiles): Add comments describing the parameters,
452     use new return values from CalculateQuantiles to produce the correct
453     range bounds in the Classification.
454     (ClassGenerator.CalculateQuantiles): Add more comments describing
455     the return values and parameters. Make minor adjustments to improve
456     the legibility of the code. Fix problem with adjusted not being set
457     in most cases.
458    
459 frank 893 2003-05-12 Frank Koormann <[email protected]>
460    
461     * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
462     and latin1. Fixes #1851 finally.
463    
464 jonathan 889 2003-05-09 Jonathan Coles <[email protected]>
465    
466 jonathan 897 * test/test_classgen.py: New. Tests the Quantile algorithm.
467    
468     * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
469     Clean up debugging statement, add comments, fix a small bug in the
470     returned adjusted percentiles.
471    
472     2003-05-09 Jonathan Coles <[email protected]>
473    
474 jonathan 889 Introduces Range class from SciParam into the ClassGroupRange class,
475     and such ranges can now be saved and loaded from disk.
476    
477     Quantiles are now available in the Classification Generator.
478    
479     Initial support for building Queries on a table. Doesn't do anything
480     but run some tests.
481    
482     * Thuban/Model/classification.py: Explicit imports.
483     (ClassGroupRange): Use the Range class to store the underlying
484     range information. The interface remains the same, except for
485     GetRange(), and you can also supply a Range object as the min
486     parameter to SetRange or __init__.
487    
488     * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
489     string appropriately for use in Thuban. Fixes RTbug #1851.
490     (SessionLoader.end_projection): Handle the context of the
491     projection tag a bit better by looking at what objects are not
492     None. There was an assumption that a projection tag for a map
493     could occur before any layers.
494     (SessionLoader.start_clrange): Provide backward compatibility for
495     reading min/max values as well as the new range parameter.
496    
497     * Thuban/Model/map.py: Explicit imports.
498    
499     * Thuban/Model/resource.py: Import _.
500     (ProjFileSaver.write): write header using projfile.dtd.
501    
502     * Thuban/Model/save.py: Explicit imports.
503     (XMLWriter.encode): New. Encode the given string from a format
504     used by Thuban into UTF-8. Fixes RTbug #1851.
505    
506     * Thuban/UI/classgen.py: Explicit imports.
507     (ClassGenDialog.__init__): Clean up the code and add support
508     for Quantiles.
509     (ClassGenDialog.OnOK): Add support for Quantiles.
510     (GenQuantilesPanel): New. Input panel for Quantiles.
511     (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
512     GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
513    
514     * Thuban/Model/classgen.py: New. Contains all the classes named above.
515    
516     * Thuban/UI/classifier.py: Explicit imports.
517     (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
518     ClassTable.SetValueAsCustom): Reworked to use new Range class.
519    
520     * Thuban/UI/legend.py: Explicit imports.
521    
522     * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
523     a Table menu and associated method calls.
524     (MainWindow.choose_color): Removed. No longer needed.
525    
526     * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
527     should be disabled if no projection is selected in the available
528     list.
529    
530     * Thuban/UI/renderer.py: Explicit imports.
531    
532     * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
533     with correctly selecting the rows and issuing the right events.
534     Be sure to call Skip() to allow the grid to do some of its own
535     handling which allows the rows to actually be selected.
536     (LayerTableGrid.select_shapes): Rename from select_shape. Supports
537     selecting multiple shapes.
538     (LayerTableFrame): Support for building Queries.
539     (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
540    
541     * Thuban/UI/tree.py: Explicit imports.
542    
543     * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
544     table view can call it.
545    
546     * test/test_classification.py: Explicit imports.
547     (TestClassification.test_ClassGroupRange): Fix test for new
548     Range class.
549    
550     * Doc/thuban.dtd: Add range parameter for clrange.
551    
552     * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
553     object in ClassGroupRange, and also uesd for inputting ranges in
554     the classifer table and elsewhere.
555    
556     * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
557     yet.
558    
559 frank 872 2003-05-09 Frank Koormann <[email protected]>
560    
561     * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
562    
563 frank 860 2003-05-08 Frank Koormann <[email protected]>
564    
565 frank 870 Coding style updates
566    
567     * test/test_scalebar.py: Replaced tab indentation by spaces.
568    
569     * Thuban/UI/scalebar.py: Explicit imports.
570    
571     2003-05-08 Frank Koormann <[email protected]>
572    
573 frank 867 * Thuban/UI/scalebar.py
574     (ScaleBar.DrawScalebar): Format string bug fixed.
575    
576     2003-05-08 Frank Koormann <[email protected]>
577    
578 frank 865 Reorganization of scalebar component (no wx in Thuban/Model)
579    
580     * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
581     (deriveInterval):
582     Calculate scalebar interval and unit which fits in width for scale.
583     (roundInterval): Round float.
584    
585     * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
586    
587     * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
588    
589     * Thuban/UI/legend.py: Import Thuban.UI.scalebar
590    
591     2003-05-08 Frank Koormann <[email protected]>
592    
593 frank 860 * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
594     Initialize ScaleBar with canvas.map
595    
596     * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
597     round intervals to display smarter lengths
598     (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
599     layer. If the maps has no projection applied grey the scalebar.
600    
601 frank 857 2003-05-07 Frank Koormann <[email protected]>
602    
603     Basic Scalebar features added.
604    
605     * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
606    
607     * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
608     (ScaleBarBitmap): New, links the scalebar bitmap with view messages
609     and the renderer.
610    
611     * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
612    
613     * Thuban/UI/messages.py: SCALE_CHANGED added.
614    
615 bh 850 2003-05-07 Bernhard Herzog <[email protected]>
616    
617 bh 852 * Thuban/Model/session.py (Session.__init__): New instance
618     variable shapestores to hold a list of all open shapestore objects
619     (Session.ShapeStores): New. Accessor method for the shapestores
620     list.
621     (Session._add_shapestore, Session._clean_weak_store_refs): New.
622     Internal methods to maintain the shapestores list.
623     (Session.Tables): New. Return all tables open in the session.
624     (Session.OpenShapefile): Insert the new ShapeStore into the
625     shapestores list.
626    
627     * test/test_session.py (TestSessionSimple.test_initial_state): Add
628     tests for ShapeStores and Tables
629     (TestSessionWithContent.test_shape_stores)
630     (TestSessionWithContent.test_tables): New. Test cases for
631     ShapeStores and Tables
632    
633     2003-05-07 Bernhard Herzog <[email protected]>
634    
635 bh 850 * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
636     Add comments about the optimizations used.
637     (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
638     Implement the ReadValue table interface method.
639    
640     * test/test_transientdb.py
641     (TestTransientTable.run_iceland_political_tests)
642     (TestTransientTable.test_transient_joined_table): Add tests for
643     ReadValue
644    
645 frank 848 2003-05-07 Frank Koormann <[email protected]>
646    
647     * Resources/Bitmaps/fulllayerextent.xpm,
648     Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
649     new icons.
650    
651 bh 840 2003-05-06 Bernhard Herzog <[email protected]>
652    
653 bh 846 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
654     New. Simply delegate to the transient table's version.
655    
656     * test/test_transientdb.py
657     (TestTransientTable.test_auto_transient_table_query): New. Test
658     case for AutoTransientTable's SimpleQuery
659    
660     2003-05-06 Bernhard Herzog <[email protected]>
661    
662 bh 843 * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
663     Implement a simple query method for the query dialog
664     (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
665     the row index or shapeid.
666     (TransientTable.create): Insert the right value of the row index
667     (TransientJoinedTable.create): Copy the row index of the left
668     table to the joined result table
669    
670     * test/test_transientdb.py
671     (TestTransientTable.test_transient_table_read_twice): Fix
672     doc-string
673     (TestTransientTable.test_transient_table_query): New. Test for the
674     SimpleQuery method
675    
676     2003-05-06 Bernhard Herzog <[email protected]>
677    
678 bh 840 Convert all table users to use the new table interface. This only
679     covers Thuban itself, not GREAT-ER or other applications built on
680     Thuban yet, so the compatibility interface stays in place for the
681     time being but it now issues DeprecationWarnings.
682    
683     Finally, the new Table interface has a new method, HasColumn.
684    
685     * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
686     issue deprecation warnings when they're. The warnings refer to the
687     caller of the method.
688     (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
689     for the deprecation warnings
690    
691     * test/test_table.py: Ignore the deprecation warnings for the old
692     table in the tests in this module. The purpose of the tests is to
693     test the old interface, after all.
694    
695     * test/test_transientdb.py
696     (TestTransientTable.run_iceland_political_tests): Use the
697     constants for the types. Add a test for HasColumn
698     (TestTransientTable.test_transient_joined_table): Adapt to new
699     table interface. Add a test for HasColumn
700     (TestTransientTable.test_transient_table_read_twice): Adapt to new
701     table interface
702    
703     * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
704     Adapt to new table interface
705    
706     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
707     new table interface
708    
709     * Thuban/UI/controls.py (RecordListCtrl.fill_list)
710     (RecordTable.SetTable): Adapt to new table interface
711    
712     * Thuban/UI/classifier.py (Classifier.__init__)
713     (Classifier.__init__): Adapt to new table interface
714    
715     * Thuban/UI/classgen.py (ClassGenDialog.__init__)
716     (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
717     to new table interface
718    
719     * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
720     (AutoTransientTable.HasColumn): Implement the new table interface
721     method
722     (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
723     (AutoTransientTable.UniqueValues): Adapt to new table interface
724    
725     * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
726     Adapt to new table interface
727    
728     * test/test_layer.py (TestLayer.open_shapefile): Helper method to
729     simplify opening shapefiles a bit easier.
730     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
731     (TestLayer.test_point_layer): Use the new helper method
732     (TestLayer.test_get_field_type): New. Test for the GetFieldType
733     method
734    
735     * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
736     the new table method
737    
738     * test/test_memory_table.py (TestMemoryTable.test_has_column):
739     Test for the new table method HasColumn
740    
741 jonathan 833 2003-05-06 Jonathan Coles <[email protected]>
742    
743     Addresses the "Selection Extent" wish of RTbug #1787.
744    
745     * Resources/Bitmaps/fulllayerextent.xpm,
746     Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
747     extent. These are just place holders for the real bitmaps.
748    
749     * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
750     calculate the bounding box once (the first time compute_bbox() is
751     called).
752     (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
753     the bounding box for the shapes in lat/long coordinates.
754    
755     * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
756     option.
757     (MainWindow.has_selected_shapes): New. Returns true if there are
758     any selected shapes.
759     (MainWindow.FullSelectionExtent): New. Calls
760     MapCanvas.FitSelectedToWindow() when the user selects the menu option.
761     (_has_selected_shapes): New. Returns true if there are any
762     selected shapes.
763    
764     * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
765     true if there are any selected shapes.
766    
767     * Thuban/UI/view.py (MapCanvas): Added delegated method
768     HasSelectedShapes.
769     (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
770     shapes on the canvas using the map projection (if any).
771    
772     * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
773     for Layer.ShapesBoundingBox().
774    
775 bh 826 2003-05-06 Bernhard Herzog <[email protected]>
776    
777     * Resources/Projections/defaults.proj: Fix spelling of Mercator
778    
779 jonathan 823 2003-05-05 Jonathan Coles <[email protected]>
780    
781     Addresses the "Full Layer Extent" wish of RTbug #1787.
782    
783     * Resources/Projections/defaults.proj: Added UK National Grid.
784    
785     * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
786     (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
787     when the user selects the menu option.
788    
789     * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
790     scales the given layer on the canvas using the map projection.
791    
792 bh 819 2003-05-05 Bernhard Herzog <[email protected]>
793    
794     Convert the table implementations to a new table interface. All
795     tables use a common mixin class to provide backwards compatibility
796     until all table users have been updated.
797    
798     * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
799     provide backwards compatibility for table classes implementing the
800     new interface
801     (DBFTable, MemoryTable): Implement the new table interface. Use
802     OldTableInterfaceMixin as base for compatibility
803     (DBFColumn, MemoryColumn): New. Column description for DBFTable
804     and MemoryTable resp.
805    
806     * test/test_dbf_table.py: New. Test cases for the DBFTable with
807     the new table interface.
808    
809     * test/test_memory_table.py: New. Test cases for the MemoryTable
810     with the new table interface.
811    
812     * test/test_table.py: Document the all tests in this file as only
813     for backwards compatibility. The equivalent tests for the new
814     interface are in test_memory_table.py and test_dbf_table.py
815     (MemoryTableTest.test_read): field_info should be returning tuples
816     with four items
817     (MemoryTableTest.test_write): Make doc-string a more precise.
818    
819     * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
820     table interface. Derive from from OldTableInterfaceMixin for
821     compatibility.
822     (TransientTableBase.create): New intance variable column_map to
823     map from names and indices to column objects
824     (TransientTable.create): Use the new table interface of the input
825     table
826     (AutoTransientTable): Convert to new table interface. Derive from
827     from OldTableInterfaceMixin for compatibility.
828     (AutoTransientTable.write_record): Removed. It's not implemented
829     yet and we still have to decide how to handle writing with the new
830     table and data framework.
831    
832     * test/test_transientdb.py
833     (TestTransientTable.run_iceland_political_tests)
834     (TestTransientTable.test_transient_joined_table): Use the new
835     table interface
836    
837 jonathan 817 2003-05-05 Jonathan Coles <[email protected]>
838    
839     This is namely a collection of UI updates to improve user interactivity.
840     Tabbing between controls now exists and you can use ESC to close dialog
841     boxes; ENTER will active the default button.
842    
843     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
844     order that the controls are created so that tabbing works correctly.
845     (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
846     wxDialog can handle the default button correctly.
847     (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
848     same reasons as for OnOK.
849     (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
850     when we ask the table for the maximum/minimum values of a field
851     which could take a very long time.
852    
853     * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
854     order that the controls are created so that tabbing works correctly.
855     (SelectPropertiesDialog.__init__): Rearrange the order that the
856     controls are created so that tabbing works correctly.
857    
858     * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
859     to derive from a wxDialog but behave like the original implementation
860     which was derived from a wxFrame. wxDialog provides useful key
861     handling functionality like ESC calling OnCancel and ENTER calling
862     OnOK which is lost with wxFrame.
863    
864     * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
865     new dialogs.
866    
867     * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
868     order that the controls are created so that tabbing works correctly.
869     (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
870     (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
871     (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
872     (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
873     can provide the "UK National Grid" as a default projection.
874     (UTMPanel.__init__): Rearrange the order that the controls are
875     created so that tabbing works correctly.
876    
877 bh 809 2003-05-05 Bernhard Herzog <[email protected]>
878    
879 bh 811 * extensions/thuban/wxproj.cpp: Fix some of the comments.
880     (project_point): If a map projection but no layer projection is
881     given, convert degrees to radians before applying the map
882     projection.
883    
884 bh 809 * Thuban/UI/tableview.py (TableGrid.disallow_messages)
885     (TableGrid.allow_messages): New methods to make it possible to
886     inhibit message sending.
887     (TableGrid.issue): Only send the message if not inhibited.
888     (LayerTableGrid.select_shape): Use the new methods to make sure
889     that no ROW_SELECTED message is sent while we're updating the
890     selected rows to match the selected shapes.
891    
892 jan 807 2003-05-02 Jan-Oliver Wagner <[email protected]>
893    
894     Implementation of MemoryTable.
895    
896     * Thuban/Model/table.py (MemoryTable): New. Quite simple table
897     implementation that operates on a list of tuples. All of the data
898     are kept in the memory.
899    
900     * test/test_table.py (MemoryTableTest): New.
901    
902     * test/test_transientdb.py (SimpleTable): Removed.
903     (TestTransientTable.test_transient_joined_table,
904     (TestTransientTable.test_transient_table_read_twice): Replaced
905     SimpleTable by MemoryTable.
906    
907 jonathan 793 2003-04-30 Jonathan Coles <[email protected]>
908    
909 jonathan 803 * Data/iceland_sample.thuban: Now contains correct projections
910     for each of the layers.
911    
912     * Resources/Projections/defaults.proj: Geographic projection
913     contains unit conversion parameter.
914    
915     2003-04-30 Jonathan Coles <[email protected]>
916    
917 jonathan 793 The most important part of this putback is the projection changes.
918     It should now be possible to specify the projection that a layer
919     is in and then specify a different projection for the map. The
920     projection dialog has an extra parameter for a geographic projection
921     which lets the user select if the input is in degrees or radians.
922    
923     * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
924     to say that the parameter is a tuple of unprojected
925     points (which is what the callers to this method were assuming).
926     Also, since the points are unprojected we need to projected them.
927    
928     * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
929     LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
930     groups are selected, move the layer up/down. Fixes RTbug #1833.
931    
932     * Thuban/UI/mainwindow.py: Move menu item map_rename up.
933    
934     * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
935     parameter in call to SetClientData.
936     (GeoPanel): Add support for selecting the units that the
937     source data is in (Radians or Degrees).
938    
939     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
940     the rendering loop by reducing the number of if's, removing the
941     unnecessary try/except block, and checking if the old group
942     is the same as the new one (which happens a lot if there is
943     no classification, or lots of shapes are in the same group).
944    
945     * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
946     around the redraw routine to try to catch problems that the user
947     may create by selecting invalid projections for the data set and
948     map. Clears the display if there are any problems and prints the
949     error.
950     (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
951     rectangle.
952    
953     * extensions/thuban/wxproj.cpp (project_point): First invert the
954     supplied point (which should be in projected coordinates) using
955     the layer's projection and then project the point using the
956     map's projection.
957     (project_points): Use project_point() to project each point.
958    
959 jan 792 2003-04-30 Jan-Oliver Wagner <[email protected]>
960    
961     * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
962     don't set the Classification to None if the classfication field
963     is None (ie only a DEFAULT).
964    
965 bh 786 2003-04-30 Bernhard Herzog <[email protected]>
966    
967 bh 790 * Thuban/UI/view.py: Fix some typos.
968    
969 bh 788 * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
970     not pop up the dialog if the selection becomes empty (this could
971     happen if e.g. a new selection is opened while the identify tool
972     is active and dialog had been closed)
973    
974     2003-04-30 Bernhard Herzog <[email protected]>
975    
976 bh 786 * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
977     instance variable read_record_last_result
978     (TransientTableBase.read_record): Make sure reading the same
979     record twice works. The implementation uses the new instance
980     variable read_record_last_result
981    
982     * test/test_transientdb.py
983     (TestTransientTable.test_transient_table_read_twice): New test
984     case for the above bug-fix.
985    
986 jonathan 793 2003-04-29 Jonathan Coles <[email protected]>
987    
988     * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
989    
990     * Thuban/UI/classgen.py: Remove all uses of Str2Num.
991    
992     * Thuban/UI/classifier.py: Remove all uses of Str2Num.
993     (ClassTable.SetValueAsCustom): Rename keyword argument in
994     ClassGroup* constructors to match argument name.
995    
996 bh 779 2003-04-29 Bernhard Herzog <[email protected]>
997    
998     * Thuban/Model/session.py (Session.Destroy): Explicitly close the
999     transient DB if it exists to make sure it doesn't leave a journal
1000     file in the temp directory.
1001    
1002     * Thuban/Model/transientdb.py (TransientDatabase.close): Set
1003     self.conn to None after closing the connection to make sure it's
1004     not closed twice
1005    
1006 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
1007    
1008 jonathan 769 Add a visible parameter in the layer XML tag. The default value is
1009     "true". If anything other than "false" is specified we also assume
1010 jonathan 776 "true". Addresses RTbug #1025.
1011 jonathan 769
1012     * Doc/thuban.dtd: Add visible parameter to a layer.
1013    
1014     * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
1015     of visible from 1 to True.
1016     (Layer.__init__): Change default value of visible from 1 to True.
1017    
1018     * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
1019     parameter.
1020    
1021     * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
1022     parameter.
1023    
1024     * test/test_load.py: Add new test data contents_test_visible.
1025     (LoadSessionTest.setUp): save test data.
1026     (LoadSessionTest.testLayerVisibility): Test if the visible flag
1027     is loaded correctly.
1028    
1029     * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
1030     for saving an invisible layer.
1031    
1032     2003-04-29 Jonathan Coles <[email protected]>
1033    
1034 jonathan 767 * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
1035     legend dialog box and tell it to change its map to the one
1036     supplied to SetMap(). Fixes RTbug #1770.
1037    
1038 bh 764 2003-04-29 Bernhard Herzog <[email protected]>
1039    
1040 bh 766 Next step of table implementation. Introduce a transient database
1041     using SQLite that some of the data is copied to on demand. This
1042     allows us to do joins and other operations that require an index
1043     for good performance with reasonable efficiency. Thuban now needs
1044     SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
1045     haven't tested that.
1046    
1047     * Thuban/Model/transientdb.py: New. Transient database
1048     implementation.
1049    
1050     * test/test_transientdb.py: New. Tests for the transient DB
1051     classes.
1052    
1053     * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
1054     classes to help automatically remove temporary files and
1055     directories.
1056     (Session.__init__): New instance variables temp_dir for the
1057     temporary directory and transient_db for the SQLite database
1058     (Session.temp_directory): New. Create a temporary directory if not
1059     yet done and return its name. Use AutoRemoveDir to have it
1060     automatically deleted
1061     (Session.TransientDB): Instantiate the transient database if not
1062     done yet and return it.
1063    
1064     * Thuban/Model/data.py (ShapefileStore.__init__): Use an
1065     AutoTransientTable so that data is copied to the transient DB on
1066     demand.
1067     (SimpleStore): New class that simply combines a table and a
1068     shapefile
1069    
1070     * Thuban/Model/table.py (Table, DBFTable): Rename Table into
1071     DBFTable and update its doc-string to reflect the fact that this
1072     is only the table interface to a DBF file. Table is now an alias
1073     for DBFTable for temporary backwards compatibility.
1074    
1075     * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
1076     the last reference to the session goes away so that the temporary
1077     files are removed properly.
1078    
1079     * test/test_load.py (LoadSessionTest.tearDown): Remove the
1080     reference to the session to make sure the temporary files are
1081     removed.
1082    
1083     2003-04-29 Bernhard Herzog <[email protected]>
1084    
1085 bh 764 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
1086     the __parser instance variable into a normal local variable in
1087     read. It's only used there and read will never be called more than
1088     once. Plus it introduces a reference cycle that keeps can keep the
1089     session object alive for a long time.
1090    
1091 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
1092 jonathan 735
1093 jonathan 762 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
1094     Projection an immutable item. Fixes RTbug #1825.
1095     (Projection.__init__): Initialize instance variables here.
1096     (ProjFile.Replace): New. Replace the given projection object with
1097     the new projection object. This solves the problem of needing the
1098     mutator Projection.SetProjection() in the ProjFrame class and
1099     allows a projection to change parameters without changing its
1100     location in the file.
1101    
1102     * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
1103     be of type wxSAVE and should verify overwriting a file.
1104    
1105     * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
1106     ProjFile.Replace() method instead of the mutator
1107     Projection.SetProjection(). Also requires that we reassign the
1108     client data to the new projection.
1109    
1110     * test/test_proj.py (TestProjection.test): Test GetName() and
1111     GetAllParameters()
1112     (TestProjFile.test): Remove tests for Set*() methods. Add tests
1113     for Replace().
1114    
1115     2003-04-25 Jonathan Coles <[email protected]>
1116    
1117 jonathan 756 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
1118     to save the name of the projection.
1119    
1120     * test/test_save.py (SaveSessionTest.testLayerProjection): New
1121     test to verify layer projections are saved correctly.
1122    
1123     2003-04-25 Jonathan Coles <[email protected]>
1124    
1125 jonathan 753 * Thuban/Model/proj.py (Projection.SetName): Set the name
1126     to "Unknown" if name is None.
1127     (Projection.SetAllParameters): New. Set the projection's
1128     parameter list to the one supplied.
1129     (Projection.SetProjection): New. Set the projection's
1130     properties to those of the supplied Projection.
1131    
1132     * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
1133     the dialog title to include the map's title.
1134     (MainWindow.LayerProjection): Set the dialog title to include
1135     the layer's title.
1136    
1137     * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
1138     error dialogs into a single method call.
1139     (ProjFrame.__VerifyButtons): Add more states to check.
1140     (ProjFrame.__GetProjection): Return the current state of an
1141     edited projection or None.
1142     (ProjFrame.__FillAvailList): Remove checks for states that
1143     shouldn't exist.
1144     (ProjFrame._OnNew): Clear all selected items and supply
1145     a projection panel if necessary.
1146    
1147     * test/test_proj.py (TestProjFile.test): Add tests for
1148     ProjFile.SetAllParameters, ProjFile.SetProjection,
1149     ProjFile.SetName.
1150    
1151     2003-04-25 Jonathan Coles <[email protected]>
1152    
1153 jonathan 748 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
1154     takes an optional argument to select the current projection.
1155     This does not guarantee that the item is visible due to
1156     limited wxWindows functionality. Fixes RTBug #1821.
1157    
1158     2003-04-25 Jonathan Coles <[email protected]>
1159    
1160 jonathan 743 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
1161     the projection name and use it when constructing the Projection
1162     object.
1163    
1164     * Thuban/Model/proj.py (Projection.__init__): Change the default
1165     value for 'name' to None and then test if name is equal to None
1166     in the body of the constructor. This way the caller doesn't have to
1167     know what the default value should be. Namely, useful in load.py
1168     where we have to pick a default value if the 'name' parameter
1169     doesn't exist in the XML file.
1170    
1171     * test/test_load.py (LoadSessionTest.testLayerProjection): New.
1172     Tests a file where a layer has a projection.
1173    
1174     2003-04-25 Jonathan Coles <[email protected]>
1175    
1176 jonathan 735 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
1177     tree for projection information.
1178    
1179     * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
1180     XMLReader.GetFileName.
1181     (SessionLoader): Added support for loading projection tags that
1182     appear inside a layer.
1183    
1184     * Thuban/Model/proj.py (ProjFile): Document the class. Move
1185     back to using a list because the order of the projections in
1186     the file is important to maintain. Fixes RTbug #1817.
1187    
1188     * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
1189     to ProjFile.GetFilename.
1190    
1191     * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
1192     information.
1193    
1194     * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
1195     ProjFrame._OnSaveAs. Removed old dead code from previous
1196     implementation.
1197     (ProjFrame._OnExport): Add support for exporting more than one
1198     projection to a single file.
1199     (ProjFrame.__FillAvailList): use string formatting (% operator)
1200     to build strings that are (partly) translated. Fixes RTbug #1818.
1201    
1202     * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
1203     class.
1204    
1205 bh 734 2003-04-24 Bernhard Herzog <[email protected]>
1206    
1207     * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
1208    
1209     * po/fr.po: New. French translation by Daniel Calvelo Aros
1210    
1211     * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
1212     empty strings.
1213    
1214 jonathan 735 2003-04-24 Jonathan Coles <[email protected]>
1215 jonathan 724
1216     * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
1217     implement the interface that the ProjFrame dialog expects.
1218    
1219     * Thuban/Model/proj.py (Projection.SetName): New. Allows the
1220     name of the projection to be changed.
1221     (ProjFile): Use a dictionary instead of a list so that removing
1222     projections is easier and we are sure about uniqueness.
1223     (ProjFile.Remove): Remove the given projection object.
1224    
1225     * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
1226     Return a list with only one projection file instead of searching for
1227     any projection file. This simplifies many things if the user can
1228     only have one system file and one user file.
1229    
1230     * Thuban/UI/classgen.py: Change all references to
1231     genCombo to genChoice.
1232    
1233     * Thuban/UI/mainwindow.py: Add a Projection option under the
1234     layer menu.
1235     (MainWindow.LayerProjection): New. Open up a projection window
1236     for a layer.
1237    
1238     * Thuban/UI/projdialog.py: Large changes to how the dialog is
1239     laid out. Use three panels instead of one. One for the list of
1240     projections, one for the edit controls, and one for the buttons.
1241     Fixed resizing problems so that the dialog resizes correctly
1242     when the projection panel changes. Added import/export, save, and
1243     new buttons/functionality.
1244    
1245 bh 723 2003-04-24 Bernhard Herzog <[email protected]>
1246    
1247     First step towards table management. Introduce a simple data
1248     abstraction so that we replace the data a layer uses more easily
1249     in the next step.
1250    
1251     * Thuban/Model/data.py: New file with a simple data abstraction
1252     that bundles shapefile and dbffile into one object.
1253    
1254     * Thuban/Model/session.py (Session.OpenShapefile): New method to
1255     open shapefiles and return a shape store object
1256    
1257     * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
1258     object instead of a shapefile filename. This introduces a new
1259     instance variable store holding the datastore. For intermediate
1260     backwards compatibility keep the old instance variables.
1261     (open_shapefile): Removed. No longer needed with the shape store.
1262     (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
1263     get the shape store used by a layer.
1264     (Layer.Destroy): No need to explicitly destroy the shapefile or
1265     table anymore.
1266    
1267     * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
1268     (MainWindow.AddLayer): Use the session's OpenShapefile method to
1269     open shapefiles
1270    
1271     * Thuban/Model/load.py (ProcessSession.start_layer): Use the
1272     session's OpenShapefile method to open shapefiles
1273    
1274     * test/test_classification.py
1275     (TestClassification.test_classification): Use the session's
1276     OpenShapefile method to open shapefiles and build the filename in
1277     a more platform independed way
1278    
1279     * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1280     Implement to have a session to use in the tests
1281     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1282     (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
1283     session's OpenShapefile method to open shapefiles
1284     (TestLayerLegend.setUp): Instantiate a session so that we can use
1285     it to open shapefiles.
1286     (TestLayerLegend.tearDown): Make sure that all references to
1287     layers and session are removed otherwise we may get a resource
1288     leak
1289    
1290     * test/test_map.py (TestMapAddLayer.test_add_layer)
1291     (TestMapWithContents.setUp): Instantiate a session so that we can
1292     use it to open shapefiles.
1293     (TestMapWithContents.tearDown): Make sure that all references to
1294     layers, maps and sessions are removed otherwise we may get a
1295     resource leak
1296     ("__main__"): use support.run_tests() so that more info about
1297     uncollected garbage is printed
1298    
1299     * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
1300     session's OpenShapefile method to open shapefiles
1301     ("__main__"): use support.run_tests() so that more info about
1302     uncollected garbage is printed
1303    
1304     * test/test_selection.py (TestSelection.tearDown): Make sure that
1305     all references to the session and the selection are removed
1306     otherwise we may get a resource leak
1307     (TestSelection.get_layer): Instantiate a session so that we can
1308     use it to open shapefiles.
1309     ("__main__"): use support.run_tests() so that more info about
1310     uncollected garbage is printed
1311    
1312     * test/test_session.py (TestSessionBase.tearDown)
1313     (TestSessionWithContent.tearDown): Make sure that all references
1314     to the session and layers are removed otherwise we may get a
1315     resource leak
1316     (TestSessionWithContent.setUp): Use the session's OpenShapefile
1317     method to open shapefiles
1318    
1319 jonathan 721 2003-04-24 Jonathan Coles <[email protected]>
1320    
1321     * Thuban/Model/load.py (XMLReader.read): Should have been checking
1322     if the file_or_filename object had the 'read' attribute.
1323    
1324 jonathan 715 2003-04-23 Jonathan Coles <[email protected]>
1325    
1326 jonathan 720 * Thuban/Model/resource.py: Fixes RTbug #1813.
1327     (ReadProjFile): Add documentation about which exceptions are raised.
1328     Always pass the exceptions up to the caller.
1329     (GetProjFiles): If the directory can't be read return an empty list.
1330     If any of the proj files can't be read skip that file and go
1331     on to the next one.
1332    
1333     * test/test_proj.py: Added test cases to handle nonexistent files,
1334     unreadable files, and files that don't parse correctly.
1335    
1336     2003-04-23 Jonathan Coles <[email protected]>
1337    
1338 jonathan 716 Projection dialog. Allows the user to select from a list
1339     of projection templates and optionally edit them and save new ones.
1340    
1341     * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
1342     (ProjPanel): Base class for projection specific panels.
1343     (TMPanel): Projection panel for Transverse Mercartor.
1344     (UTMPanel): Projection panel for Universal Transverse Mercartor.
1345     (LCCPanel): Projection panel for Lambert Conic Conformal.
1346     (GeoPanel): Projetion panel for Geographic Projection.
1347    
1348     2003-04-23 Jonathan Coles <[email protected]>
1349    
1350 jonathan 715 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
1351     promote symmetry. There now exists XMLReader and XMLWriter.
1352     (XMLReader.read): New. Call to read the given file descriptor or
1353     filename.
1354     (XMLReader.close): New. Make sure the file is closed.
1355     (XMLReader.GetFileName): New. Return just the file name that is being
1356     read from.
1357     (XMLReader.GetDirectory): New. Return just the directory of the file
1358     that is being read.
1359     (XMLReader.AddDispatchers): New. Take a dictionary which contains
1360     the names of functions to call as the XML tree is parsed.
1361     (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
1362     (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
1363     (SessionLoader): Removed class variables start_dispatcher and
1364     end_dispatcher since this functionality is now part of a class
1365     instance. Fixes RTbug #1808.
1366     (SessionLoader.__init__): Add dispatcher functions.
1367     (load_xmlfile): Code was moved into the XMLReader.read().
1368     (load_session): Use modified SessionLoader.
1369    
1370     * Thuban/Model/map.py (Map.GetProjection): New. Returns the
1371     map's projection.
1372    
1373     * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
1374     GetAllParameters.
1375     (Projection.GetParameter): Returns the value for the given parameter.
1376    
1377     * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
1378     (GetProjFiles): Renamed from GetProjections. Now returns a list
1379     of ProjFile objects.
1380     (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
1381     a list of ProjFile objects whose files are not user defined.
1382     (GetUserProjFiles): Renamed from GetUserProjections. Returns a
1383     list of ProjFile objects whose files are user defined.
1384     (ProjFileReader): Extend new XMLReader.
1385    
1386     * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
1387     promote symmetry.
1388    
1389     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
1390     control instead of a wxComboBox. wxChoice controls do not generate
1391     events as the uses highlights possible choices which fixes problems
1392     with resizing the dialog when the use selects an option.
1393    
1394     * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
1395     control instead of a wxComboBox.
1396    
1397     * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
1398     dialog.
1399    
1400     * test/test_proj.py (TestProjection.test): New tests for GetParameter
1401     method.
1402    
1403 bh 703 2003-04-22 Bernhard Herzog <[email protected]>
1404    
1405 bh 705 * Thuban/UI/mainwindow.py: Remove some unused imports and global
1406     constants
1407    
1408 bh 703 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
1409     (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
1410    
1411 bh 700 2003-04-17 Bernhard Herzog <[email protected]>
1412    
1413 bh 701 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
1414     (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
1415     anymore.
1416     (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
1417     (Layer.ShapeType, Layer.Shape): No need to call
1418     self.open_shapefile since it's always called in __init__
1419    
1420 bh 700 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
1421     In wxPython 2.4 there's no need to extend MainLoop anymore since
1422     wxPython itself makes sure OnExit is called.
1423    
1424 jonathan 688 2003-04-16 Jonathan Coles <[email protected]>
1425    
1426 jonathan 693 Initial putback of projection management code. Includes new
1427     classes to read and write projection files. The current load
1428     and save classes were abstracted a bit so they could be reused.
1429     The Projection class was extended to provide new methods and
1430     have a name.
1431    
1432     * Thuban/Model/load.py (XMLProcessor): New. Contains all the
1433     general XML reading methods that were part of ProcessSession.
1434    
1435     * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
1436     name.
1437     (ProjFile): New. Represents a file that contains projection
1438     information.
1439    
1440     * Thuban/Model/resource.py: New. Contains general utilities
1441     for read and writing projection files.
1442    
1443     * Thuban/Model/save.py (XMLSaver): New. Contains all the
1444     general XML writing methods that were part of SessionSaver.
1445     (SessionSaver): Renamed from Saver.
1446    
1447     * test/test_proj.py: New test cases for the projection
1448     file read and write functions.
1449    
1450     2003-04-16 Jonathan Coles <[email protected]>
1451    
1452 jonathan 688 * Thuban/Model/classification.py: Use repr() around values
1453     in the ClassGroup*.__repr__() methods so it is clearer when
1454     a value is a string and when it is a number.
1455    
1456     * test/test_load.py: Rework the classification test to test
1457     that we can load old files.
1458     (testLabels): Test a file where the groups have labels.
1459    
1460 bh 687 2003-04-16 Bernhard Herzog <[email protected]>
1461    
1462     Safer implementation of the performance enhancements of the
1463     low-level renderer:
1464    
1465     * extensions/thuban/wxproj.cpp (extract_projection)
1466     (extract_pointer): Rename extract_projection to extract_pointer
1467     and redefine its purpose to return the pointer stored in a CObject
1468     returned by the object's cobject method. Update all callers.
1469     (s_draw_info, free_draw_info, draw_polygon_init): Implement the
1470     handling of these low-level parameters so that each s_draw_info
1471     instance is handled as a CObject at python level that also
1472     contains real references to the actual python objects which
1473     contain the values in the struct. Add free_draw_info as the
1474     destructor.
1475     (draw_polygon_shape): Add the py_draw_info parameter which must a
1476     cobject containing an s_draw_info pointer.
1477    
1478     * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
1479     method to instantiat the low-level render parameter
1480     (MapRenderer.draw_shape_layer): Use the new method. Remove some
1481     commented out code.
1482     (MapRenderer.draw_polygon_shape): Make the first parameter not the
1483     layer but the low-level render parameter
1484     (ScreenRenderer.draw_shape_layer): Use the low-level render
1485     parameter.
1486    
1487 jonathan 673 2003-04-15 Jonathan Coles <[email protected]>
1488    
1489 jonathan 680 * Thuban/Model/classification.py: Implemented __repr__ for
1490     the ClassGroup* classes to make debugging a bit easier.
1491     (ClassGroup.SetLabel): Check that the string is an instance
1492     of StringTypes not StringType. Accounts for Unicode strings.
1493    
1494     * Thuban/Model/color.py: Implemented __repr__ to make
1495     debugging a bit easier.
1496    
1497     * Thuban/Model/save.py (Saver.write_classification): Need to
1498     save the group label.
1499    
1500     * test/test_load.py (testClassification): New. Loads the
1501     iceland_sample_test.thuban file and checks if it was loaded
1502     correctly.
1503    
1504     2003-04-15 Jonathan Coles <[email protected]>
1505    
1506 jonathan 673 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
1507     to improve rendering performance by initializing the variables
1508     that are not change each time draw_polygon_shape() is called.
1509     The values are stored in a global struct draw_info.
1510     (draw_polygon_shape): Removed initialization code that is
1511     now in draw_polygon_init().
1512    
1513     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
1514 jonathan 674 drawing initialization call to draw_polygon_init()
1515     (MapRenderer.draw_polygon_shape): Use new signature of
1516     draw_polygon_shape.
1517 jonathan 673
1518 jonathan 674 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
1519     weirdness by setting the range to (1, maxint).
1520 jonathan 673
1521 jonathan 674 * Thuban/Model/classification.py (ClassGroupProperties): Make
1522     instance variables private and optimize comparison operator
1523     by first checking if the color references are the same.
1524     (ClassGroupSingleton): Make instance variables private.
1525     (ClassGroupRange): Make instance variables private.
1526 jonathan 673
1527 jonathan 674 * HOWTO-Release: Filled in missing steps for releasing packages.
1528    
1529 bh 672 2003-04-15 Bernhard Herzog <[email protected]>
1530    
1531     First stab at internationalized messages:
1532    
1533     * Thuban/__init__.py (_): Implement the translation function for
1534     real using the python gettext module.
1535    
1536     * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
1537     translate empty strings.
1538    
1539     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1540     Add a missing space to a warning message
1541    
1542     * po/README: New. Notes about the management of the translation
1543     files.
1544    
1545     * po/Makefile: New. Makefile to help manage the translation files.
1546    
1547     * po/es.po: New. Spanish translation by Daniel Calvelo Aros
1548    
1549     * MANIFEST.in: Include the *.mo files in Resources/Locale and the
1550     translations and support files in po/
1551    
1552     * setup.py (data_files): Add the *.mo files to the data_files too
1553    
1554     * README: Add note about the translations when building from CVS
1555    
1556 jonathan 669 2003-04-14 Jonathan Coles <[email protected]>
1557    
1558     * Thuban/UI/dock.py: Fixes some window resizing problems most
1559     noticable under windows. Always assume the button bitmaps will
1560     be there. Code clean up.
1561     (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
1562     images for the dock/undock button to the same images.
1563     Work around for RTbug #1801.
1564    
1565     * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
1566     be allowed to grow within the sizer. Fixes a bug under Windows
1567     where the toolbar wasn't being drawn.
1568    
1569 frank 664 2003-04-14 Frank Koormann <[email protected]>
1570    
1571     * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
1572     Updated design to try to make the button functionality more
1573     transparent.
1574    
1575 jonathan 662 2003-04-14 Jonathan Coles <[email protected]>
1576    
1577     * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
1578     finalize the intialization of the panel.
1579    
1580     * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
1581     creation of the panel. Should be the last thing called in the
1582     initializer of a subclass.
1583    
1584     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
1585     set the current selections in the combo boxes. This is needed
1586     under Windows.
1587    
1588     * Thuban/UI/classifier.py (Classifier.__init__): Add a top
1589     level panel to the dialog so that the background colors are
1590     consistent under Windows.
1591    
1592 jonathan 646 2003-04-11 Jonathan Coles <[email protected]>
1593    
1594 jonathan 662 * Thuban/UI/classgen.py: Change color ramps to start at white
1595     not black.
1596    
1597     * Thuban/UI/legend.py: Enable/disable the legend buttons when
1598     the legend changes. Fixes RTbug #1793.
1599    
1600     * test/test_classification.py: Added test for copying of
1601     classifications.
1602    
1603     2003-04-11 Jonathan Coles <[email protected]>
1604    
1605 jonathan 647 * Thuban/UI/resource.py: New. Centralize the loading of resources
1606     such as bitmaps.
1607    
1608     * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
1609     added images to the move buttons, added 'reverse' button.
1610     (CustomRampPanel.__init__): Added images to the move buttons.
1611     (GreyRamp): New. Generates a ramp from white to black.
1612     (HotToColdRamp): New. Generates a ramp from cold to hot colors.
1613    
1614     * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
1615     ID_PROPERTY_*.
1616     (Classifier.__init__): Minor changes to the layout.
1617     (Classifier._OnTitleChanged): Listen for when the user edits the
1618     title and update the dialog's title and the layer's title.
1619    
1620     * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
1621    
1622     * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
1623     (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
1624     if the layer's title changes.
1625    
1626     * Thuban/UI/mainwindow.py: Added new menu item and associated code
1627     to open a dialog to rename the map.
1628     (MainWindow): Use new resource class to import bitmaps.
1629    
1630     2003-04-11 Jonathan Coles <[email protected]>
1631    
1632 jonathan 646 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
1633 jonathan 647 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
1634     Resources/Bitmaps/group_use_none.xpm,
1635     Resources/Bitmaps/group_use_not.xpm,
1636     Resources/Bitmaps/hide_layer.xpm,
1637     Resources/Bitmaps/layer_properties.xpm,
1638     Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
1639     Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
1640     New.
1641 jonathan 646
1642 jonathan 636 2003-04-10 Jonathan Coles <[email protected]>
1643    
1644 jonathan 644 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
1645     Should pass group to ClassGroup constructor.
1646    
1647     2003-04-10 Jonathan Coles <[email protected]>
1648    
1649 jonathan 636 * Thuban/Model/classification.py: (ClassGroup): Move all the common
1650     methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
1651     here. Implement SetVisible(), IsVisible().
1652     (ClassGroup.__init__): Add group parameter which acts as a copy
1653     constructor.
1654    
1655     * Thuban/UI/classifier.py (ClassTable): Add a new column for the
1656     "Visible" check boxes.
1657     (Classifier): Rename the buttons and refactor the code to match
1658     the new labels.
1659    
1660     * Thuban/UI/legend.py: Classify button is now called "Properties".
1661     Refactored the code to change variable names.
1662     (LegendTree.__FillTreeLayer): Only list a group if it is visible.
1663    
1664     * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
1665     MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
1666     renamed to MainWindow.LayerEditProperties.
1667     (MainWindow.ToggleLegend): Don't include map name in legend title.
1668     (MainWindow.SetMap): Added the map name to the window title.
1669     (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
1670     MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
1671     Functionality is found in the layer properties dialog.
1672    
1673     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
1674     draw visible groups.
1675    
1676 jonathan 626 2003-04-09 Jonathan Coles <[email protected]>
1677    
1678 jonathan 634 * Thuban/UI/classgen.py: Modifications to allow simple
1679     addition and selection of new color schemes.
1680     (MonochromaticRamp): New. Generates a ramp between two colors.
1681     (RedRamp): New. Generates a ramp of all red.
1682     (GreenRamp): New. Generates a ramp of all green.
1683     (BlueRamp): New. Generates a ramp of all blue.
1684    
1685     2003-04-09 Jonathan Coles <[email protected]>
1686    
1687 jonathan 626 * Thuban/Model/classification.py (Classification.__deepcopy__):
1688     Need to copy over field and fieldType attributes.
1689    
1690     * Thuban/Model/table.py (Table.field_range): New. Retrive the
1691     maximum and minimum values over the entire table for a given
1692     field.
1693     (Table.GetUniqueValues): New. Retrieve all the unique values
1694     in the table for a given field.
1695    
1696     * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
1697     (GenUniquePanel): New. Controls to allow the user to select
1698     which unique field values they would like in the classification.
1699     (CustomRampPanel): Code that was in ClassGenDialog that allows
1700     the user to select the properties for a custom ramp.
1701     (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
1702    
1703     * Thuban/UI/classifier.py: Removed a lot of debugging code.
1704     (Classifier._SetClassification): Callback method so that the
1705     class generator can set the classification in the grid.
1706     (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
1707     editing of a group properties class into a wxWindows control.
1708    
1709     * Thuban/UI/dock.py: It was decided that if the user closes
1710     a dockable window the window should simply hide itself. That
1711     way if the user wants to show the dock again it appears in the
1712     same place as it was when it was closed.
1713     (DockableWindow.Destroy): Call renamed method OnDockDestroy().
1714     (DockableWindow._OnButtonClose): Hide the window instead of
1715     destroying it.
1716     (DockableWindow._OnClose): Hide the window instead of
1717     destroying it.
1718    
1719     * Thuban/UI/legend.py (LegendTree): Use a private method to
1720     consistently set the font and style of the text. Fixes RTbug #1786.
1721    
1722     * Thuban/UI/mainwindow.py: Import just the Classifier class.
1723    
1724 bh 623 2003-04-07 Bernhard Herzog <[email protected]>
1725    
1726 bh 625 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
1727     to the map module
1728    
1729     2003-04-07 Bernhard Herzog <[email protected]>
1730    
1731 bh 623 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
1732     favor of ToggleSessionTree
1733     (MainWindow.ToggleSessionTree): New method to toggle visibility of
1734     the session tree.
1735     (MainWindow.SessionTreeShown): New method to return whether the
1736     session tree is currently shown.
1737     (MainWindow.ToggleLegend): New method to toggle visibility of the
1738     legend
1739     (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
1740     LegendShown
1741     (MainWindow.LegendShown): New method to return whether the legend
1742     is currently shown.
1743     (_method_command): Add checked parameter so we can define check
1744     menu items
1745     (_has_tree_window_shown, _has_legend_shown): Use the appropriate
1746     mainwindow methods.
1747     (show_session_tree, show_legend commands): Removed.
1748     (toggle_session_tree, toggle_legend commands): New commands to
1749     toggle the visibility of the dialogs
1750    
1751 jonathan 612 2003-04-07 Jonathan Coles <[email protected]>
1752    
1753 jonathan 619 * Thuban/UI/classgen.py: Fix Windows problem.
1754    
1755     * Thuban/UI/dock.py: Fix Windows problem.
1756    
1757     * Thuban/UI/mainwindow.py: Use False instead of false.
1758     (MainWindow.ShowLegend): Remove unnecessary switch parameter.
1759    
1760     2003-04-07 Jonathan Coles <[email protected]>
1761    
1762 jonathan 612 Since we now say that the order of the groups in a classification
1763     matters, it makes sense to be able to manipulate that order. Most
1764     of the changes to Thuban/Model/classification.py are to that end.
1765    
1766     * Thuban/Model/classification.py (Classification.AppendGroup,
1767     Classification.InsertGroup, Classification.ReplaceGroup,
1768     Classification.RemoveGroup, Classification.GetGroup): Do as the
1769     names imply.
1770     (Classification.FindGroup): This was called GetGroup, but GetGroup
1771     takes an index, while FindGroup takes a value.
1772     (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
1773     REFERENCE. Currently there is a cyclic reference between the layer
1774     and its classification. If the classification doesn't need to know
1775     its owning layer we can change this, since it may make sense to be
1776     able to use the same classification with different layers.
1777    
1778     * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
1779    
1780     * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
1781     not AddGroup()
1782    
1783     * Thuban/UI/classifier.py: Now that we can depend on the order in
1784     a Classification and have methods to manipulate that order we don't
1785     need to use our own data structures in the grid. We can simply make
1786     the grid/table access the information they need from a copy of
1787     the classification object.
1788     (Classifier._OnCloseBtn): Event handler for when the user clicks
1789     'Close'. This is needed so if the user applies changes and then
1790     continues to change the table the user has the option of discarding
1791     the most recent changes and keeping what they applied.
1792    
1793     * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
1794     into the same group.
1795    
1796     * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
1797     with a really old version of proj, PJ_VERSION won't even be defined.
1798     If it isn't defined then just compile so that the function always
1799     returns Py_False.
1800    
1801     * test/test_classification.py: Fix tests to use the renamed methods.
1802     Still need to write tests for the new methods.
1803    
1804 jonathan 601 2003-04-04 Jonathan Coles <[email protected]>
1805 jonathan 608
1806 jonathan 612 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
1807     call to SetSelection out of the method and before the call
1808     to __SelectField in __init__. This prevents a recursion of events
1809     when _OnFieldSelect is triggered by the user.
1810    
1811     2003-04-04 Jonathan Coles <[email protected]>
1812    
1813 jonathan 608 * Thuban/Model/classification.py: Rename Color.None to
1814     Color.Transparent.
1815     (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
1816     Don't bother copying the color, since Colors are immutable.
1817    
1818     * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
1819     Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
1820     Thuban/UI/renderer.py, Thuban/UI/view.py:
1821     Rename Color.None to Color.Transparent.
1822    
1823     * test/test_classification.py, test/test_load.py: Rename Color.None
1824     to Color.Transparent.
1825    
1826     2003-04-04 Jonathan Coles <[email protected]>
1827 jonathan 603
1828     * Thuban/Model/classification.py: Fix assert calls.
1829     (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
1830     Copy the color parameter rather than hold onto a reference.
1831 jonathan 601
1832 jonathan 603 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
1833     the color object.
1834     (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
1835     are sure there exists only one refernce to Color.None in the system.
1836     This allows us to use 'is' rather than the comparision functions.
1837    
1838     * Thuban/Model/save.py: Fix assert calls.
1839    
1840     * Thuban/UI/classifier.py: Fix assert calls.
1841     (ClassGrid._OnCellDClick): Call up to the classifier to open the
1842     dialog to edit the groups properties.
1843     (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
1844     correctly if a cell is resized.
1845     (ClassTable.SetClassification): New. Changes the classification
1846     that is in the table.
1847     (ClassTable.__SetRow): Allow groups to be prepended.
1848     (Classifier): New code for opening the EditProperties and
1849     GenerateRanges dialogs.
1850     (SelectPropertiesDialog.__GetColor): Only set the color in the
1851     color dialog if the current color is not None.
1852    
1853     * Thuban/UI/dock.py: Fix assert calls.
1854    
1855     * Thuban/UI/legend.py: Fix assert calls.
1856    
1857     * Thuban/UI/renderer.py: Fix assert calls.
1858    
1859     * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
1860     classifications.
1861     (GenRangePanel): Panel specific to range generation.
1862     (GenSingletonPanel): Panel specific to singleton generation.
1863     (ClassGenerator): Class responsible for actually generating
1864     the classification from the data gathered in the dialog box.
1865     (PropertyRamp): Generates properties whose values range from
1866     a starting property to an ending property.
1867 jonathan 601
1868 bh 600 2003-04-03 Bernhard Herzog <[email protected]>
1869    
1870     * test/support.py (print_garbage_information): New function that
1871     prints information about still connected messages and memory
1872     leaks.
1873     (run_suite): Removed.
1874     (run_tests): New function for use as a replacement of
1875     unittest.main in the test_* files. This one calls
1876     print_garbage_information at the end.
1877    
1878     * test/runtests.py (main): Use support.print_garbage_information
1879    
1880     * test/test_layer.py: Use support.run_tests instead of
1881     unittest.main so we get memory leak information
1882     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1883     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1884     (TestLayerLegend.test_visibility): Call the layer's Destroy method
1885     to fix a memory leak.
1886    
1887     * test/test_classification.py: Use support.run_tests instead of
1888     unittest.main so we get memory leak information
1889     (TestClassification.test_classification): Call the layer's Destroy
1890     method to fix a memory leak.
1891    
1892 bh 591 2003-04-02 Bernhard Herzog <[email protected]>
1893    
1894 bh 595 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
1895     Handle the reference counts of the return value and errors in
1896     PyArg_ParseTuple correctly.
1897    
1898 bh 593 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
1899     sure the filename is absolute to avoid problems when saving the
1900     session again
1901    
1902 bh 591 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
1903    
1904 jonathan 587 2003-04-01 Jonathan Coles <[email protected]>
1905    
1906 jonathan 589 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
1907 jonathan 587 that there actually are points in the returned list of points
1908     before trying to index into the list. The list may be empty if
1909     the shape is a Null Shape.
1910    
1911 bh 586 2003-04-01 Bernhard Herzog <[email protected]>
1912    
1913     * test/test_map.py: Don't use from <module> import *
1914    
1915 jonathan 581 2003-04-01 Jonathan Coles <[email protected]>
1916    
1917     * Thuban/Model/session.py: Use LAYER_CHANGED instead of
1918     LAYER_LEGEND_CHANGED
1919    
1920     * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
1921     self.Destroy() to close the window after yesterday's changes.
1922    
1923     * test/test_map.py, test/test_session.py: Fix messages that
1924     are sent from maps and layers.
1925    
1926 jonathan 575 2003-03-31 Jonathan Coles <[email protected]>
1927    
1928     * Thuban/UI/classifier.py: Commented out some debugging statements.
1929     (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
1930     RTbug #1769.
1931    
1932     * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
1933     position (although position doesn't work yet under GTK).
1934     (DockableWindow.Destroy): New. Called when the window must be
1935     closed. Namely needed when the DockFrame closes and must close
1936     its children.
1937     (DockFrame): Listen for EVT_CLOSE and destroy all children.
1938    
1939     * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
1940     when then window is told to close.
1941     (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
1942     comment in source for more info.
1943    
1944     * Thuban/UI/main.py: Show the legend by default when Thuban starts.
1945    
1946     * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
1947     symmetry with other such methods.
1948     (MainWindow.ShowLegend): Show the legend docked by default.
1949    
1950 jonathan 569 2003-03-28 Jonathan Coles <[email protected]>
1951    
1952     * Thuban/UI/classifier.py: Support for highlighting a specific
1953     group within the grid when the classification dialog is opened.
1954     Also contains a lot of debugging printouts which will later
1955     be removed.
1956    
1957     * Thuban/UI/dock.py: Complete rework on the dock code so that
1958     that it is fairly removed from the rest of the Thuban application.
1959     It is easy to add new docks which the rest of the program having
1960     to be aware of them.
1961    
1962     * Thuban/UI/legend.py: Modifications to support selecting a
1963     specific group in the classification dialog. Changed how layers
1964     are drawn when the layer is visible/invisible.
1965    
1966     * Thuban/UI/mainwindow.py: Removed legend specific code and
1967     replaced it with calls to the new dock code.
1968    
1969     * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
1970     to check if scale > 0. Trying to track down a divide by zero.
1971    
1972 jonathan 557 2003-03-26 Jonathan Coles <[email protected]>
1973    
1974 jonathan 567 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
1975     (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
1976     now part of DockableWindow.
1977     (LegendPanel.DoOnSelChanged): Select the current layer in the
1978     map.
1979     (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
1980     with the selected layer and/or group.
1981    
1982     2003-03-26 Jonathan Coles <[email protected]>
1983    
1984 jonathan 557 This putback contains the code for dockable windows. There is
1985     no support in wxWindows as of this date for windows that can
1986     attach themselves to other windows.
1987    
1988     The current model contains a DockableWindow which has a parent
1989     window for when it is detached and a dock window that it puts
1990     its contents in when it is docked. The contents of a DockableWindow
1991     must be a DockPanel. DockPanel itself derives from wxPanel.
1992    
1993     * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
1994     message, not a LAYER_LEGEND_CHANGED message.
1995    
1996     * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
1997    
1998     * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
1999     as one of the style properties for the fieldTypeText item to
2000     be sure that its size is correct when the text changes.
2001    
2002     * Thuban/UI/dock.py: New. Classes for the DockPanel and
2003     DockableWindow.
2004    
2005     * Thuban/UI/legend.py: Added some more buttons and made the
2006     LegendPanel a DockPanel.
2007    
2008     * Thuban/UI/mainwindow.py: Added sash windows to the main window
2009     and supporting functions for manipulating the sashes.
2010     (MainWindow.ShowLegend): Create a DockableWindow with the
2011     LegendPanel as the contents.
2012    
2013     * Thuban/UI/messages.py: Added DOCKABLE_* messages
2014    
2015     * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
2016     not LAYER_LEGEND_CHANGED, messages.
2017    
2018 jonathan 554 2003-03-25 Jonathan Coles <[email protected]>
2019    
2020     * setup.py: Added custom script bdist_rpm_build_script so that
2021     when the rpm is built the path to wx-config is correct.
2022    
2023     * setup.cfg: Added line saying to use the custom build script
2024    
2025 jonathan 552 2003-03-20 Jonathan Coles <[email protected]>
2026    
2027     Initial implementation of the Legend.
2028    
2029     * Thuban/UI/legend.py: New. Creates a window that shows the map's
2030     Legend information and allows the user to add/modify classifications
2031     and how the layers are drawn on the map.
2032    
2033     * setup.py: New command 'build_docs' which currently uses
2034     happydoc to generate html documentation for Thuban.
2035    
2036     * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
2037     Returns a string which is appropriately describes the group.
2038    
2039     * Thuban/Model/layer.py (Layer.SetClassification): Generate a
2040     LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
2041    
2042     * Thuban/Model/map.py (Map): Rename messages and use new, more
2043     specific, messages.
2044    
2045     * Thuban/Model/messages.py: New message to indicate that a layer's
2046     data has changed (LAYER_CHANGED). New map messages to indicate
2047     when layers have been added/removed/changed or if the stacking order
2048     of the layers has changed.
2049    
2050     * Thuban/Model/session.py: Rename and use new messages.
2051    
2052     * Thuban/UI/classifier.py: Remember if any changes have actually
2053     been applied so that if the dialog is cancelled without an application
2054     of changes we don't have to set a new classification.
2055     (ClassDataPreviewer): Pulled out the window specific code and put it
2056     ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
2057     symbols on any DC.
2058    
2059     * Thuban/UI/mainwindow.py: New code to open the legend.
2060    
2061     * Thuban/UI/view.py: Use new message names.
2062    
2063 jonathan 541 2003-03-19 Jonathan Coles <[email protected]>
2064    
2065     * Thuban/UI/main.py (verify_versions): New. Checks the versions
2066     of Python, wxPython, and some other libraries.
2067    
2068     * extensions/thuban/wxproj.cpp (check_version): Checks the given
2069     version against what wxproj was compiled with.
2070     (check_version_gtk): If wxproj was compiled with gtk then check
2071     the given version against the version of the gtk library
2072     currently being used.
2073    
2074 bh 538 2003-03-14 Bernhard Herzog <[email protected]>
2075    
2076     * test/test_command.py: Run the tests when the module is run as a
2077     script
2078    
2079     2003-03-14 Bernhard Herzog <[email protected]>
2080    
2081     Implement selection of multiple selected shapes in the same layer:
2082    
2083     - Introduce a new class to hold the selection. This basically
2084     replaces the interactor which was nothing more than the
2085     selection anyway. A major difference is of course that the new
2086     selection class supports multiple selected shapes in one layer
2087    
2088     - Move the object that represents the selection from the
2089     application to the canvas. The canvas is a better place than the
2090     application because the selection represents which shapes and
2091     layer of the map displayed by the canvas are selected and
2092     affects how the map is drawn.
2093    
2094     - Make the selection and its messages publicly available through
2095     the mainwindow.
2096    
2097     - The non-modal dialogs do not get a reference to the interactor
2098     anymore as they can simply refer to their parent, the
2099     mainwindow, for the what the interactor had to offer.
2100    
2101     * Thuban/UI/selection.py: New module with a class to represent the
2102     selection.
2103    
2104     * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
2105     these unused messages
2106    
2107     * Thuban/UI/application.py (ThubanApplication.OnInit)
2108     (ThubanApplication.OnExit, ThubanApplication.SetSession): The
2109     interactor is gone now.
2110     (ThubanApplication.CreateMainWindow): There is no interactor
2111     anymore so we pass None as the interactor argument for now for
2112     compatibility.
2113    
2114     * Thuban/UI/view.py (MapCanvas.delegated_messages)
2115     (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
2116     Unsubscribe, delegate messages according to the delegated_messages
2117     class variable.
2118     (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
2119     attributes from instance variables as described with the
2120     delegated_methods class variable.
2121     (MapCanvas.__init__): New instance variable selection holding the
2122     current selection
2123     (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
2124     pass them on to the renderer
2125     (MapCanvas.SetMap): Clear the selection when a different map is
2126     selected.
2127     (MapCanvas.shape_selected): Simple force a complete redraw. The
2128     selection class now takes care of only issueing SHAPES_SELECTED
2129     messages when the set of selected shapes actually does change.
2130     (MapCanvas.SelectShapeAt): The selection is now managed in
2131     self.selection
2132    
2133     * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
2134     (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
2135     Unsubscribe, delegate messages according to the delegated_messages
2136     class variable.
2137     (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
2138     attributes from instance variables as described with the
2139     delegated_methods class variable.
2140     (MainWindow.__init__): The interactor as ivar is gone. The
2141     parameter is still there for compatibility. The selection messages
2142     now come from the canvas.
2143     (MainWindow.current_layer, MainWindow.has_selected_layer):
2144     Delegate to the the canvas.
2145     (MainWindow.LayerShowTable, MainWindow.Classify)
2146     (MainWindow.identify_view_on_demand): The dialogs don't need the
2147     interactor parameter anymore.
2148    
2149     * Thuban/UI/tableview.py (TableFrame.__init__)
2150     (LayerTableFrame.__init__, LayerTableFrame.OnClose)
2151     (LayerTableFrame.row_selected): The interactor is gone. It's job
2152     from the dialog's point of view is now done by the mainwindow,
2153     i.e. the parent. Subscribe to SHAPES_SELECTED instead
2154     of SELECTED_SHAPE
2155    
2156     * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
2157     is gone. It's job from the dialog's point of view is now done by
2158     the mainwindow, i.e. the parent.
2159    
2160     * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
2161     gone. It's job from the dialog's point of view is now done by the
2162     mainwindow, i.e. the parent.
2163    
2164     * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
2165     gone. It's job from the dialog's point of view is now done by the
2166     mainwindow, i.e. the parent.
2167     (SessionTreeCtrl.__init__): New parameter mainwindow which is
2168     stored as self.mainwindow. The mainwindow is need so that the tree
2169     can still subscribe to the selection messages.
2170     (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
2171     (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
2172     selection is now accessible through the mainwindow. Subscribe to
2173     SHAPES_SELECTED instead of SELECTED_SHAPE
2174    
2175     * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
2176     SHAPES_SELECTED message now.
2177     (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
2178     so deal with multiple shapes
2179     (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
2180     gone. It's job from the dialog's point of view is now done by the
2181     mainwindow, i.e. the parent.
2182    
2183     * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
2184     parameter is now a list of shape ids.
2185     (RecordTable.SetTable): The second parameter is now a list of
2186     indices.
2187    
2188     * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
2189     selected_shape parameter and ivar to selected_shapes. It's now a
2190     list of shape ids.
2191     (MapRenderer.draw_label_layer): Deal with multiple selected
2192     shapes. Rearrange the code a bit so that the setup and shape type
2193     distinctions are only executed once.
2194    
2195     * test/test_selection.py: Test cases for the selection class
2196    
2197 jonathan 527 2003-03-11 Jonathan Coles <[email protected]>
2198    
2199     * Thuban/Model/load.py: Temporary fix so that the xml reader
2200     doesn't cause Thuban to crash.
2201    
2202     * Thuban/Model/layer.py: Handle the cyclic references between
2203     a layer and its classification better, and be sure to disconnect
2204     the classification from the layer when the layer is destroyed
2205     so that we don't maintain a cyclic reference that may not be
2206     garbage collected.
2207    
2208     * Thuban/Model/classification.py: See comment for layer.py.
2209    
2210 jan 523 2003-03-12 Jan-Oliver Wagner <[email protected]>
2211    
2212     * HOWTO-Release: New. Information on the steps for releasing
2213     a new version of Thuban.
2214    
2215 jonathan 514 2003-03-11 Jonathan Coles <[email protected]>
2216    
2217     * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
2218     Use True instead of true.
2219     (Classifier): Should have a single panel in which all the controls lie.
2220    
2221     * Thuban/UI/proj4dialog.py: Add normal border.
2222    
2223     * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
2224    
2225     * Thuban/UI/mainwindow.py: Use True instead of true.
2226    
2227     * setup.py: Update some definitions to use wxWindows2.4 files
2228    
2229     * Data/iceland_sample_class.thuban: Fixed file so that the
2230     field_type information is present.
2231    
2232 jonathan 490 2003-03-10 Jonathan Coles <[email protected]>
2233    
2234 jonathan 505 * Thuban/UI/classifier.py (Classifier.__init__): Make the
2235     field type label grow so that when the text changes the
2236     size is updated correctly. This may be a wxWindows bug.
2237    
2238     2003-03-10 Jonathan Coles <[email protected]>
2239    
2240 jonathan 499 * Thuban/UI/application.py: Changed SESSION_CHANGED to
2241     SESSION_REPLACED.
2242    
2243     * Thuban/UI/classifier.py: Wrap text with _().
2244     (ClassGrid.CreateTable): Set dimensions and size hints here,
2245     instead of in Reset, so we only set the size once.
2246    
2247     * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
2248    
2249     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
2250     Call Close() instead of Shutdown().
2251    
2252     * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
2253    
2254     * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
2255     Go back to using OnClose() instead of Shutdown().
2256    
2257     2003-03-10 Jonathan Coles <[email protected]>
2258    
2259 jonathan 497 * Thuban/UI/classifier.py (Classifier): SelectField() needed
2260     to know the old field index as well as the new one.
2261    
2262     2003-03-10 Jonathan Coles <[email protected]>
2263    
2264 jonathan 495 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
2265     to correctly set the table information and call this from
2266     __init__ and from _OnFieldSelect so that all the information
2267     is up to date when the dialog opens and when a field is changed.
2268    
2269     2003-03-10 Jonathan Coles <[email protected]>
2270    
2271 jonathan 490 * Thuban/Model/classification.py (Classification): Don't use
2272     layer's message function directly, use the ClassChanged() method
2273     when then classification changes. SetField/SetFieldType/SetLayer
2274     must keep the information about field name and field type in
2275     sync when an owning layer is set or removed.
2276    
2277     * Thuban/Model/layer.py: Added ClassChanged() so that the
2278     classification can tell the layer when its data has changed.
2279     (Layer.SetClassification): Accepts None as an arguement to
2280     remove the current classification and correctly handles
2281     adding a new classification.
2282    
2283     * Thuban/Model/load.py: Comment out print statement
2284    
2285     * test/test_classification.py, test/test_save.py: New and
2286     improved tests.
2287    
2288 jonathan 483 2003-03-07 Jonathan Coles <[email protected]>
2289    
2290     * Thuban/Model/classification.py: Implemented __copy__ and
2291     __deepcopy__ for ClassGroup* and ClassGroupProperites so
2292     they can easily be copied by the classifier dialog.
2293     (ClassGroupProperites.__init__): The default line color should
2294     have been Color.Black.
2295    
2296     * Thuban/UI/classifier.py: Setting and Getting table values now
2297     uses a consistent set of functions.
2298     (Classifier): Now non-modal. Has field type label which changes
2299     as the field changes. Keep track of buttons in a list so that
2300     we can enable/disable the buttons when the None field is selected.
2301     (SelectPropertiesDialog): Add buttons to make the colors transparent.
2302    
2303     * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
2304     does what OnClose did, but can be called by the application to
2305     close a window. Needed when a session changes, and we have to
2306     close the classifier windows.
2307    
2308     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
2309     Shuts down open dialogs. Used when a new session is created
2310     or a session is opened.
2311     (MainWindow.SaveSession): Should only call application.SaveSession()
2312     if we don't call SaveSessionAs first.
2313     (MainWindow.Classify): Allow different classifier dialogs for
2314     different layers.
2315    
2316     * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
2317     the parent class handle it. Add Shutdown() to unsubscibe from
2318     event notification and call the parent Shutdown(). This was
2319     necessary so the application can close the tree window.
2320    
2321 jonathan 478 2003-03-06 Jonathan Coles <[email protected]>
2322    
2323     * Thuban/Model/classification.py: Minor documentation changes,
2324     Addition of __eq__ and __ne__ methods.
2325     (Classification.SetLayer): prevent recursion between this method
2326     and Layer.SetClassification().
2327    
2328     * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
2329    
2330     * Thuban/Model/layer.py (SetClassification): prevent recursion
2331     between this method and Classification.SetLayer().
2332    
2333     * test/test_classification.py, test/test_load.py,
2334     test/test_session.py: Fixed and added tests for the classification
2335     classes.
2336    
2337 bh 477 2003-03-06 Bernhard Herzog <[email protected]>
2338    
2339     * Thuban/UI/classifier.py (ClassGrid.__init__)
2340     (ClassGrid.CreateTable): Move the SetSelectionMode call to
2341     CreateTable because otherwise it triggers an assertion in
2342     wxPython/wxGTK 2.4.
2343    
2344 jonathan 459 2003-03-05 Jonathan Coles <[email protected]>
2345    
2346 jonathan 475 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
2347 jonathan 471
2348 jonathan 475 * Thuban/Model/load.py: import FIELDTYPE constants from table.
2349 jonathan 471
2350 jonathan 475 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
2351 jonathan 471
2352 jonathan 475 * Thuban/Model/table.py: Put FIELDTYPE constants back.
2353 jonathan 471
2354     2003-03-05 Jonathan Coles <[email protected]>
2355    
2356 jonathan 459 * Thuban/UI/classifier.py: Added class documentation.
2357     Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
2358     Store just the groups in the table and generate the other
2359     column information when it is requested. Add "None" field
2360     to pull-down to select no classification.
2361    
2362     * Thuban/common.py: Moved FIELDTYPE constants from table.py
2363     (Str2Num): Only catch ValueError exceptions.
2364    
2365     * Thuban/Model/classification.py: Class documentation. Renaming
2366     of methods with Stroke to Line. Groups are stored in a single
2367     list with the default as the first element. Groups are searched
2368     in the order they appear in the list.
2369    
2370     * Thuban/Model/color.py: Documentation.
2371    
2372     * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
2373     the kind of data represented by a field.
2374    
2375     * Thuban/Model/load.py (ProcessSession): Use proper string
2376     conversion function; fixes RTbug #1713.
2377    
2378     * Thuban/Model/save.py (Saver): Store field type information.
2379    
2380     * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
2381     (Table): Add field_info_by_name() to retrieve field information
2382     by specifying the field name, not the number.
2383    
2384     * Thuban/UI/mainwindow.py: Function name changes.
2385    
2386     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
2387     get the layer classification once. Don't try to classify
2388     values when the field is None: just use the default properties.
2389    
2390     * Thuban/UI/view.py: Function name changes.
2391    
2392     * Doc/thuban.dtd: Add field_type attribute to a classification.
2393    
2394 bh 456 2003-03-04 Bernhard Herzog <[email protected]>
2395    
2396 bh 458 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
2397     the fill and stroke layer attributes optional with suitable
2398     default values. Add the stroke_width layer attribute. Use correct
2399     syntax for empty elements. Make the attribute list for labels
2400     refer to the label element.
2401    
2402     2003-03-04 Bernhard Herzog <[email protected]>
2403    
2404 bh 456 * setup.py (thuban_build_py.build): Add a comment about distutils in
2405     Python 2.3 containing some of the functionality we implement in
2406     setup.py ourselves.
2407    
2408     * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
2409     before the selection mode. Doing it the other way round triggers
2410     an assertion in wxWindows.
2411    
2412     * Thuban/Model/save.py (escape): Fix typo in doc-string
2413    
2414     * Thuban/Model/classification.py: Remove unnecessary wxPython
2415     import
2416    
2417 jonathan 448 2003-03-04 Jonathan Coles <[email protected]>
2418    
2419     * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
2420     Parameter 'value' should default to None.
2421    
2422     * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
2423     the class attribute __classification is now private.
2424    
2425     * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
2426     Classifier to ClassGrid. Added support for removing selected rows,
2427     which including code for keeping track of when cells are selected,
2428     and deselected.
2429     (ClassTable): Support for added/removing rows. Fixed a problem
2430     with __ParseInput whereby it would not allow strings (only numbers)
2431     to be entered.
2432     (Classifier): Added button and supporting code for removing
2433     selected rows.
2434    
2435 jonathan 445 2003-02-27 Jonathan Coles <[email protected]>
2436 jonathan 434
2437     * Thuban/common.py: Moved color conversion functions into
2438     Thuban/UI/common.py.
2439     (Str2Num): Now converts the float (not the string) to a long/int
2440     so that an exception isn't thrown.
2441    
2442     * Thuban/UI/common.py: Common functions used in several UI modules
2443    
2444     * Thuban/Model/classification.py: Changed the class hierarchy
2445     so that a Classification consists of Groups which return
2446     Properties when a value matches a Group.
2447    
2448     * Thuban/Model/layer.py: Fixed name resolution problem.
2449    
2450     * Thuban/Model/load.py: Use new Classification and Group functions.
2451    
2452     * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
2453     failure.
2454     (Saver.write_classification): Use new Classification and Group
2455     functions.
2456    
2457     * Thuban/UI/classifier.py: Changes to use new Classification and Group
2458 jonathan 445 functions. Fix to create a tuple with a single value instead of
2459     simply returning the value.
2460 jonathan 434
2461     * Thuban/UI/renderer.py: Use new Classification and Group functions.
2462     Use common.py functions.
2463    
2464 jonathan 445 * Thuban/UI/tree.py: Use common.py functions.
2465 jonathan 447
2466     * test/test_classification.py: Use new Classification and Group
2467     classes.
2468 jonathan 434
2469 jonathan 426 2003-02-24 Jonathan Coles <[email protected]>
2470    
2471     * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
2472     functions from Thuban color objects to wxWindow colour objects.
2473    
2474     * Thuban/Model/classification.py (Classification): Renamed
2475     GetProperties() to GetClassData(). Used the new iterator
2476     in TreeInfo().
2477     (ClassIterator): Iterator implementation to iterate over the
2478     ClassData objects in a classification object.
2479    
2480     * Thuban/Model/save.py (Saver.write_classificaton): Uses
2481     the new iterator to save the classification information.
2482    
2483     * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
2484     for changing the stroke and fill colors and previewing the
2485     changes.
2486    
2487     * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
2488     MainWindow.SaveSessionAs): Text string changes so the dialogs
2489     have more meaningful titles.
2490    
2491     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
2492     Classification method name from GetProperties to GetClassData.
2493    
2494     * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
2495     instead of accessing now non-existent class variables.
2496    
2497 bh 425 2003-02-24 Bernhard Herzog <[email protected]>
2498    
2499     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
2500     unneeded Shape() call. Rendering is substantially faster without
2501     it and it avoids some problems with broken shape files.
2502    
2503 frank 423 2003-02-20 Frank Koormann <[email protected]>
2504    
2505     Force minimal size of identify and label dialogs. The autosizing
2506     looked too ugly.
2507    
2508     * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
2509     * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
2510     Set size of listctrl.
2511     * Thuban/UI/identifyview.py (IdentifyView.__init__):
2512     Set size of dialog.
2513    
2514 jonathan 408 2003-02-19 Jonathan Coles <[email protected]>
2515    
2516     * test/test_classification.py, test/test_layer.py,
2517     test/test_load.py, test/test_map.py, test/test_session.py:
2518     Updated the tests to use the new functions that are in the
2519     respective classes.
2520    
2521     * Thuban/Model/classification.py (Classification):
2522     Uses the new ClassData* classes. Modification messages are
2523     passed up to the parent layer (if it exists).
2524     (ClassData): New class to encapsulate the common data in each
2525     classification property.
2526     (ClassDataDefault): Represents the Default class. data.
2527     (ClassDataPoint): Represents a single class. data point
2528     (ClassDataRange): Represents a class. range
2529     (ClassDataMap): Represents a class. map (unused).
2530    
2531     * Thuban/Model/color.py: Added Color.None to represent something
2532     with no color. Color.Black represents the color black.
2533     (NoColor): Helper class derived from Color to represent something
2534     with no color.
2535    
2536     * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
2537     stroke_width attributes. Made the 'classification' attribute private.
2538     New methods for setting/getting the classification.
2539    
2540     * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
2541     to get the classifcation and use the new ClassData* classes to
2542     hold the classification data. Use Str2Num to convert numbers
2543     properly.
2544    
2545     * Thuban/Model/save.py (Saver): Use new Color and Classification
2546     methods
2547    
2548     * Thuban/UI/classifier.py (ClassGrid): New class to represent a
2549     custom grid.
2550     (ClassTable): Support for editing Values and Labels and for
2551     changing what type (point or range) of data is stored in each
2552     property based on how the user enters the data.
2553     (Classifier): Support for saving the new classifications and
2554     launching the dialog to edit a property.
2555     (SelectPropertiesDialog): New class for editing the visual
2556     properties of a classification (stroke color, width, and fill color)
2557     (ClassPreviewer): Took the Draw method from ClassRenderer and
2558     made most of it into this new class. Intend to use this class in
2559     the SelectPropertiesDialog for previewing changes.
2560    
2561     * Thuban/UI/renderer.py: Use new Color and Classification methods.
2562    
2563     * Thuban/UI/tree.py: Formatting changes.
2564    
2565     * Doc/thuban.dtd: Add 'label' element
2566    
2567     * Thuban/common.py: New. Contains common routines used throughout
2568     the code.
2569     (Str2Num): Takes a string and converts it to the "best" type of
2570     number.
2571    
2572 bh 405 2003-02-14 Bernhard Herzog <[email protected]>
2573    
2574     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
2575     dragging flag is always set to 0 even when the tool implementation
2576     raises an exception
2577    
2578 bh 402 2003-02-11 Bernhard Herzog <[email protected]>
2579    
2580     * Thuban/UI/application.py (ThubanApplication.splash_screen): New
2581     method to create a splash screen.
2582     (ThubanApplication.ShowMainWindow): New. Show the main window.
2583     Needed so the splash screen can display the mainwindow
2584     (ThubanApplication.OnInit): Call the
2585     new splash_screen method to determine whether the application
2586     should display a splash screen. If it displays a splash screen do
2587     not immediately show the main window.
2588    
2589 jonathan 399 2003-02-11 Jonathan Coles <[email protected]>
2590    
2591     * Thuban/Model/classification.py: Added import line to fix
2592     feature conflicts between running on python2.2 and python2.1.
2593    
2594     * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
2595     onto the clinfo parameter, so removed the deepcopy().
2596    
2597 jonathan 396 2003-02-10 Jonathan Coles <[email protected]>
2598    
2599 tkoester 403 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
2600 jonathan 396 Added element_open variable to track opening and closing of tags
2601     so that tags that don't span more than one line are closed with
2602     /> instead of </tag_name>. Use the GetDefault*() methods of
2603     the Classification class.
2604    
2605     * Thuban/Model/classification.py (Classificaton): Added set and
2606     get methods for the default data. The class also takes a layer
2607     reference so that modification messages can be sent. Fixed the
2608     methods to use the new ClassData class.
2609     (ClassData): New class to encapsulate the classification data
2610    
2611     * Thuban/Model/layer.py (Layer): Remove the
2612 tkoester 403 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
2613 jonathan 396 SetDefault*() methods on the layer's classification object.
2614 tkoester 403 (Layer.__init__): Use the new SetDefault*() methods in the
2615 jonathan 396 Classification class.
2616    
2617     * Thuban/Model/load.py (ProcessSession): Use the new ClassData
2618     object instead of a dictionary.
2619    
2620 tkoester 403 * Thuban/UI/classifier.py (ClassRenderer): New class to
2621 jonathan 396 draw the classifications in the dialog box's table.
2622     (Classifier): Modified to use the ClassRenderer class.
2623    
2624 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
2625     methods of the Classification class.
2626 jonathan 396
2627     * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
2628     of the ClassData class.
2629    
2630     * test/test_classification.py, test/test_layer.py,
2631     test/test_map.py, test/test_session.py: Fix the tests to work
2632     with the above code changes.
2633    
2634 jonathan 387 2003-02-03 Jonathan Coles <[email protected]>
2635    
2636     * Thuban/Model/classification.py (Classification): Added getNull()
2637     to return the NullData reference
2638    
2639     * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
2640     Layer.SetStrokeWidth): Modified these functions to change the
2641     null data in the classification rather than keep these values
2642     directly in the Layer class. Menu options to change these values
2643     work again.
2644    
2645 jonathan 380 2003-01-28 Jonathan Coles <[email protected]>
2646    
2647 jonathan 384 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
2648 tkoester 403 Fixed crashing problem on some systems. Dialog box shows
2649 jonathan 380 classification data.
2650    
2651 jonathan 384 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
2652     Colors in the tree view.
2653    
2654     * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
2655     the tree info for classifications. Commented out unnecessary lines.
2656    
2657     * Thuban/Model/classification.py (Classification.TreeInfo): New
2658     function to add information about the classification into the
2659     tree view.
2660    
2661 tkoester 403 2003-01-27 Jan-Oliver Wagner <[email protected]>
2662 jan 375
2663 tkoester 403 * Thuban/__init__.py (_): New.
2664 jan 375
2665     * Thuban/Model/classification.py, Thuban/Model/extension.py,
2666     Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
2667 tkoester 403 Thuban/Model/session.py, Thuban/UI/application.py,
2668     Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
2669     Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
2670     Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
2671     Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
2672     Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
2673 jan 375
2674 jonathan 370 2003-01-27 Jonathan Coles <[email protected]>
2675    
2676 tkoester 403 * Thuban/Model/layer.py: Classification initialization calls.
2677 jonathan 370
2678 tkoester 403 * Thuban/Model/classification.py: Created class to encapsulate
2679     a layer classification. Supports specific data points and
2680     ranges.
2681 jonathan 370
2682 tkoester 403 * Thuban/Model/load.py: Added support for loading classification
2683     information.
2684 jonathan 370
2685 tkoester 403 * Thuban/Model/save.py: Added support for saving classification
2686     information.
2687 jonathan 370
2688 tkoester 403 * Thuban/UI/classifier.py: Initial class for a dialog box for
2689     specifying classification information.
2690 jonathan 370
2691 tkoester 403 * Thuban/UI/mainwindows.py: Support for opening the classifier
2692     dialog.
2693 jonathan 370
2694 tkoester 403 * Thuban/UI/renderer.py: Support for drawing a layer with the
2695     classification information.
2696 jonathan 370
2697 tkoester 403 * Data/iceland_sample_class.thuban: iceland_sample with
2698     classification data.
2699 jonathan 370
2700 tkoester 403 * test/test_classification: Tests for the Classification class.
2701 jonathan 370
2702 bh 359 2002-12-09 Bernhard Herzog <[email protected]>
2703    
2704 bh 361 * test/test_command.py: New. Tests for the command classes.
2705    
2706 bh 359 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
2707     (Command.IsTool): New method to distinguish between command
2708     switching tools and other commands.
2709    
2710     * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
2711     the tool to avoid direct assignments to instance variables
2712     (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
2713     (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
2714     change the tool
2715    
2716     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
2717     active tool's command turns insensitive, disable the tool.
2718     (_tool_command): Use the new ToolCommand class
2719    
2720     * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
2721     SelectTool method to change the tool
2722     (iconfile): Use the ToolCommand class
2723    
2724 bh 354 2002-12-03 Bernhard Herzog <[email protected]>
2725    
2726     * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
2727     the case of selected items that are not children of Layers or Maps
2728     properly. Previously this bug would trigger an assertion in
2729     wxWindows.
2730    
2731 frank 352 2002-11-06 Frank Koormann <[email protected]>
2732    
2733 bh 354 * Thuban/UI/mainwindow.py: Altered the order of tools in the
2734     toolbar: First now are all navigation tools (Zoom In/Out, Pan,
2735     Full Extent).
2736 tkoester 403
2737 bh 349 2002-10-23 Bernhard Herzog <[email protected]>
2738    
2739     * setup.py (setup call): version now 0.1.3
2740    
2741     * MANIFEST.in: Add the files in test/
2742    
2743     * test/README: Add note about tests requiring the iceland data
2744    
2745     * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
2746     copyright notice.
2747    
2748 bh 344 2002-10-18 Bernhard Herzog <[email protected]>
2749    
2750     * test/test_map.py
2751     (TestMapWithContents.test_projected_bounding_box): Use an explicit
2752     epsilon.
2753    
2754     * test/support.py (FloatComparisonMixin.assertFloatEqual)
2755     (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
2756     message if the assertion fails and don't return the return value
2757     of self.assert_. In assertFloatSeqEqual the return meant that not
2758     all items of the sequence were compared.
2759    
2760 bh 326 2002-09-20 Bernhard Herzog <[email protected]>
2761    
2762 bh 341 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
2763    
2764     * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
2765    
2766 bh 338 * test/test_map.py (TestMapWithContents.test_tree_info): Create
2767     the string with the bounding box on the fly because of platform
2768     differences in the way %g is handled.
2769    
2770     * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
2771     DBFfile too because Thuban layers can't yet cope missing DBF
2772     files.
2773    
2774     2002-09-20 Bernhard Herzog <[email protected]>
2775    
2776 bh 326 * test/test_menu.py: Use initthuban instead of
2777     add_thuban_dir_to_path to initialize Thuban.
2778    
2779     * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
2780     Mixin class for float comparisons
2781     (SubscriberMixin): New. Mixin class to test messages sent through
2782     the Connector class
2783    
2784     * test/README: Fix a typo and add the -v flag to the command for
2785     individual tests
2786    
2787 bh 335 * test/test_session.py: New. Test cases for Thuban.Model.session
2788    
2789     * test/test_proj.py: New. Test cases for Thuban.Model.proj
2790    
2791     * test/test_map.py: New. Test cases for Thuban.Model.map
2792    
2793     * test/test_layer.py: New. Test cases for Thuban.Model.layer
2794    
2795     * test/test_label.py: New. Test cases for Thuban.Model.label
2796    
2797     * test/test_connector.py: New. Test cases for Thuban.Lib.connector
2798    
2799     * test/test_color.py: New. Test cases for Thuban.Model.color
2800    
2801     * test/test_base.py: New. Test cases for Thuban.Model.base
2802    
2803 bh 322 2002-09-13 Bernhard Herzog <[email protected]>
2804    
2805     * Thuban/Model/session.py (Session.forwarded_channels): Forward
2806     the CHANGED channel too.
2807    
2808     * Thuban/Model/map.py (Map.forwarded_channels): Forward the
2809     CHANGED channel too.
2810     (Map.__init__): Call the Modifiable constructor as well.
2811    
2812     * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
2813     event if the modified flag changes.
2814     (Modifiable.changed): Tweak the doc-string.
2815    
2816     * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
2817     (MainWindow.set_position_text): Put the code that puts the text
2818     with the mouse position into the status bar into the new method
2819     set_position_text so that it can overwritten in derived classes.
2820    
2821 bh 317 2002-09-12 Bernhard Herzog <[email protected]>
2822    
2823     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
2824     message box on the main window.
2825    
2826 bh 313 2002-09-11 Bernhard Herzog <[email protected]>
2827    
2828     * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
2829     the 'E' because it's less likely to interfere with other menu
2830     entries.
2831 bh 315 (MainWindow.build_menu): remove an incorrect comment.
2832 bh 313
2833 bh 311 2002-09-10 Bernhard Herzog <[email protected]>
2834    
2835     * Thuban/UI/mainwindow.py (MainWindow.Map): New.
2836     (_tool_command): Add sensitive parameter
2837     (_has_visible_map): Sensitivity callback to tools and other
2838     commands that require a visible map. Use it in map_zoom_in_tool,
2839     map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
2840     and map_full_extent
2841    
2842 bh 308 2002-09-06 Bernhard Herzog <[email protected]>
2843    
2844     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
2845     VIEW_POSITION
2846    
2847 tkoester 403 2002-09-04 Frank Koormann <[email protected]>
2848 frank 306
2849     * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
2850    
2851 bh 302 2002-09-02 Bernhard Herzog <[email protected]>
2852    
2853 bh 304 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
2854     wxWindows already and our implementation doesn't work correctly
2855     with wxGTK 2.3:
2856     (MapCanvas.__init__): Remove the instance variable
2857     (MapCanvas.OnPaint): Always call do_redraw when there's a map to
2858     be drawin
2859     (MapCanvas.OnIdle): Removed.
2860    
2861 bh 302 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
2862     a parameter to determine the size of the rectangle.
2863     (MapCanvas.find_shape_at): Create the box around the point on a
2864     layer by layer basis and make the size depend on the shape type.
2865     This solves a problem with the selection of point shapes at the
2866     border of the layer's bounding box
2867    
2868 bh 292 2002-08-30 Bernhard Herzog <[email protected]>
2869    
2870 bh 300 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
2871     for the sensitivity of remove layer.
2872     (_can_remove_layer): New. Sensitivity callback for remove layer
2873     (Command layer_remove): Use _can_remove_layer
2874    
2875     * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
2876     determine whether a given layer can be deleted.
2877    
2878 bh 297 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
2879     (MapCanvas.do_redraw): Get rid of the unused update_region
2880     instance variable
2881    
2882 bh 294 * Thuban/UI/view.py: Add/update some doc-strings.
2883    
2884 bh 292 * test/: new subdirectory with a bunch of unit tests.
2885    
2886     * test/README, test/test_table.py, test/test_save.py,
2887     test/test_menu.py, test/test_load.py: Initial set of tests and
2888     brief instructions on how to run them
2889    
2890 bh 287 2002-08-29 Bernhard Herzog <[email protected]>
2891    
2892 bh 291 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
2893     arcs with multiple parts.
2894    
2895 bh 289 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
2896     Handle degenrate rectangles.
2897    
2898 bh 287 * Thuban/Model/table.py: Make writing records work correctly:
2899     (Table.__init__): Keep track of whether the DBF is open for
2900     writing
2901     (Table.write_record): Open the DBF file for writing when necessary
2902    
2903 bh 285 2002-08-27 Bernhard Herzog <[email protected]>
2904    
2905     * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
2906     dbf files only for reading by default. Use a new writable dbf
2907     object for writing.
2908    
2909 bh 278 2002-08-26 Bernhard Herzog <[email protected]>
2910    
2911 bh 282 * Thuban/UI/mainwindow.py: Refactor the context creation:
2912     (MainWindow.Context): New method to return a context
2913     (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
2914     new method
2915    
2916 bh 278 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
2917     layer table specific code from TableGrid into LayerTableGrid
2918     (TableFrame, LayerTableFrame): Split the layer table specific code
2919     from TableFrame into LayerTableFrame
2920 bh 280 (LayerTableGrid.select_shape): Remove a debug print
2921 bh 278
2922     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
2923     LayerTableFrame
2924    
2925 bh 277 2002-08-23 Bernhard Herzog <[email protected]>
2926    
2927     * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
2928     absolute filename.
2929    
2930 bh 269 2002-08-22 Bernhard Herzog <[email protected]>
2931    
2932 bh 275 * Thuban/Model/table.py (Table.write_record): New method to write
2933     records.
2934 tkoester 403 (Table.__init__): Open the DBF file for writing too.
2935 bh 275
2936     * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
2937     into the underlying table.
2938    
2939     * extensions/shapelib/shapefil.h (DBFCommit),
2940     extensions/shapelib/dbfopen.c (DBFCommit): New API function to
2941     commit any changes made to the DBF file.
2942    
2943 bh 271 * Thuban/UI/mainwindow.py (make_check_current_tool)
2944     (_tool_command): Put the code that generates the "checked"
2945     callback into a separate function so that we can reuse it
2946     elsewhere
2947    
2948 bh 269 * Thuban/Model/save.py (Saver): New class to handle serializing a
2949     session into an XML file. The main reason to introduce a class is
2950     that applications built on Thuban can derive from it so that they
2951     can save additional information in a session file.
2952     (save_session): Delegate almost all the work to the Saver class.
2953     Rename the filename argument to file because it may be a file like
2954     object now.
2955    
2956     * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
2957     code. Remove the little test code which would be executed when the
2958     module is run as a script which didn't work anymore since it can't
2959     import the other Thuban modules.
2960     (ProcessSession, load_session): Refactor the ProcessSession to
2961     have one method for each element start and end tag so that derived
2962     classes can easily override the processing of individual tags.
2963     Also, always parse with namespaces enabled because applications
2964     built on top of Thuban will likely use namespaces if they extend
2965     the session file format.
2966    
2967 bh 266 2002-08-21 Bernhard Herzog <[email protected]>
2968    
2969     * setup.py (ThubanInstall.run): Don't repr install_lib_orig
2970     because thubaninit_contents will do it for us.
2971    
2972 tkoester 403 2002-08-16 Jan-Oliver Wagner <[email protected]>
2973 jan 265
2974     * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
2975     tree window already open
2976    
2977 bh 259 2002-08-15 Bernhard Herzog <[email protected]>
2978    
2979 bh 263 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
2980     with self.
2981    
2982     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
2983     when we have actually captured it.
2984    
2985 bh 259 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
2986     shapefile and destroy the table.
2987    
2988     * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
2989    
2990 bh 254 2002-08-14 Bernhard Herzog <[email protected]>
2991    
2992 bh 256 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
2993     instance variable columns
2994     (RecordTable.GetTypeName): row and col may be negative in some
2995     cases.
2996    
2997 bh 254 * setup.py (InstallLocal.initialize_options)
2998     (InstallLocal.finalize_options, InstallLocal.user_options): New
2999     option create-init-file to build a thubaninit.py when running
3000     install_local
3001     (InstallLocal.run): Create the thubaninit.py module when requested
3002     (thubaninit_contents): Split the template into several parts and
3003     create a new function thubaninit_contents that creates the
3004     contents of a thubaninit module.
3005     (ThubanInstall.run): Use the new function to create the thubaninit
3006     module.
3007    
3008 bh 252 2002-07-30 Bernhard Herzog <[email protected]>
3009    
3010     * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
3011     cleanup.
3012     (ThubanApplication.MainLoop): Extend to automatically call OnExit.
3013    
3014     * Thuban/Model/session.py (Session.Destroy): Don't bypass the
3015     direct base class' Destroy method.
3016    
3017     * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
3018     layers.
3019     (Map.Destroy): Destroy the label_layer as well and call the
3020     inherited Desatroymethod first so that no more messages are
3021     issued.
3022     (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
3023     message if the stacking order actually has changed. Add
3024     doc-strings.
3025     (Map.BoundingBox): Correct the doc-string.
3026     (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
3027     (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
3028    
3029     * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
3030     all labels.
3031    
3032 bh 247 2002-07-29 Bernhard Herzog <[email protected]>
3033    
3034     * Thuban/Model/map.py (Map.subscribe_layer_channels)
3035     (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
3036     to a layer's channels into separate methods.
3037     (Map.RemoveLayer, Map.AddLayer): Call the new methods
3038     (Map.Destroy): Unsubscribe from a layer's channels before
3039     destroying it.
3040    
3041     * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
3042     selected_layer parameter to searched_layer which is the layer to
3043     search in.
3044     (MapCanvas.SelectShapeAt): New parameter layer to restrict the
3045     search to that layer. Return the selected layer and shape.
3046    
3047     * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
3048     typo
3049    
3050 bh 238 2002-07-24 Bernhard Herzog <[email protected]>
3051    
3052 bh 243 * Thuban/UI/application.py (ThubanApplication.create_session):
3053     Extend the doc string.
3054     (ThubanApplication.subscribe_session)
3055     (ThubanApplication.unsubscribe_session): New methods to
3056     subscribe/unsubscribe to/from session channels.
3057     (ThubanApplication.SetSession): Call the new methods here.
3058     (ThubanApplication.maps_changed, ThubanApplication.set_map):
3059     Renamed set_map to maps_changed. Its now a subscriber for
3060     MAPS_CHANGED.
3061    
3062     * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
3063     x-coordinate in case of simple clicks
3064    
3065     * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
3066     don't pass it as a parameter
3067    
3068     * Thuban/Model/session.py (Session.RemoveMap): New
3069    
3070 bh 238 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
3071     window size into a parameter.
3072    
3073 bh 235 2002-07-23 Bernhard Herzog <[email protected]>
3074    
3075 bh 237 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
3076     just commands.
3077    
3078 bh 235 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
3079     parameter list a bit to allow setting the window title and the
3080     initial message in the status bar. Update the callers.
3081    
3082     * Thuban/UI/application.py (ThubanApplication.OnInit)
3083     (ThubanApplication.CreateMainWindow): Put the mainwindow
3084     instantiation into a separate method so that it can be overridden
3085     by a subclass.
3086    
3087 bh 230 2002-07-19 Bernhard Herzog <[email protected]>
3088    
3089 bh 234 * Thuban/Model/session.py: Issue a CHANGED message every time
3090     another changed message is issued to make it easier to get
3091     notified of changes.
3092     (Session): Update the doc string
3093     (Session.forward): Issue changed-events as CHANGED as well.
3094     (Session.changed): Overwrite the inherited version to issue
3095     CHANGED events as well.
3096    
3097     * Thuban/UI/tree.py: We can now simply subscribe to the session's
3098     CHANGED channel to be informed of changes.
3099     (SessionTreeCtrl.session_channels): Not needed any longer.
3100 tkoester 403 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
3101 bh 234 Only have to (un)subscribe CHANGED
3102    
3103     * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
3104    
3105 bh 230 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
3106     for the wxPython locale bug to __init__.py so that it's
3107     automatically executed by anybody using UI code from Thuban.
3108    
3109 bh 225 2002-07-18 Bernhard Herzog <[email protected]>
3110    
3111 bh 228 * Thuban/UI/main.py (main): app no longer needs to be global
3112    
3113     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
3114     as parameter and store it in an instance variable
3115     (MainWindow.invoke_command, MainWindow.update_command_ui)
3116     (MainWindow.save_modified_session, MainWindow.NewSession)
3117     (MainWindow.OpenSession, MainWindow.SaveSession)
3118     (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
3119     application object.
3120    
3121     * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
3122     the main window with self.
3123    
3124 bh 225 * Thuban/UI/context.py: New module with the context class
3125    
3126     * Thuban/UI/command.py (Command): Update doc string.
3127    
3128     * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
3129     MainWindow.update_command_ui): Pass an instance of the context
3130     class to the command's methods
3131     (check_current_tool, call_method): Handle the new context
3132     implementation
3133    
3134     * Examples/simple_extensions/simple_tool.py (simple_tool,
3135     check_simple_tool): Handle the new context implementation
3136    
3137     * Examples/simple_extensions/simple_command.py (simple_command):
3138     Handle the new context implementation. Update the comments about
3139     the context.
3140    
3141     * Thuban/UI/application.py (ThubanApplication.SetSession): Add
3142     doc-string
3143     (ThubanApplication.Session): New method to return the session
3144     object
3145    
3146     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
3147     interactor's selected_layer may not be a layer of the current
3148     session when the tree is updated while a new session is being set.
3149    
3150 bh 217 2002-07-17 Bernhard Herzog <[email protected]>
3151    
3152     * Thuban/UI/tree.py (color_string): Removed. No longer used.
3153     (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
3154     update_tree into update_tree and add_items. The tree now uses a
3155     more generic way to display the contents of the tree.
3156     (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
3157    
3158     * Thuban/Model/layer.py (Layer.TreeInfo),
3159     Thuban/Model/extension.py (Extension.TreeInfo),
3160     Thuban/Model/map.py (Map.TreeInfo),
3161 tkoester 403 Thuban/Model/session.py (Session.TreeInfo):
3162 bh 217 Add TreeInfo methods to implement the new tree view update scheme
3163    
3164 bh 216 2002-07-16 Bernhard Herzog <[email protected]>
3165    
3166     * Thuban/UI/application.py: Don't use "import from" for the
3167     MainWindow. It can't always be resolved.
3168     (ThubanApplication.OnInit): change reference to MainWindow
3169     accordingly.
3170    
3171     * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
3172     completely
3173    
3174 bh 213 2002-07-10 Bernhard Herzog <[email protected]>
3175    
3176     * setup.py (create_init_module): New configurable variable whose
3177     default depends on the platform we're running on.
3178     (ThubanInstall.initialize_options): Initialize
3179     self.create_init_module from the global create_init_module
3180     (ThubanInstall.user_options): indictate that the options
3181     create-init-module and init-module-dir have arguments.
3182    
3183     * setup.py: In the setup call change the version number to include
3184     cvs.
3185    
3186     * MANIFEST.in: Add the files in Examples
3187    
3188 bh 205 2002-07-09 Bernhard Herzog <[email protected]>
3189    
3190 bh 210 * setup.py: In the setup call, use the thuban homepage as the
3191     value of the url parameter.
3192    
3193 bh 208 * Examples: New subdirectory for examples.
3194    
3195     * Examples/simple_extensions/simple_tool.xpm,
3196     Examples/simple_extensions/simple_tool.py,
3197     Examples/simple_extensions/simple_command.py,
3198     Examples/simple_extensions/README: Simple examples showing how to
3199     add new commands and tools.
3200    
3201 bh 207 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
3202     bdist_rpm that we also have an install script.
3203     (bdist_inno): Add 2002 to the copyright notice.
3204    
3205 bh 205 * setup.py: Create a file in python's site-packages directory to
3206     make installation of Thuban as a library easier.
3207     (ThubanInstall.user_options): Add two new options,
3208     create-init-module and init-module-dir
3209     (ThubanInstall.expand_with_pure_python_dirs): New method to expand
3210     filenames for installation in the default directories.
3211     (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
3212     the inherited methods to capture some filenames before they're
3213     transformed too much by distutils.
3214     (ThubanInstall.run): Create the init module if requested.
3215     (ThubanInstall.thuban_init_filename): New method to return the
3216     full name of the init module.
3217     (ThubanInstall.get_outputs): Append the filename of the init
3218     module.
3219    
3220 bh 202 2002-07-08 Bernhard Herzog <[email protected]>
3221    
3222 bh 205 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
3223     handle the prefix properly which means that the default for the
3224     installation prefix should be /usr for RPMs and /usr/local when
3225     doing a normal source install.
3226     (bdist_rpm_install_script): Script to override the default install
3227     commands in the specfile generated by the bdist_rpm command.
3228     (thuban_bdist_rpm.user_options): Add a prefix option
3229     (thuban_bdist_rpm.initialize_options): Init the prefix option.
3230     Create the script files for the spec files as empty files here
3231     (thuban_bdist_rpm._make_spec_file): Override the inherited method
3232     to fill the script files with content.
3233    
3234 bh 202 * Thuban/Model/save.py (relative_filename): Wrapper around
3235     Thuban.Lib.fileutil.relative_filename that accepts an empty dir
3236     argument. save_session now automatically uses this version,
3237     solving a problem when saving to a relative filename.
3238    
3239     * setup.py: In the setup call, make sure that the library
3240     directories are under $prefix/lib not directly under $prefix.
3241    
3242 tkoester 403 2002-06-20 Jan-Oliver Wagner <[email protected]>
3243 jan 199
3244     * Thuban/Model/extension.py: new module to handle extension objects.
3245     * Thuban/Model/messages.py: new messages for extensions.
3246     * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
3247     Session.AddExtension): new for handling extensions.
3248     Also some other minor changes to round up extension handling.
3249     * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
3250     of Extension titles and title and names of its objects.
3251    
3252 bh 194 2002-05-29 Bernhard Herzog <[email protected]>
3253    
3254     * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
3255 bh 202 the events for a command.
3256 bh 194 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
3257     Call bind_command_events to bind the events. add_toolbar_command
3258     can now bind events too so that it's possible to have commands
3259     that are only available through the toolbar.
3260     (MainWindow.init_ids): New instance variable events_bound to keep
3261     track of for which commands events have been bound.
3262    
3263 bh 190 2002-05-28 Bernhard Herzog <[email protected]>
3264    
3265     * Thuban/UI/menu.py: New module to build and manage menus.
3266    
3267     * Thuban/UI/mainwindow.py: Remove some unused imports.
3268     (MainWindow.__init__, main_menu): move the definition of the main
3269     menu from __init__ to the Menu instance main_menu.
3270     (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
3271     build the menu bar and sub-menus from a menu description.
3272    
3273     * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
3274     startup file
3275     (ThubanApplication.read_startup_files): New method to run
3276     ~/.thuban/thubanstart.py
3277    
3278 bh 192 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
3279     Move the toolbar definition to the Menu instance main_toolbar.
3280     (MainWindow.build_toolbar): New method to build the toolbar
3281     similar to the build_menu methods
3282    
3283 bh 184 2002-05-23 Bernhard Herzog <[email protected]>
3284    
3285 bh 186 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
3286     layer_outline_color. Fix it in the definition of the command too.
3287    
3288 bh 184 * Thuban/UI/command.py (Command): Fix typo in doc string
3289    
3290 bh 182 2002-05-22 Bernhard Herzog <[email protected]>
3291    
3292     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
3293     in the docstring
3294    
3295 bh 175 2002-05-15 Bernhard Herzog <[email protected]>
3296    
3297 bh 180 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
3298     when the shapefile is empty.
3299     (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
3300     now return None for empty shapefiles. Update doc-strings.
3301    
3302     * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
3303     the layer's bbox being None.
3304    
3305     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
3306     layer's bbox being None.
3307    
3308 bh 175 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
3309     necessary.
3310     (MapCanvas.__init__): New instance variables, last_selected_layer
3311     and last_selected_shape to determine how the selection has
3312     changed.
3313    
3314     * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
3315     AutoSizeColumns because it will cause a traversal of the entire
3316     table which for large .dbf files will take a very long time.
3317    
3318 bh 172 2002-05-14 Bernhard Herzog <[email protected]>
3319    
3320     * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
3321     maximum depth for the tree than shapelib does by default.
3322    
3323 bh 165 2002-05-10 Bernhard Herzog <[email protected]>
3324    
3325     * setup.py (py_modules): The shptree modules doesn't have a
3326     wrapper, so don't include it in the py_modules
3327    
3328 bh 163 2002-05-08 Bernhard Herzog <[email protected]>
3329    
3330     * extensions/shapelib/shptree.c (compare_ints): Make arguments
3331     const void * as in the qsort prototype
3332     (SHPTreeFindLikelyShapes): Remove some unused variables.
3333    
3334     * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
3335     maintains to redraw the window during a drag.
3336     (MapCanvas.unprojected_rect_around_point): New method to determine
3337     a small region around a point for hit-testing.
3338     (MapCanvas.find_shape_at): Only test the shapes in a small region
3339     around the point.
3340    
3341     * setup.py: Increment the version to 0.1.2
3342    
3343     * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
3344     debug print and set session to None after unsubscribing
3345    
3346 bh 146 2002-05-07 Bernhard Herzog <[email protected]>
3347    
3348 bh 154 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
3349     the file to have a .thuban extension.
3350    
3351 bh 152 * Thuban/UI/tree.py (session_channels): New class constant with
3352     all the session channels to subscribe to to update the tree
3353     (SessionTreeCtrl.session_changed): Remember the session so that we
3354     can unsubscribe properly. Use the new class constant to
3355     unsubscribe from the old session and subscribe to the new one.
3356     (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
3357     subscriptions of the SessionTreeCtrl.
3358     (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
3359    
3360     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
3361     Session Tree" command to the file menu.
3362    
3363     * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
3364     as update_region to the renderer.
3365    
3366     * Thuban/UI/renderer.py
3367     (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
3368     update box is now directly a tuple, not a wxRect anymore.
3369    
3370     * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
3371     prints.
3372    
3373     2002-05-07 Bernhard Herzog <[email protected]>
3374    
3375 bh 146 * setup.py: Add the shptree extension module. See
3376     extensions/pyshapelib/ChangeLog for more details.
3377    
3378     * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
3379     extensions/shapelib/dbfopen.c: Really update to the versions of
3380     shapelib 1.2.9. For some reason it wasn't really done on
3381     2002-04-11.
3382    
3383     * extensions/shapelib/shptree.c: Modified version of shptree.c of
3384     shapelib 1.2.9. The only real difference is the use of qsort
3385     instead of a bubble sort implementation
3386    
3387     * Thuban/Model/layer.py (Layer.__init__): New instance variable
3388     shapetree to hold the shapelib quadtree for the shapefile
3389     (Layer.open_shapefile): Create the quad tree.
3390     (Layer.ShapesInRegion): New method to return the ids of shapes in
3391     a given region using the quad tree.
3392    
3393     * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
3394     comment
3395     (draw_polygon_shape): Accept both arcs and polygons.
3396     (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
3397     the api.
3398    
3399     * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
3400     return the shape ids to be rendered in a given layer.
3401     (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
3402     ids. Use draw_polygon_shape to draw arc shapes as well.
3403     (ScreenRenderer.RenderMap): New parameter for the rectangle that
3404     has to be updated
3405     (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
3406     calling it's ShapesInRegion method.
3407    
3408     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
3409     update_region for the update region.
3410     (MapCanvas.OnPaint): Maintain the update region
3411     (MapCanvas.do_redraw): Pass the bounding box of the update_region
3412     to the renderer when drawing the bitmap. Reset the update_region.
3413    
3414 bh 129 2002-05-03 Bernhard Herzog <[email protected]>
3415    
3416 bh 131 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
3417     MainWindow.OpenSession): Change the file extension of the session
3418     files to .thuban
3419    
3420 bh 129 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
3421     Move the map channels to be forwarded by the session into the
3422 bh 146 class constant with forwarded_channels. Also add
3423     LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
3424     forwarded_channels
3425 bh 129
3426     * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
3427     typo and some rewording).
3428    
3429 bh 126 2002-05-02 Bernhard Herzog <[email protected]>
3430    
3431     * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
3432     around to speed up most redraws:
3433     (MapCanvas.__init__): New instance variable bitmap which holds the
3434     bitmap
3435     (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
3436     self.bitmap to draw.
3437     (MapCanvas.full_redraw): New method to force a full redraw
3438     including the bitmap
3439     (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
3440     make sure the bitmap is redrawn.
3441     (MapCanvas.projection_changed, MapCanvas.set_view_transform,
3442     MapCanvas.shape_selected): Call full_redraw instead of readraw to
3443     make sure the bitmap is redrawn.
3444     (MapCanvas.OnSize): New method to handle size events so that the
3445     bitmap can be redrawn.
3446    
3447 bh 124 2002-04-29 Bernhard Herzog <[email protected]>
3448    
3449     * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
3450     canvas' VIEW_POSITION event
3451     (MainWindow.view_position_changed): Handler for VIEW_POSITION.
3452     Update the text in the status-bar accordingly.
3453    
3454     * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
3455     (MapCanvas.__del__): Implement because Publisher.__del__ has to be
3456     called.
3457     (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
3458     current_position
3459     (MapCanvas.set_current_position): New method to set
3460     current_position. Issue a VIEW_POSITION event
3461     (MapCanvas.CurrentPosition): New public method to return the value
3462     of current_position. Should be called when the VIEW_POSITION event
3463     is processed.
3464     (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
3465     Update the position.
3466     (MapCanvas.OnLeaveWindow): Set the position to None.
3467    
3468     * Thuban/UI/messages.py (VIEW_POSITION): New message for the
3469     position in the statusbar
3470    
3471 tkoester 403 2002-04-26 Frank Koormann <[email protected]>
3472 frank 120
3473     * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
3474    
3475 tkoester 403 2002-04-24 Frank Koormann <[email protected]>
3476    
3477 frank 118 * Resources/Bitmaps/identify.xpm: shadow added
3478    
3479     * Resources/Bitmaps/fullextent.xpm: new
3480 jan 116
3481 tkoester 403 2002-04-22 Jan-Oliver Wagner <[email protected]>
3482 jan 116
3483 tkoester 403 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
3484     box
3485 jan 114
3486 tkoester 403 2002-04-21 Jan-Oliver Wagner <[email protected]>
3487    
3488 jan 114 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
3489    
3490     * Thuban/UI/tree.py (update_tree): added added map extent
3491    
3492     * Thuban/UI/mainwindow.py (_method_command): extended by parameter
3493 tkoester 403 icon; added map_full_extend as tool
3494 jan 114
3495 tkoester 403 2002-04-19 Jan-Oliver Wagner <[email protected]>
3496 jan 107
3497     * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
3498     saving _new_ sessions
3499    
3500     * Thuban/Model/session.py (create_empty_session): new session
3501     don't have a filename (set to None)
3502    
3503     * Thuban/UI/tree.py (update_tree): added filename and modified flag
3504    
3505     * Thuban/Model/load.py (ProcessSession): convert projection
3506     parameters from unicode to regular string
3507    
3508     * Data/iceland_sample.session: Added UTM Zone 26 projection.
3509    
3510 bh 100 2002-04-11 Bernhard Herzog <[email protected]>
3511    
3512     * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
3513     extensions/shapelib/dbfopen.c: Update to the versions of shapelib
3514     1.2.9
3515    
3516     * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
3517     the pyshapelib directoy into the list of include dirs, so that
3518     pyshapelib_api.h can be found.
3519    
3520     * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
3521     holds the pyshapelib C-API
3522     (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
3523     pyshapelib_api to access the shapelib functions.
3524     (initwxproj): Import the c_api from the shapelib module and
3525     initialize pyshapelib_api.
3526    
3527 bh 89 2002-04-04 Bernhard Herzog <[email protected]>
3528    
3529 bh 91 * setup.py (thuban_bdist_rpm.initialize_options): Use
3530     initialize_options to create the scripts for the rpm.
3531    
3532 bh 89 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
3533    
3534 bh 85 2002-04-03 Bernhard Herzog <[email protected]>
3535    
3536 bh 87 * setup.py: Increment version to 0.1.1
3537    
3538 bh 85 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
3539     Layer" and "Remove Layer" commands from the layer menu to the map
3540     menu
3541    
3542 bh 83 2002-02-15 Bernhard Herzog <[email protected]>
3543    
3544     * Thuban/Model/layer.py (Layer.Shape): list append only takes one
3545     argument (python <= 1.5.2 erroneously accepted multiuple
3546     arguments)
3547    
3548 bh 81 2002-02-04 Bernhard Herzog <[email protected]>
3549    
3550     * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
3551     RecordGrid in the identifyview.
3552     (IdentifyView.__init__): Use IdentifyGridCtrl instead of
3553     IdentifyListCtrl. The grid allows editing of the values.
3554    
3555     * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
3556     implementing a grid for a single row of a thuban table.
3557    
3558     * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
3559     layers by default. Easier to use than the previous default of only
3560     searching through the select layer which meant that if no layer
3561     was selected, you couldn't select a shape.
3562    
3563     * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
3564    
3565     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
3566     stroke_width attribute
3567    
3568     * Thuban/Model/save.py (save_session): Write the new stroke_width
3569     attribute
3570    
3571     * Thuban/Model/load.py (ProcessSession.startElement): Read the
3572     stroke_width attribute
3573    
3574     * Thuban/Model/layer.py (Layer.__init__): New parameter and
3575     instance variable stroke_width
3576     (Layer.SetStrokeWidth): Set the stroke_width.
3577    
3578 bh 72 2002-02-01 Bernhard Herzog <[email protected]>
3579    
3580     * extensions/thuban/wxproj.cpp (project_points): Fix two
3581     off-by-one errors in the last loop that joins the various parts
3582     together.
3583    
3584 bh 71 2002-01-14 Bernhard Herzog <[email protected]>
3585    
3586     * setup.py (data_dist.make_distribution): Fix some typos
3587    
3588 bh 70 2001-09-18 Bernhard Herzog <[email protected]>
3589    
3590     * README: Slight tweaking in preparation for the 0.1 release
3591    
3592     * setup.cfg: Add section for sdist to create both tgz and zip
3593     archives
3594    
3595     * setup.py: increase version number to 0.1
3596     (data_dist): New command class for data distribution
3597    
3598 bh 64 2001-09-14 Bernhard Herzog <[email protected]>
3599    
3600 bh 70 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
3601     Handle the case of no layer (i.e. layer is None) properly.
3602    
3603 tkoester 403 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
3604 bh 70 Set the initial selection of the combo boxes to reflect the
3605     projection we're starting with in a way that works on windows,
3606     too.
3607    
3608 bh 64 * Thuban/Lib/connector.py (Connector.print_connections): Print the
3609     puiblisher's ids in hex to make it easier to compare them to the
3610     standard repr of python methods
3611    
3612     * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
3613     messages
3614    
3615 bh 59 2001-09-13 Bernhard Herzog <[email protected]>
3616    
3617 bh 64 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
3618     deselect the layer if no layer is selected
3619    
3620 bh 59 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
3621     idle time when there actually is something to draw. If there's
3622     nothing to draw simply clear the window
3623     (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
3624     (MapCanvas.SetMap): force a redraw in all cases because
3625     FitMapToWindow doesn't always do it.
3626     (MapCanvas.ZoomFactor): Add an optional parameter, center, to
3627     specify the point to move into the center of the window
3628     (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
3629     dragged, zoon in/out by a factor of 2
3630 bh 64 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
3631     index, i.e. reversed drawing order) so that objects appearing to
3632     be in from of others are selected first. This is probably mostly
3633     relevant for point shapes where the symbols used may overlap
3634 bh 59
3635     * Thuban/Model/session.py (create_empty_session): Unset the
3636     modified bit before returning it
3637    
3638     * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
3639     create_empty_session session to create the new, empty session.
3640    
3641     * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
3642     the tool bitmaps.
3643     (MainWindow.OnClose, MainWindow.save_modified_session): Separate
3644     the code that asks whether the session should be saved into the
3645     new method save_modified_session.
3646     (MainWindow.OpenSession, MainWindow.NewSession): Use the new
3647     method to save modified session here too.
3648    
3649 bh 55 2001-09-11 Bernhard Herzog <[email protected]>
3650    
3651     * setup.py (InnoIconItem): fix typo
3652    
3653     (thuban_bdist_inno.run):
3654     (bdist_inno.run): Move the decision not to create symlinks on
3655     non-nt platforms to thuban_bdist_inno and do it unconditinally
3656     since we never want to create the symlinks here
3657    
3658 bh 48 2001-09-10 Bernhard Herzog <[email protected]>
3659    
3660 bh 53 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
3661     identify view immediately
3662    
3663     * Thuban/UI/controls.py: New file with two classes RecordListCtrl
3664     and SelectableRecordListCtrl that implement the code shared by the
3665     identify view and the label dialog
3666    
3667     * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
3668     new class RecordListCtrl
3669    
3670     * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
3671     return value of GetValue is None instead of using it as a boolean
3672     directly so that Zero numbers are handled properly.
3673     (LabelListCtrl): Derive from the new class
3674     SelectableRecordListCtrl
3675    
3676 bh 48 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
3677     (Proj4Dialog.dialogLayout): Make the window resizable and set the
3678     size of the text control explicitly to make the sizers work on
3679     both Windows and X.
3680    
3681 bh 44 2001-09-07 Bernhard Herzog <[email protected]>
3682    
3683     * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
3684     that can limit the search to the currently selected layer.
3685     (MapCanvas.SelectShapeAt): Make sure that the currently selected
3686     layer stays selected even when no shape is found
3687 bh 46 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
3688     height do nothing (avoids zero division errors)
3689 bh 44
3690 bh 32 2001-09-06 Bernhard Herzog <[email protected]>
3691    
3692 bh 42 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
3693     Correct the spelling of SessionTreeCtrl. dabbrev is too damn
3694     convenient :-)
3695     (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
3696     a new instvar layer_to_item to map layers to tree items
3697     (SessionTreeCtrl.layer_selected): Select the appropriate tree item
3698     to match the current selection in the interactor
3699    
3700 bh 40 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
3701     (Interactor.HasSelectedLayer): New methods to query the current
3702     selection
3703    
3704     * Thuban/UI/mainwindow.py (MainWindow.current_layer):
3705     (MainWindow.has_selected_layer): Simply call the appropriate
3706     interactor method
3707    
3708     * Thuban/UI/mainwindow.py (MainWindow.__init__):
3709     (MainWindow.LayerShowTable):
3710     (MainWindow.identify_view_on_demand): Store the interactor in an
3711     instvar and use that reference instead of going through main.app
3712    
3713 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
3714     * Thuban/UI/application.py (ThubanApplication.OnInit):
3715 bh 40 * Thuban/UI/main.py (main): Create the session tree view in main
3716     with the new mainwindow method ShowSessionTree and not directly
3717     the application's OnInit method
3718    
3719     * Thuban/UI/tree.py (myTreeCtrlPanel):
3720     (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
3721     TreeCtrl isntead of a panel. This affects most method since we now
3722     refer to self instead of self.tree
3723     (SessionTreeView): New class implementing a non-modal dialog
3724     showing the session tree.
3725    
3726 bh 35 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
3727     layer to the tableview dialog.
3728    
3729     * Thuban/UI/tableview.py: Add some doc-strings
3730 tkoester 403 (TableGrid):
3731 bh 35 (TableGrid.OnRangeSelect):
3732     (TableGrid.OnSelectCell):
3733     (TableFrame.__init__):
3734     (TableFrame.row_selected):
3735     Selecting rows in the grid view now updates the selected shapes
3736     through the TableFrame. To achieve this we derive TableGrid from
3737     Publisher and introduce the message type ROW_SELECTED which the
3738     TableFrame subscribes to and which is issued by OnRangeSelect and
3739     OnSelectCell
3740    
3741     (DataTable.SelectRow): Removed because it's no longer needed in
3742     the row/shape selection scheme
3743    
3744 bh 32 * Thuban/UI/dialogs.py: New file implementing common classes for
3745     dialogs
3746    
3747     * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
3748     the SELECTED_SHAPE message anymore. This is now handled by the
3749     parent.
3750     (TableGrid.select_shape): Only update the selection if the shape
3751     is not None.
3752     (TableFrame): Inherit from the new NonModalDialog class.
3753     (TableFrame.__init__, TableFrame.select_shape): Handle the
3754     SELECT_SHAPE message.
3755     (TableFrame.OnClose): Extend the inherited method to unsubscribe
3756     SELECT_SHAPE
3757    
3758     * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
3759     (MainWindow.add_dialog):
3760     (MainWindow.dialog_open):
3761     (MainWindow.remove_dialog):
3762     (MainWindow.get_open_dialog): New methods to maintain a dictionary
3763     of opened non-modal dialogs.
3764    
3765     (MainWindow.__init__): Initialize the new non-modal dictionary
3766     management code
3767     (MainWindow.LayerShowTable): maintain separate dialogs for each
3768     table using the non-modal dialog management code to only open a
3769     view once for each table.
3770    
3771     (MainWindow.IdentifyTool):
3772     (MainWindow.__init__):
3773     (MainWindow.identify_view_on_demand): Don't open the identify view
3774     in IdentifyTool anymore. This will be done automatically by the
3775     new method identify_view_on_demand which handles the
3776     SELECTED_SHAPE message so that the identify view will be opened on
3777     demand
3778    
3779     * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
3780     the interactor argument. The SELECTED_SHAPE message is now handled
3781     by the parent.
3782     (IdentifyView.__init__): Add the interactor argument so that we
3783     can handle the SELECTED_SHAPE message here
3784     (IdentifyView.selected_shape): New method to handle the
3785     SELECTED_SHAPE messages
3786    
3787     * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
3788     NonModalDialog class
3789     (IdentifyView.OnClose): Extend the inherited version to
3790     unsubscribe SELECT_SHAPE
3791    
3792     * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
3793    
3794 bh 26 2001-09-05 Bernhard Herzog <[email protected]>
3795    
3796     * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
3797 tkoester 403
3798 bh 26 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
3799     interactor to pass through to the MapCanvas
3800 tkoester 403
3801 bh 26 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
3802     argument to the MainWindow constructor to get rid of the ugly hack
3803     that made main.app available early just so that the mapcanvas
3804     could access the interactor object.
3805    
3806 bh 19 2001-09-04 Bernhard Herzog <[email protected]>
3807    
3808 bh 22 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
3809     that runs a modal message box
3810     (MainWindow.OnClose): Use the new method
3811     (MainWindow.RemoveLayer): Just do nothing in case no layer is
3812     selected. The command should be grayed out anyway, so there's no
3813     need to pop up a message box.
3814     (MainWindow.AddLayer): Pop up a message box with an error message
3815     if the shape file can't be opened
3816    
3817     * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
3818     immediately. This will cause an exception in case the file can't
3819     be opened and we can display an appropriate message.
3820    
3821 bh 19 * MANIFEST.in: Add extensions/pyprojection/LICENSE
3822    
3823     * setup.py (thuban_bdist_rpm): New class implementing a Thuban
3824     specific bdist_rpm command.
3825    
3826     * Thuban/UI/main.py: Catch ImportError exceptions when importing
3827     the locale module because it may not be available on some
3828     installations.
3829    
3830     * extensions/pyprojection/LICENSE: Copy of the license text in
3831     Projection.i. Having it in a separate file makes it easier to
3832     refer to license text in e.g. RPMs
3833    
3834 bh 18 2001-09-03 Bernhard Herzog <[email protected]>
3835    
3836 bh 19 * setup.py: use wx-config instead of wxgtk-config because it's
3837     more generic
3838    
3839     * setup.py (ThubanInstall.get_outputs): Add the symlink in
3840     <prefix>/bin to the outputs
3841     (ThubanInstall.link_file): New method to link files. We need this
3842     because the standard copy_files refuses to link non-existing
3843     files.
3844     (ThubanInstall.run): Remove the leading install root from the
3845     script filename if an install root was specified and use the new
3846     link_file method
3847 tkoester 403
3848 bh 18 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
3849     the window when the first layer is added to the map.
3850    
3851     * setup.py (ThubanInstall.run): Honor the build root (self.root)
3852     when linking thuban.py to <prefix>/bin
3853    
3854 bh 16 2001-08-31 Bernhard Herzog <[email protected]>
3855    
3856     * setup.py: In the setup call, the install parameters shouldn't
3857     have trailing slashes because distutils on non-posix platforms
3858     doesn't like that. The same applies to other directories like
3859     "Resources/Bitmaps"
3860    
3861     In the configuration section for nt, move the wxWindows directory
3862     optins into the part clearly marked as editable.
3863    
3864     (InstallLocal.initialize_options):
3865     (InstallLocal.user_options): remove the currently unused debug
3866     flag
3867     (thuban_build_py.find_all_modules): Add this method so that it
3868     works for our case of having packages and modules in one
3869     distribution as well.
3870     (ThubanInstall.initialize_options):
3871     (ThubanInstall.finalize_options):
3872     (ThubanInstall.user_options):
3873     (ThubanInstall.boolean_options): Add new options, do-symlink and
3874     extra files. Since these are the first ThubanInstall specific
3875     options, override user_options and boolean_options
3876     (ThubanInstall.run): Honor the new do-symlink and extra-files
3877     options.
3878     (ThubanInstall.get_outputs): Add to override the base-class's
3879     version and add the extra-files to the outputs
3880     (bdist_inno): New class for windows distributions with Inno Setup
3881     (InnoIconItem): Helper class for bdist_inno
3882     (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
3883     this together with the appropriate parameters, to the setup call.
3884 tkoester 403
3885 bh 16 * setup.cfg (bdist_inno): added new section for the inno setup
3886     installer
3887    
3888     * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
3889     changing_selection to avoid recursive selection events when
3890     modifying the selection in response to a selection event.
3891     (myTreeCtrlPanel.normalize_selection): Set the new inst var when
3892     changing the tree's selection.
3893     (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
3894     we're not being called indirectly from normalize_selection.
3895    
3896     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
3897     event.Check only if the command is actuall checkable.
3898     (MainWindow.__init__): Call the toolbar's Realize method to make
3899     sure that the items are actually shown
3900    
3901 bh 7 2001-08-28 Bernhard Herzog <[email protected]>
3902    
3903 bh 9 * setup.py: Fix some doc strings
3904    
3905 bh 7 * ChangeLog: started
3906    

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26