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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1033 - (hide annotations)
Mon May 26 15:33:51 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/ChangeLog
File size: 156268 byte(s)
two small GUI improvements

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26