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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1024 - (hide annotations)
Fri May 23 14:20:52 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/ChangeLog
File size: 155249 byte(s)
two small GUI fixes

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26