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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 247 by bh, Mon Jul 29 13:38:13 2002 UTC revision 860 by frank, Thu May 8 10:41:36 2003 UTC
# Line 1  Line 1 
1    2003-05-08  Frank Koormann <[email protected]>
2    
3            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
4            Initialize ScaleBar with canvas.map
5    
6            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
7            round intervals to display smarter lengths
8            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
9            layer. If the maps has no projection applied grey the scalebar.
10    
11    2003-05-07  Frank Koormann <[email protected]>
12            
13            Basic Scalebar features added.
14    
15            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
16    
17            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
18            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
19            and the renderer.
20    
21            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
22    
23            * Thuban/UI/messages.py: SCALE_CHANGED added.
24    
25    2003-05-07  Bernhard Herzog  <[email protected]>
26    
27            * Thuban/Model/session.py (Session.__init__): New instance
28            variable shapestores to hold a list of all open shapestore objects
29            (Session.ShapeStores): New. Accessor method for the shapestores
30            list.
31            (Session._add_shapestore, Session._clean_weak_store_refs): New.
32            Internal methods to maintain the shapestores list.
33            (Session.Tables): New. Return all tables open in the session.
34            (Session.OpenShapefile): Insert the new ShapeStore into the
35            shapestores list.
36    
37            * test/test_session.py (TestSessionSimple.test_initial_state): Add
38            tests for ShapeStores and Tables
39            (TestSessionWithContent.test_shape_stores)
40            (TestSessionWithContent.test_tables): New. Test cases for
41            ShapeStores and Tables
42    
43    2003-05-07  Bernhard Herzog  <[email protected]>
44    
45            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
46            Add comments about the optimizations used.
47            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
48            Implement the ReadValue table interface method.
49    
50            * test/test_transientdb.py
51            (TestTransientTable.run_iceland_political_tests)
52            (TestTransientTable.test_transient_joined_table): Add tests for
53            ReadValue
54    
55    2003-05-07  Frank Koormann <[email protected]>
56    
57            * Resources/Bitmaps/fulllayerextent.xpm,
58            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
59            new icons.
60    
61    2003-05-06  Bernhard Herzog  <[email protected]>
62    
63            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
64            New. Simply delegate to the transient table's version.
65    
66            * test/test_transientdb.py
67            (TestTransientTable.test_auto_transient_table_query): New. Test
68            case for AutoTransientTable's SimpleQuery
69    
70    2003-05-06  Bernhard Herzog  <[email protected]>
71    
72            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
73            Implement a simple query method for the query dialog
74            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
75            the row index or shapeid.
76            (TransientTable.create): Insert the right value of the row index
77            (TransientJoinedTable.create): Copy the row index of the left
78            table to the joined result table
79    
80            * test/test_transientdb.py
81            (TestTransientTable.test_transient_table_read_twice): Fix
82            doc-string
83            (TestTransientTable.test_transient_table_query): New. Test for the
84            SimpleQuery method
85    
86    2003-05-06  Bernhard Herzog  <[email protected]>
87    
88            Convert all table users to use the new table interface. This only
89            covers Thuban itself, not GREAT-ER or other applications built on
90            Thuban yet, so the compatibility interface stays in place for the
91            time being but it now issues DeprecationWarnings.
92    
93            Finally, the new Table interface has a new method, HasColumn.
94    
95            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
96            issue deprecation warnings when they're. The warnings refer to the
97            caller of the method.
98            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
99            for the deprecation warnings
100    
101            * test/test_table.py: Ignore the deprecation warnings for the old
102            table in the tests in this module. The purpose of the tests is to
103            test the old interface, after all.
104    
105            * test/test_transientdb.py
106            (TestTransientTable.run_iceland_political_tests): Use the
107            constants for the types. Add a test for HasColumn
108            (TestTransientTable.test_transient_joined_table): Adapt to new
109            table interface. Add a test for HasColumn
110            (TestTransientTable.test_transient_table_read_twice): Adapt to new
111            table interface
112    
113            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
114            Adapt to new table interface
115    
116            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
117            new table interface
118    
119            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
120            (RecordTable.SetTable): Adapt to new table interface
121    
122            * Thuban/UI/classifier.py (Classifier.__init__)
123            (Classifier.__init__): Adapt to new table interface
124    
125            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
126            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
127            to new table interface
128    
129            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
130            (AutoTransientTable.HasColumn): Implement the new table interface
131            method
132            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
133            (AutoTransientTable.UniqueValues): Adapt to new table interface
134    
135            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
136            Adapt to new table interface
137    
138            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
139            simplify opening shapefiles a bit easier.
140            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
141            (TestLayer.test_point_layer): Use the new helper method
142            (TestLayer.test_get_field_type): New. Test for the GetFieldType
143            method
144    
145            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
146            the new table method
147    
148            * test/test_memory_table.py (TestMemoryTable.test_has_column):
149            Test for the new table method HasColumn
150    
151    2003-05-06  Jonathan Coles   <[email protected]>
152    
153            Addresses the "Selection Extent" wish of RTbug #1787.
154    
155            * Resources/Bitmaps/fulllayerextent.xpm,
156            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
157            extent. These are just place holders for the real bitmaps.
158    
159            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
160            calculate the bounding box once (the first time compute_bbox() is
161            called).
162            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
163            the bounding box for the shapes in lat/long coordinates.
164    
165            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
166            option.
167            (MainWindow.has_selected_shapes): New. Returns true if there are
168            any selected shapes.
169            (MainWindow.FullSelectionExtent): New. Calls
170            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
171            (_has_selected_shapes): New. Returns true if there are any
172            selected shapes.
173    
174            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
175            true if there are any selected shapes.
176    
177            * Thuban/UI/view.py (MapCanvas): Added delegated method
178            HasSelectedShapes.
179            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
180            shapes on the canvas using the map projection (if any).
181    
182            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
183            for Layer.ShapesBoundingBox().
184    
185    2003-05-06  Bernhard Herzog  <[email protected]>
186    
187            * Resources/Projections/defaults.proj: Fix spelling of Mercator
188    
189    2003-05-05  Jonathan Coles   <[email protected]>
190    
191            Addresses the "Full Layer Extent" wish of RTbug #1787.
192    
193            * Resources/Projections/defaults.proj: Added UK National Grid.
194    
195            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
196            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
197            when the user selects the menu option.
198    
199            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
200            scales the given layer on the canvas using the map projection.
201    
202    2003-05-05  Bernhard Herzog  <[email protected]>
203    
204            Convert the table implementations to a new table interface. All
205            tables use a common mixin class to provide backwards compatibility
206            until all table users have been updated.
207    
208            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
209            provide backwards compatibility for table classes implementing the
210            new interface
211            (DBFTable, MemoryTable): Implement the new table interface. Use
212            OldTableInterfaceMixin as base for compatibility
213            (DBFColumn, MemoryColumn): New. Column description for DBFTable
214            and MemoryTable resp.
215    
216            * test/test_dbf_table.py: New. Test cases for the DBFTable with
217            the new table interface.
218    
219            * test/test_memory_table.py: New. Test cases for the MemoryTable
220            with the new table interface.
221    
222            * test/test_table.py: Document the all tests in this file as only
223            for backwards compatibility. The equivalent tests for the new
224            interface are in test_memory_table.py and test_dbf_table.py
225            (MemoryTableTest.test_read): field_info should be returning tuples
226            with four items
227            (MemoryTableTest.test_write): Make doc-string a more precise.
228    
229            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
230            table interface. Derive from from OldTableInterfaceMixin for
231            compatibility.
232            (TransientTableBase.create): New intance variable column_map to
233            map from names and indices to column objects
234            (TransientTable.create): Use the new table interface of the input
235            table
236            (AutoTransientTable): Convert to new table interface. Derive from
237            from OldTableInterfaceMixin for compatibility.
238            (AutoTransientTable.write_record): Removed. It's not implemented
239            yet and we still have to decide how to handle writing with the new
240            table and data framework.
241    
242            * test/test_transientdb.py
243            (TestTransientTable.run_iceland_political_tests)
244            (TestTransientTable.test_transient_joined_table): Use the new
245            table interface
246    
247    2003-05-05  Jonathan Coles   <[email protected]>
248    
249            This is namely a collection of UI updates to improve user interactivity.
250            Tabbing between controls now exists and you can use ESC to close dialog
251            boxes; ENTER will active the default button.
252    
253            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
254            order that the controls are created so that tabbing works correctly.
255            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
256            wxDialog can handle the default button correctly.
257            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
258            same reasons as for OnOK.
259            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
260            when we ask the table for the maximum/minimum values of a field
261            which could take a very long time.
262    
263            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
264            order that the controls are created so that tabbing works correctly.
265            (SelectPropertiesDialog.__init__): Rearrange the order that the
266            controls are created so that tabbing works correctly.
267    
268            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
269            to derive from a wxDialog but behave like the original implementation
270            which was derived from a wxFrame. wxDialog provides useful key
271            handling functionality like ESC calling OnCancel and ENTER calling
272            OnOK which is lost with wxFrame.
273    
274            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
275            new dialogs.
276    
277            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
278            order that the controls are created so that tabbing works correctly.
279            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
280            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
281            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
282            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
283            can provide the "UK National Grid" as a default projection.
284            (UTMPanel.__init__): Rearrange the order that the controls are
285            created so that tabbing works correctly.
286    
287    2003-05-05  Bernhard Herzog  <[email protected]>
288    
289            * extensions/thuban/wxproj.cpp: Fix some of the comments.
290            (project_point): If a map projection but no layer projection is
291            given, convert degrees to radians before applying the map
292            projection.
293    
294            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
295            (TableGrid.allow_messages): New methods to make it possible to
296            inhibit message sending.
297            (TableGrid.issue): Only send the message if not inhibited.
298            (LayerTableGrid.select_shape): Use the new methods to make sure
299            that no ROW_SELECTED message is sent while we're updating the
300            selected rows to match the selected shapes.
301    
302    2003-05-02  Jan-Oliver Wagner <[email protected]>
303    
304            Implementation of MemoryTable.
305    
306            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
307            implementation that operates on a list of tuples. All of the data
308            are kept in the memory.
309    
310            * test/test_table.py (MemoryTableTest): New.
311    
312            * test/test_transientdb.py (SimpleTable): Removed.
313            (TestTransientTable.test_transient_joined_table,
314            (TestTransientTable.test_transient_table_read_twice): Replaced
315            SimpleTable by MemoryTable.
316    
317    2003-04-30  Jonathan Coles   <[email protected]>
318    
319            * Data/iceland_sample.thuban: Now contains correct projections
320            for each of the layers.
321    
322            * Resources/Projections/defaults.proj: Geographic projection
323            contains unit conversion parameter.
324    
325    2003-04-30  Jonathan Coles   <[email protected]>
326    
327            The most important part of this putback is the projection changes.
328            It should now be possible to specify the projection that a layer
329            is in and then specify a different projection for the map. The
330            projection dialog has an extra parameter for a geographic projection
331            which lets the user select if the input is in degrees or radians.
332    
333            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
334            to say that the parameter is a tuple of unprojected
335            points (which is what the callers to this method were assuming).
336            Also, since the points are unprojected we need to projected them.
337    
338            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
339            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
340            groups are selected, move the layer up/down. Fixes RTbug #1833.
341    
342            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
343    
344            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
345            parameter in call to SetClientData.
346            (GeoPanel): Add support for selecting the units that the
347            source data is in (Radians or Degrees).
348    
349            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
350            the rendering loop by reducing the number of if's, removing the
351            unnecessary try/except block, and checking if the old group
352            is the same as the new one (which happens a lot if there is
353            no classification, or lots of shapes are in the same group).
354    
355            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
356            around the redraw routine to try to catch problems that the user
357            may create by selecting invalid projections for the data set and
358            map. Clears the display if there are any problems and prints the
359            error.
360            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
361            rectangle.
362    
363            * extensions/thuban/wxproj.cpp (project_point): First invert the
364            supplied point (which should be in projected coordinates) using
365            the layer's projection and then project the point using the
366            map's projection.
367            (project_points): Use project_point() to project each point.
368    
369    2003-04-30  Jan-Oliver Wagner <[email protected]>
370    
371            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
372            don't set the Classification to None if the classfication field
373            is None (ie only a DEFAULT).
374    
375    2003-04-30  Bernhard Herzog  <[email protected]>
376    
377            * Thuban/UI/view.py: Fix some typos.
378    
379            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
380            not pop up the dialog if the selection becomes empty (this could
381            happen if e.g. a new selection is opened while the identify tool
382            is active and dialog had been closed)
383    
384    2003-04-30  Bernhard Herzog  <[email protected]>
385    
386            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
387            instance variable read_record_last_result
388            (TransientTableBase.read_record): Make sure reading the same
389            record twice works. The implementation uses the new instance
390            variable read_record_last_result
391    
392            * test/test_transientdb.py
393            (TestTransientTable.test_transient_table_read_twice): New test
394            case for the above bug-fix.
395    
396    2003-04-29  Jonathan Coles   <[email protected]>
397    
398            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
399    
400            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
401    
402            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
403            (ClassTable.SetValueAsCustom): Rename keyword argument in
404            ClassGroup* constructors to match argument name.
405    
406    2003-04-29  Bernhard Herzog  <[email protected]>
407    
408            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
409            transient DB if it exists to make sure it doesn't leave a journal
410            file in the temp directory.
411    
412            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
413            self.conn to None after closing the connection to make sure it's
414            not closed twice
415    
416    2003-04-29  Jonathan Coles   <[email protected]>
417    
418            Add a visible parameter in the layer XML tag. The default value is
419            "true". If anything other than "false" is specified we also assume
420            "true". Addresses RTbug #1025.
421    
422            * Doc/thuban.dtd: Add visible parameter to a layer.
423    
424            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
425            of visible from 1 to True.
426            (Layer.__init__): Change default value of visible from 1 to True.
427    
428            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
429            parameter.
430    
431            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
432            parameter.
433    
434            * test/test_load.py: Add new test data contents_test_visible.
435            (LoadSessionTest.setUp): save test data.
436            (LoadSessionTest.testLayerVisibility): Test if the visible flag
437            is loaded correctly.
438    
439            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
440            for saving an invisible layer.
441    
442    2003-04-29  Jonathan Coles   <[email protected]>
443    
444            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
445            legend dialog box and tell it to change its map to the one
446            supplied to SetMap(). Fixes RTbug #1770.
447    
448    2003-04-29  Bernhard Herzog  <[email protected]>
449    
450            Next step of table implementation. Introduce a transient database
451            using SQLite that some of the data is copied to on demand. This
452            allows us to do joins and other operations that require an index
453            for good performance with reasonable efficiency. Thuban now needs
454            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
455            haven't tested that.
456            
457            * Thuban/Model/transientdb.py: New. Transient database
458            implementation.
459    
460            * test/test_transientdb.py: New. Tests for the transient DB
461            classes.
462    
463            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
464            classes to help automatically remove temporary files and
465            directories.
466            (Session.__init__): New instance variables temp_dir for the
467            temporary directory and transient_db for the SQLite database
468            (Session.temp_directory): New. Create a temporary directory if not
469            yet done and return its name. Use AutoRemoveDir to have it
470            automatically deleted
471            (Session.TransientDB): Instantiate the transient database if not
472            done yet and return it.
473    
474            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
475            AutoTransientTable so that data is copied to the transient DB on
476            demand.
477            (SimpleStore): New class that simply combines a table and a
478            shapefile
479    
480            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
481            DBFTable and update its doc-string to reflect the fact that this
482            is only the table interface to a DBF file. Table is now an alias
483            for DBFTable for temporary backwards compatibility.
484    
485            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
486            the last reference to the session goes away so that the temporary
487            files are removed properly.
488    
489            * test/test_load.py (LoadSessionTest.tearDown): Remove the
490            reference to the session to make sure the temporary files are
491            removed.
492    
493    2003-04-29  Bernhard Herzog  <[email protected]>
494    
495            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
496            the __parser instance variable into a normal local variable in
497            read. It's only used there and read will never be called more than
498            once. Plus it introduces a reference cycle that keeps can keep the
499            session object alive for a long time.
500    
501    2003-04-29  Jonathan Coles   <[email protected]>
502    
503            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
504            Projection an immutable item. Fixes RTbug #1825.
505            (Projection.__init__): Initialize instance variables here.
506            (ProjFile.Replace): New. Replace the given projection object with
507            the new projection object. This solves the problem of needing the
508            mutator Projection.SetProjection() in the ProjFrame class and
509            allows a projection to change parameters without changing its
510            location in the file.
511    
512            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
513            be of type wxSAVE and should verify overwriting a file.
514    
515            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
516            ProjFile.Replace() method instead of the mutator
517            Projection.SetProjection(). Also requires that we reassign the
518            client data to the new projection.
519    
520            * test/test_proj.py (TestProjection.test): Test GetName() and
521            GetAllParameters()
522            (TestProjFile.test): Remove tests for Set*() methods. Add tests
523            for Replace().
524    
525    2003-04-25  Jonathan Coles   <[email protected]>
526    
527            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
528            to save the name of the projection.
529    
530            * test/test_save.py (SaveSessionTest.testLayerProjection): New
531            test to verify layer projections are saved correctly.
532    
533    2003-04-25  Jonathan Coles   <[email protected]>
534    
535            * Thuban/Model/proj.py (Projection.SetName): Set the name
536            to "Unknown" if name is None.
537            (Projection.SetAllParameters): New. Set the projection's
538            parameter list to the one supplied.
539            (Projection.SetProjection): New. Set the projection's
540            properties to those of the supplied Projection.
541    
542            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
543            the dialog title to include the map's title.
544            (MainWindow.LayerProjection): Set the dialog title to include
545            the layer's title.
546    
547            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
548            error dialogs into a single method call.
549            (ProjFrame.__VerifyButtons): Add more states to check.
550            (ProjFrame.__GetProjection): Return the current state of an
551            edited projection or None.
552            (ProjFrame.__FillAvailList): Remove checks for states that
553            shouldn't exist.
554            (ProjFrame._OnNew): Clear all selected items and supply
555            a projection panel if necessary.
556    
557            * test/test_proj.py (TestProjFile.test): Add tests for
558            ProjFile.SetAllParameters, ProjFile.SetProjection,
559            ProjFile.SetName.
560    
561    2003-04-25  Jonathan Coles   <[email protected]>
562    
563            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
564            takes an optional argument to select the current projection.
565            This does not guarantee that the item is visible due to
566            limited wxWindows functionality. Fixes RTBug #1821.
567    
568    2003-04-25  Jonathan Coles   <[email protected]>
569    
570            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
571            the projection name and use it when constructing the Projection
572            object.
573    
574            * Thuban/Model/proj.py (Projection.__init__): Change the default
575            value for 'name' to None and then test if name is equal to None
576            in the body of the constructor. This way the caller doesn't have to
577            know what the default value should be. Namely, useful in load.py
578            where we have to pick a default value if the 'name' parameter
579            doesn't exist in the XML file.
580    
581            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
582            Tests a file where a layer has a projection.
583    
584    2003-04-25  Jonathan Coles   <[email protected]>
585    
586            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
587            tree for projection information.
588    
589            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
590            XMLReader.GetFileName.
591            (SessionLoader): Added support for loading projection tags that
592            appear inside a layer.
593    
594            * Thuban/Model/proj.py (ProjFile): Document the class. Move
595            back to using a list because the order of the projections in
596            the file is important to maintain. Fixes RTbug #1817.
597    
598            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
599            to ProjFile.GetFilename.
600    
601            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
602            information.
603    
604            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
605            ProjFrame._OnSaveAs. Removed old dead code from previous
606            implementation.
607            (ProjFrame._OnExport): Add support for exporting more than one
608            projection to a single file.
609            (ProjFrame.__FillAvailList): use string formatting (% operator)
610            to build strings that are (partly) translated. Fixes RTbug #1818.
611    
612            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
613            class.
614    
615    2003-04-24  Bernhard Herzog  <[email protected]>
616    
617            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
618    
619            * po/fr.po: New. French translation by Daniel Calvelo Aros
620    
621            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
622            empty strings.
623    
624    2003-04-24  Jonathan Coles   <[email protected]>
625    
626            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
627            implement the interface that the ProjFrame dialog expects.
628    
629            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
630            name of the projection to be changed.
631            (ProjFile): Use a dictionary instead of a list so that removing
632            projections is easier and we are sure about uniqueness.
633            (ProjFile.Remove): Remove the given projection object.
634    
635            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
636            Return a list with only one projection file instead of searching for
637            any projection file. This simplifies many things if the user can
638            only have one system file and one user file.
639    
640            * Thuban/UI/classgen.py: Change all references to
641            genCombo to genChoice.
642    
643            * Thuban/UI/mainwindow.py: Add a Projection option under the
644            layer menu.
645            (MainWindow.LayerProjection): New. Open up a projection window
646            for a layer.
647    
648            * Thuban/UI/projdialog.py: Large changes to how the dialog is
649            laid out. Use three panels instead of one. One for the list of
650            projections, one for the edit controls, and one for the buttons.
651            Fixed resizing problems so that the dialog resizes correctly
652            when the projection panel changes. Added import/export, save, and
653            new buttons/functionality.
654    
655    2003-04-24  Bernhard Herzog  <[email protected]>
656    
657            First step towards table management. Introduce a simple data
658            abstraction so that we replace the data a layer uses more easily
659            in the next step.
660    
661            * Thuban/Model/data.py: New file with a simple data abstraction
662            that bundles shapefile and dbffile into one object.
663    
664            * Thuban/Model/session.py (Session.OpenShapefile): New method to
665            open shapefiles and return a shape store object
666    
667            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
668            object instead of a shapefile filename. This introduces a new
669            instance variable store holding the datastore. For intermediate
670            backwards compatibility keep the old instance variables.
671            (open_shapefile): Removed. No longer needed with the shape store.
672            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
673            get the shape store used by a layer.
674            (Layer.Destroy): No need to explicitly destroy the shapefile or
675            table anymore.
676    
677            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
678            (MainWindow.AddLayer): Use the session's OpenShapefile method to
679            open shapefiles
680    
681            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
682            session's OpenShapefile method to open shapefiles
683    
684            * test/test_classification.py
685            (TestClassification.test_classification): Use the session's
686            OpenShapefile method to open shapefiles and build the filename in
687            a more platform independed way
688    
689            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
690            Implement to have a session to use in the tests
691            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
692            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
693            session's OpenShapefile method to open shapefiles
694            (TestLayerLegend.setUp): Instantiate a session so that we can use
695            it to open shapefiles.
696            (TestLayerLegend.tearDown): Make sure that all references to
697            layers and session are removed otherwise we may get a resource
698            leak
699    
700            * test/test_map.py (TestMapAddLayer.test_add_layer)
701            (TestMapWithContents.setUp): Instantiate a session so that we can
702            use it to open shapefiles.
703            (TestMapWithContents.tearDown): Make sure that all references to
704            layers, maps and sessions are removed otherwise we may get a
705            resource leak
706            ("__main__"): use support.run_tests() so that more info about
707            uncollected garbage is printed
708    
709            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
710            session's OpenShapefile method to open shapefiles
711            ("__main__"): use support.run_tests() so that more info about
712            uncollected garbage is printed
713    
714            * test/test_selection.py (TestSelection.tearDown): Make sure that
715            all references to the session and the selection are removed
716            otherwise we may get a resource leak
717            (TestSelection.get_layer): Instantiate a session so that we can
718            use it to open shapefiles.
719            ("__main__"): use support.run_tests() so that more info about
720            uncollected garbage is printed
721    
722            * test/test_session.py (TestSessionBase.tearDown)
723            (TestSessionWithContent.tearDown): Make sure that all references
724            to the session and layers are removed otherwise we may get a
725            resource leak
726            (TestSessionWithContent.setUp): Use the session's OpenShapefile
727            method to open shapefiles
728    
729    2003-04-24  Jonathan Coles   <[email protected]>
730    
731            * Thuban/Model/load.py (XMLReader.read): Should have been checking
732            if the file_or_filename object had the 'read' attribute.
733    
734    2003-04-23  Jonathan Coles   <[email protected]>
735    
736            * Thuban/Model/resource.py: Fixes RTbug #1813.
737            (ReadProjFile): Add documentation about which exceptions are raised.
738            Always pass the exceptions up to the caller.
739            (GetProjFiles): If the directory can't be read return an empty list.
740            If any of the proj files can't be read skip that file and go
741            on to the next one.
742    
743            * test/test_proj.py: Added test cases to handle nonexistent files,
744            unreadable files, and files that don't parse correctly.
745    
746    2003-04-23  Jonathan Coles   <[email protected]>
747    
748            Projection dialog. Allows the user to select from a list
749            of projection templates and optionally edit them and save new ones.
750    
751            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
752            (ProjPanel): Base class for projection specific panels.
753            (TMPanel): Projection panel for Transverse Mercartor.
754            (UTMPanel): Projection panel for Universal Transverse Mercartor.
755            (LCCPanel): Projection panel for Lambert Conic Conformal.
756            (GeoPanel): Projetion panel for Geographic Projection.
757    
758    2003-04-23  Jonathan Coles   <[email protected]>
759    
760            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
761            promote symmetry. There now exists XMLReader and XMLWriter.
762            (XMLReader.read): New. Call to read the given file descriptor or
763            filename.
764            (XMLReader.close): New. Make sure the file is closed.
765            (XMLReader.GetFileName): New. Return just the file name that is being
766            read from.
767            (XMLReader.GetDirectory): New. Return just the directory of the file
768            that is being read.
769            (XMLReader.AddDispatchers): New. Take a dictionary which contains
770            the names of functions to call as the XML tree is parsed.
771            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
772            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
773            (SessionLoader): Removed class variables start_dispatcher and
774            end_dispatcher since this functionality is now part of a class
775            instance. Fixes RTbug #1808.
776            (SessionLoader.__init__): Add dispatcher functions.
777            (load_xmlfile): Code was moved into the XMLReader.read().
778            (load_session): Use modified SessionLoader.
779    
780            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
781            map's projection.
782    
783            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
784            GetAllParameters.
785            (Projection.GetParameter): Returns the value for the given parameter.
786    
787            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
788            (GetProjFiles): Renamed from GetProjections. Now returns a list
789            of ProjFile objects.
790            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
791            a list of ProjFile objects whose files are not user defined.
792            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
793            list of ProjFile objects whose files are user defined.
794            (ProjFileReader): Extend new XMLReader.
795    
796            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
797            promote symmetry.
798    
799            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
800            control instead of a wxComboBox. wxChoice controls do not generate
801            events as the uses highlights possible choices which fixes problems
802            with resizing the dialog when the use selects an option.
803    
804            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
805            control instead of a wxComboBox.
806    
807            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
808            dialog.
809    
810            * test/test_proj.py (TestProjection.test): New tests for GetParameter
811            method.
812    
813    2003-04-22  Bernhard Herzog  <[email protected]>
814    
815            * Thuban/UI/mainwindow.py: Remove some unused imports and global
816            constants
817    
818            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
819            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
820    
821    2003-04-17  Bernhard Herzog  <[email protected]>
822    
823            * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
824            (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
825            anymore.
826            (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
827            (Layer.ShapeType, Layer.Shape): No need to call
828            self.open_shapefile since it's always called in __init__
829    
830            * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
831            In wxPython 2.4 there's no need to extend MainLoop anymore since
832            wxPython itself makes sure OnExit is called.
833    
834    2003-04-16  Jonathan Coles   <[email protected]>
835    
836            Initial putback of projection management code. Includes new
837            classes to read and write projection files. The current load
838            and save classes were abstracted a bit so they could be reused.
839            The Projection class was extended to provide new methods and
840            have a name.
841    
842            * Thuban/Model/load.py (XMLProcessor): New. Contains all the
843            general XML reading methods that were part of ProcessSession.
844    
845            * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
846            name.
847            (ProjFile): New. Represents a file that contains projection
848            information.
849    
850            * Thuban/Model/resource.py: New. Contains general utilities
851            for read and writing projection files.
852    
853            * Thuban/Model/save.py (XMLSaver): New. Contains all the
854            general XML writing methods that were part of SessionSaver.
855            (SessionSaver): Renamed from Saver.
856    
857            * test/test_proj.py: New test cases for the projection
858            file read and write functions.
859    
860    2003-04-16  Jonathan Coles   <[email protected]>
861    
862            * Thuban/Model/classification.py: Use repr() around values
863            in the ClassGroup*.__repr__() methods so it is clearer when
864            a value is a string and when it is a number.
865    
866            * test/test_load.py: Rework the classification test to test
867            that we can load old files.
868            (testLabels): Test a file where the groups have labels.
869    
870    2003-04-16  Bernhard Herzog  <[email protected]>
871    
872            Safer implementation of the performance enhancements of the
873            low-level renderer:
874            
875            * extensions/thuban/wxproj.cpp (extract_projection)
876            (extract_pointer): Rename extract_projection to extract_pointer
877            and redefine its purpose to return the pointer stored in a CObject
878            returned by the object's cobject method. Update all callers.
879            (s_draw_info, free_draw_info, draw_polygon_init): Implement the
880            handling of these low-level parameters so that each s_draw_info
881            instance is handled as a CObject at python level that also
882            contains real references to the actual python objects which
883            contain the values in the struct. Add free_draw_info as the
884            destructor.
885            (draw_polygon_shape): Add the py_draw_info parameter which must a
886            cobject containing an s_draw_info pointer.
887    
888            * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
889            method to instantiat the low-level render parameter
890            (MapRenderer.draw_shape_layer): Use the new method. Remove some
891            commented out code.
892            (MapRenderer.draw_polygon_shape): Make the first parameter not the
893            layer but the low-level render parameter
894            (ScreenRenderer.draw_shape_layer): Use the low-level render
895            parameter.
896    
897    2003-04-15  Jonathan Coles   <[email protected]>
898    
899            * Thuban/Model/classification.py: Implemented __repr__ for
900            the ClassGroup* classes to make debugging a bit easier.
901            (ClassGroup.SetLabel): Check that the string is an instance
902            of StringTypes not StringType. Accounts for Unicode strings.
903    
904            * Thuban/Model/color.py: Implemented __repr__ to make
905            debugging a bit easier.
906    
907            * Thuban/Model/save.py (Saver.write_classification): Need to
908            save the group label.
909    
910            * test/test_load.py (testClassification): New. Loads the
911            iceland_sample_test.thuban file and checks if it was loaded
912            correctly.
913    
914    2003-04-15  Jonathan Coles   <[email protected]>
915    
916            * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
917            to improve rendering performance by initializing the variables
918            that are not change each time draw_polygon_shape() is called.
919            The values are stored in a global struct draw_info.
920            (draw_polygon_shape): Removed initialization code that is
921            now in draw_polygon_init().
922    
923            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
924            drawing initialization call to draw_polygon_init()
925            (MapRenderer.draw_polygon_shape): Use new signature of
926            draw_polygon_shape.
927    
928            * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
929            weirdness by setting the range to (1, maxint).
930    
931            * Thuban/Model/classification.py (ClassGroupProperties): Make
932            instance variables private and optimize comparison operator
933            by first checking if the color references are the same.
934            (ClassGroupSingleton): Make instance variables private.
935            (ClassGroupRange): Make instance variables private.
936    
937            * HOWTO-Release: Filled in missing steps for releasing packages.
938    
939    2003-04-15  Bernhard Herzog  <[email protected]>
940    
941            First stab at internationalized messages:
942    
943            * Thuban/__init__.py (_): Implement the translation function for
944            real using the python gettext module.
945    
946            * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
947            translate empty strings.
948    
949            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
950            Add a missing space to a warning message
951    
952            * po/README: New. Notes about the management of the translation
953            files.
954    
955            * po/Makefile: New. Makefile to help manage the translation files.
956    
957            * po/es.po: New. Spanish translation by Daniel Calvelo Aros
958    
959            * MANIFEST.in: Include the *.mo files in Resources/Locale and the
960            translations and support files in po/
961    
962            * setup.py (data_files): Add the *.mo files to the data_files too
963    
964            * README: Add note about the translations when building from CVS
965    
966    2003-04-14  Jonathan Coles   <[email protected]>
967    
968            * Thuban/UI/dock.py: Fixes some window resizing problems most
969            noticable under windows. Always assume the button bitmaps will
970            be there. Code clean up.
971            (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
972            images for the dock/undock button to the same images.
973            Work around for RTbug #1801.
974    
975            * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
976            be allowed to grow within the sizer. Fixes a bug under Windows
977            where the toolbar wasn't being drawn.
978    
979    2003-04-14  Frank Koormann   <[email protected]>
980    
981            * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
982            Updated design to try to make the button functionality more
983            transparent.
984    
985    2003-04-14  Jonathan Coles   <[email protected]>
986    
987            * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
988            finalize the intialization of the panel.
989    
990            * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
991            creation of the panel. Should be the last thing called in the
992            initializer of a subclass.
993    
994            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
995            set the current selections in the combo boxes. This is needed
996            under Windows.
997    
998            * Thuban/UI/classifier.py (Classifier.__init__): Add a top
999            level panel to the dialog so that the background colors are
1000            consistent under Windows.
1001    
1002    2003-04-11  Jonathan Coles   <[email protected]>
1003    
1004            * Thuban/UI/classgen.py: Change color ramps to start at white
1005            not black.
1006    
1007            * Thuban/UI/legend.py: Enable/disable the legend buttons when
1008            the legend changes. Fixes RTbug #1793.
1009    
1010            * test/test_classification.py: Added test for copying of
1011            classifications.
1012    
1013    2003-04-11  Jonathan Coles   <[email protected]>
1014    
1015            * Thuban/UI/resource.py: New. Centralize the loading of resources
1016            such as bitmaps.
1017    
1018            * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
1019            added images to the move buttons, added 'reverse' button.
1020            (CustomRampPanel.__init__): Added images to the move buttons.
1021            (GreyRamp): New. Generates a ramp from white to black.
1022            (HotToColdRamp): New. Generates a ramp from cold to hot colors.
1023    
1024            * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
1025            ID_PROPERTY_*.
1026            (Classifier.__init__): Minor changes to the layout.
1027            (Classifier._OnTitleChanged): Listen for when the user edits the
1028            title and update the dialog's title and the layer's title.
1029    
1030            * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
1031    
1032            * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
1033            (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
1034            if the layer's title changes.
1035    
1036            * Thuban/UI/mainwindow.py: Added new menu item and associated code
1037            to open a dialog to rename the map.
1038            (MainWindow): Use new resource class to import bitmaps.
1039    
1040    2003-04-11  Jonathan Coles   <[email protected]>
1041    
1042            * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
1043            Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
1044            Resources/Bitmaps/group_use_none.xpm,
1045            Resources/Bitmaps/group_use_not.xpm,
1046            Resources/Bitmaps/hide_layer.xpm,
1047            Resources/Bitmaps/layer_properties.xpm,
1048            Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
1049            Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
1050            New.
1051    
1052    2003-04-10  Jonathan Coles   <[email protected]>
1053    
1054            * Thuban/Model/classification.py: (ClassGroupRange.__init__):
1055            Should pass group to ClassGroup constructor.
1056    
1057    2003-04-10  Jonathan Coles   <[email protected]>
1058    
1059            * Thuban/Model/classification.py: (ClassGroup): Move all the common
1060            methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
1061            here. Implement SetVisible(), IsVisible().
1062            (ClassGroup.__init__): Add group parameter which acts as a copy
1063            constructor.
1064    
1065            * Thuban/UI/classifier.py (ClassTable): Add a new column for the
1066            "Visible" check boxes.
1067            (Classifier): Rename the buttons and refactor the code to match
1068            the new labels.
1069    
1070            * Thuban/UI/legend.py: Classify button is now called "Properties".
1071            Refactored the code to change variable names.
1072            (LegendTree.__FillTreeLayer): Only list a group if it is visible.
1073    
1074            * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
1075            MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
1076            renamed to MainWindow.LayerEditProperties.
1077            (MainWindow.ToggleLegend): Don't include map name in legend title.
1078            (MainWindow.SetMap): Added the map name to the window title.
1079            (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
1080            MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
1081            Functionality is found in the layer properties dialog.
1082    
1083            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
1084            draw visible groups.
1085    
1086    2003-04-09  Jonathan Coles   <[email protected]>
1087    
1088            * Thuban/UI/classgen.py: Modifications to allow simple
1089            addition and selection of new color schemes.
1090            (MonochromaticRamp): New. Generates a ramp between two colors.
1091            (RedRamp): New. Generates a ramp of all red.
1092            (GreenRamp): New. Generates a ramp of all green.
1093            (BlueRamp): New. Generates a ramp of all blue.
1094    
1095    2003-04-09  Jonathan Coles   <[email protected]>
1096    
1097            * Thuban/Model/classification.py (Classification.__deepcopy__):
1098            Need to copy over field and fieldType attributes.
1099    
1100            * Thuban/Model/table.py (Table.field_range): New. Retrive the
1101            maximum and minimum values over the entire table for a given
1102            field.
1103            (Table.GetUniqueValues): New. Retrieve all the unique values
1104            in the table for a given field.
1105    
1106            * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
1107            (GenUniquePanel): New. Controls to allow the user to select
1108            which unique field values they would like in the classification.
1109            (CustomRampPanel): Code that was in ClassGenDialog that allows
1110            the user to select the properties for a custom ramp.
1111            (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
1112    
1113            * Thuban/UI/classifier.py: Removed a lot of debugging code.
1114            (Classifier._SetClassification): Callback method so that the
1115            class generator can set the classification in the grid.
1116            (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
1117            editing of a group properties class into a wxWindows control.
1118    
1119            * Thuban/UI/dock.py: It was decided that if the user closes
1120            a dockable window the window should simply hide itself. That
1121            way if the user wants to show the dock again it appears in the
1122            same place as it was when it was closed.
1123            (DockableWindow.Destroy): Call renamed method OnDockDestroy().
1124            (DockableWindow._OnButtonClose): Hide the window instead of
1125            destroying it.
1126            (DockableWindow._OnClose): Hide the window instead of
1127            destroying it.
1128    
1129            * Thuban/UI/legend.py (LegendTree): Use a private method to
1130            consistently set the font and style of the text. Fixes RTbug #1786.
1131    
1132            * Thuban/UI/mainwindow.py: Import just the Classifier class.
1133    
1134    2003-04-07  Bernhard Herzog  <[email protected]>
1135    
1136            * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
1137            to the map module
1138    
1139    2003-04-07  Bernhard Herzog  <[email protected]>
1140    
1141            * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
1142            favor of ToggleSessionTree
1143            (MainWindow.ToggleSessionTree): New method to toggle visibility of
1144            the session tree.
1145            (MainWindow.SessionTreeShown): New method to return whether the
1146            session tree is currently shown.
1147            (MainWindow.ToggleLegend): New method to toggle visibility of the
1148            legend
1149            (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
1150            LegendShown
1151            (MainWindow.LegendShown): New method to return whether the legend
1152            is currently shown.
1153            (_method_command): Add checked parameter so we can define check
1154            menu items
1155            (_has_tree_window_shown, _has_legend_shown): Use the appropriate
1156            mainwindow methods.
1157            (show_session_tree, show_legend commands): Removed.
1158            (toggle_session_tree, toggle_legend commands): New commands to
1159            toggle the visibility of the dialogs
1160    
1161    2003-04-07  Jonathan Coles   <[email protected]>
1162    
1163            * Thuban/UI/classgen.py: Fix Windows problem.
1164    
1165            * Thuban/UI/dock.py: Fix Windows problem.
1166    
1167            * Thuban/UI/mainwindow.py: Use False instead of false.
1168            (MainWindow.ShowLegend): Remove unnecessary switch parameter.
1169    
1170    2003-04-07  Jonathan Coles   <[email protected]>
1171    
1172            Since we now say that the order of the groups in a classification
1173            matters, it makes sense to be able to manipulate that order. Most
1174            of the changes to Thuban/Model/classification.py are to that end.
1175    
1176            * Thuban/Model/classification.py (Classification.AppendGroup,
1177            Classification.InsertGroup, Classification.ReplaceGroup,
1178            Classification.RemoveGroup, Classification.GetGroup): Do as the
1179            names imply.
1180            (Classification.FindGroup): This was called GetGroup, but GetGroup
1181            takes an index, while FindGroup takes a value.
1182            (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
1183            REFERENCE. Currently there is a cyclic reference between the layer
1184            and its classification. If the classification doesn't need to know
1185            its owning layer we can change this, since it may make sense to be
1186            able to use the same classification with different layers.
1187    
1188            * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
1189    
1190            * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
1191            not AddGroup()
1192    
1193            * Thuban/UI/classifier.py: Now that we can depend on the order in
1194            a Classification and have methods to manipulate that order we don't
1195            need to use our own data structures in the grid. We can simply make
1196            the grid/table access the information they need from a copy of
1197            the classification object.
1198            (Classifier._OnCloseBtn): Event handler for when the user clicks
1199            'Close'. This is needed so if the user applies changes and then
1200            continues to change the table the user has the option of discarding
1201            the most recent changes and keeping what they applied.
1202    
1203            * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
1204            into the same group.
1205    
1206            * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
1207            with a really old version of proj, PJ_VERSION won't even be defined.
1208            If it isn't defined then just compile so that the function always
1209            returns Py_False.
1210    
1211            * test/test_classification.py: Fix tests to use the renamed methods.
1212            Still need to write tests for the new methods.
1213    
1214    2003-04-04  Jonathan Coles   <[email protected]>
1215    
1216            * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
1217            call to SetSelection out of the method and before the call
1218            to __SelectField in __init__. This prevents a recursion of events
1219            when _OnFieldSelect is triggered by the user.
1220    
1221    2003-04-04  Jonathan Coles   <[email protected]>
1222    
1223            * Thuban/Model/classification.py: Rename Color.None to
1224            Color.Transparent.
1225            (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
1226            Don't bother copying the color, since Colors are immutable.
1227    
1228            * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
1229            Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
1230            Thuban/UI/renderer.py, Thuban/UI/view.py:
1231            Rename Color.None to Color.Transparent.
1232        
1233            * test/test_classification.py, test/test_load.py: Rename Color.None
1234            to Color.Transparent.
1235    
1236    2003-04-04  Jonathan Coles   <[email protected]>
1237    
1238            * Thuban/Model/classification.py: Fix assert calls.
1239            (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
1240            Copy the color parameter rather than hold onto a reference.
1241    
1242            * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
1243            the color object.
1244            (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
1245            are sure there exists only one refernce to Color.None in the system.
1246            This allows us to use 'is' rather than the comparision functions.
1247            
1248            * Thuban/Model/save.py: Fix assert calls.
1249            
1250            * Thuban/UI/classifier.py: Fix assert calls.
1251            (ClassGrid._OnCellDClick): Call up to the classifier to open the
1252            dialog to edit the groups properties.
1253            (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
1254            correctly if a cell is resized.
1255            (ClassTable.SetClassification): New. Changes the classification
1256            that is in the table.
1257            (ClassTable.__SetRow): Allow groups to be prepended.
1258            (Classifier): New code for opening the EditProperties and
1259            GenerateRanges dialogs.
1260            (SelectPropertiesDialog.__GetColor): Only set the color in the
1261            color dialog if the current color is not None.
1262            
1263            * Thuban/UI/dock.py: Fix assert calls.
1264            
1265            * Thuban/UI/legend.py: Fix assert calls.
1266            
1267            * Thuban/UI/renderer.py: Fix assert calls.
1268            
1269            * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
1270            classifications.
1271            (GenRangePanel): Panel specific to range generation.
1272            (GenSingletonPanel): Panel specific to singleton generation.
1273            (ClassGenerator): Class responsible for actually generating
1274            the classification from the data gathered in the dialog box.
1275            (PropertyRamp): Generates properties whose values range from
1276            a starting property to an ending property.
1277    
1278    2003-04-03  Bernhard Herzog  <[email protected]>
1279    
1280            * test/support.py (print_garbage_information): New function that
1281            prints information about still connected messages and memory
1282            leaks.
1283            (run_suite): Removed.
1284            (run_tests): New function for use as a replacement of
1285            unittest.main in the test_* files. This one calls
1286            print_garbage_information at the end.
1287    
1288            * test/runtests.py (main): Use support.print_garbage_information
1289    
1290            * test/test_layer.py: Use support.run_tests instead of
1291            unittest.main so we get memory leak information
1292            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1293            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1294            (TestLayerLegend.test_visibility): Call the layer's Destroy method
1295            to fix a memory leak.
1296    
1297            * test/test_classification.py: Use support.run_tests instead of
1298            unittest.main so we get memory leak information
1299            (TestClassification.test_classification): Call the layer's Destroy
1300            method to fix a memory leak.
1301    
1302    2003-04-02  Bernhard Herzog  <[email protected]>
1303    
1304            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
1305            Handle the reference counts of the return value and errors in
1306            PyArg_ParseTuple correctly.
1307    
1308            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
1309            sure the filename is absolute to avoid problems when saving the
1310            session again
1311    
1312            * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
1313    
1314    2003-04-01  Jonathan Coles   <[email protected]>
1315    
1316            *  Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
1317            that there actually are points in the returned list of points
1318            before trying to index into the list. The list may be empty if
1319            the shape is a Null Shape.
1320    
1321    2003-04-01  Bernhard Herzog  <[email protected]>
1322    
1323            * test/test_map.py: Don't use from <module> import *
1324    
1325    2003-04-01  Jonathan Coles   <[email protected]>
1326    
1327            * Thuban/Model/session.py: Use LAYER_CHANGED instead of
1328            LAYER_LEGEND_CHANGED
1329    
1330            * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
1331            self.Destroy() to close the window after yesterday's changes.
1332    
1333            * test/test_map.py, test/test_session.py: Fix messages that
1334            are sent from maps and layers.
1335    
1336    2003-03-31  Jonathan Coles   <[email protected]>
1337    
1338            * Thuban/UI/classifier.py: Commented out some debugging statements.
1339            (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
1340            RTbug #1769.
1341    
1342            * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
1343            position (although position doesn't work yet under GTK).
1344            (DockableWindow.Destroy): New. Called when the window must be
1345            closed. Namely needed when the DockFrame closes and must close
1346            its children.
1347            (DockFrame): Listen for EVT_CLOSE and destroy all children.
1348    
1349            * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
1350            when then window is told to close.
1351            (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
1352            comment in source for more info.
1353    
1354            * Thuban/UI/main.py: Show the legend by default when Thuban starts.
1355    
1356            * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
1357            symmetry with other such methods.
1358            (MainWindow.ShowLegend): Show the legend docked by default.
1359    
1360    2003-03-28  Jonathan Coles   <[email protected]>
1361    
1362            * Thuban/UI/classifier.py: Support for highlighting a specific
1363            group within the grid when the classification dialog is opened.
1364            Also contains a lot of debugging printouts which will later
1365            be removed.
1366    
1367            * Thuban/UI/dock.py: Complete rework on the dock code so that
1368            that it is fairly removed from the rest of the Thuban application.
1369            It is easy to add new docks which the rest of the program having
1370            to be aware of them.
1371    
1372            * Thuban/UI/legend.py: Modifications to support selecting a
1373            specific group in the classification dialog. Changed how layers
1374            are drawn when the layer is visible/invisible.
1375    
1376            * Thuban/UI/mainwindow.py: Removed legend specific code and
1377            replaced it with calls to the new dock code.
1378    
1379            * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
1380            to check if scale > 0. Trying to track down a divide by zero.
1381    
1382    2003-03-26  Jonathan Coles   <[email protected]>
1383    
1384            * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
1385            (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
1386            now part of DockableWindow.
1387            (LegendPanel.DoOnSelChanged): Select the current layer in the
1388            map.
1389            (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
1390            with the selected layer and/or group.
1391    
1392    2003-03-26  Jonathan Coles   <[email protected]>
1393    
1394            This putback contains the code for dockable windows. There is
1395            no support in wxWindows as of this date for windows that can
1396            attach themselves to other windows.
1397    
1398            The current model contains a DockableWindow which has a parent
1399            window for when it is detached and a dock window that it puts
1400            its contents in when it is docked. The contents of a DockableWindow
1401            must be a DockPanel. DockPanel itself derives from wxPanel.
1402    
1403            * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
1404            message, not a LAYER_LEGEND_CHANGED message.
1405    
1406            * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
1407    
1408            * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
1409            as one of the style properties for the fieldTypeText item to
1410            be sure that its size is correct when the text changes.
1411    
1412            * Thuban/UI/dock.py: New. Classes for the DockPanel and
1413            DockableWindow.
1414    
1415            * Thuban/UI/legend.py: Added some more buttons and made the
1416            LegendPanel a DockPanel.
1417    
1418            * Thuban/UI/mainwindow.py: Added sash windows to the main window
1419            and supporting functions for manipulating the sashes.
1420            (MainWindow.ShowLegend): Create a DockableWindow with the
1421            LegendPanel as the contents.
1422    
1423            * Thuban/UI/messages.py: Added DOCKABLE_* messages
1424    
1425            * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
1426            not LAYER_LEGEND_CHANGED, messages.
1427    
1428    2003-03-25  Jonathan Coles   <[email protected]>
1429    
1430            * setup.py: Added custom script bdist_rpm_build_script so that
1431            when the rpm is built the path to wx-config is correct.
1432    
1433            * setup.cfg: Added line saying to use the custom build script
1434    
1435    2003-03-20  Jonathan Coles   <[email protected]>
1436    
1437            Initial implementation of the Legend.
1438    
1439            * Thuban/UI/legend.py: New. Creates a window that shows the map's
1440            Legend information and allows the user to add/modify classifications
1441            and how the layers are drawn on the map.
1442    
1443            * setup.py: New command 'build_docs' which currently uses
1444            happydoc to generate html documentation for Thuban.
1445    
1446            * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
1447            Returns a string which is appropriately describes the group.
1448    
1449            * Thuban/Model/layer.py (Layer.SetClassification): Generate a
1450            LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
1451    
1452            * Thuban/Model/map.py (Map): Rename messages and use new, more
1453            specific, messages.
1454    
1455            * Thuban/Model/messages.py: New message to indicate that a layer's
1456            data has changed (LAYER_CHANGED). New map messages to indicate
1457            when layers have been added/removed/changed or if the stacking order
1458            of the layers has changed.
1459    
1460            * Thuban/Model/session.py: Rename and use new messages.
1461    
1462            * Thuban/UI/classifier.py: Remember if any changes have actually
1463            been applied so that if the dialog is cancelled without an application
1464            of changes we don't have to set a new classification.
1465            (ClassDataPreviewer): Pulled out the window specific code and put it
1466            ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
1467            symbols on any DC.
1468            
1469            * Thuban/UI/mainwindow.py: New code to open the legend.
1470    
1471            * Thuban/UI/view.py: Use new message names.
1472    
1473    2003-03-19  Jonathan Coles   <[email protected]>
1474    
1475            * Thuban/UI/main.py (verify_versions): New. Checks the versions
1476            of Python, wxPython, and some other libraries.
1477    
1478            * extensions/thuban/wxproj.cpp (check_version): Checks the given
1479            version against what wxproj was compiled with.
1480            (check_version_gtk): If wxproj was compiled with gtk then check
1481            the given version against the version of the gtk library
1482            currently being used.
1483    
1484    2003-03-14  Bernhard Herzog  <[email protected]>
1485    
1486            * test/test_command.py: Run the tests when the module is run as a
1487            script
1488    
1489    2003-03-14  Bernhard Herzog  <[email protected]>
1490    
1491            Implement selection of multiple selected shapes in the same layer:
1492    
1493            - Introduce a new class to hold the selection. This basically
1494              replaces the interactor which was nothing more than the
1495              selection anyway. A major difference is of course that the new
1496              selection class supports multiple selected shapes in one layer
1497            
1498            - Move the object that represents the selection from the
1499              application to the canvas. The canvas is a better place than the
1500              application because the selection represents which shapes and
1501              layer of the map displayed by the canvas are selected and
1502              affects how the map is drawn.
1503    
1504            - Make the selection and its messages publicly available through
1505              the mainwindow.
1506    
1507            - The non-modal dialogs do not get a reference to the interactor
1508              anymore as they can simply refer to their parent, the
1509              mainwindow, for the what the interactor had to offer.
1510    
1511            * Thuban/UI/selection.py: New module with a class to represent the
1512            selection.
1513    
1514            * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
1515            these unused messages
1516    
1517            * Thuban/UI/application.py (ThubanApplication.OnInit)
1518            (ThubanApplication.OnExit, ThubanApplication.SetSession): The
1519            interactor is gone now.
1520            (ThubanApplication.CreateMainWindow): There is no interactor
1521            anymore so we pass None as the interactor argument for now for
1522            compatibility.
1523    
1524            * Thuban/UI/view.py (MapCanvas.delegated_messages)
1525            (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
1526            Unsubscribe, delegate messages according to the delegated_messages
1527            class variable.
1528            (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
1529            attributes from instance variables as described with the
1530            delegated_methods class variable.
1531            (MapCanvas.__init__): New instance variable selection holding the
1532            current selection
1533            (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
1534            pass them on to the renderer
1535            (MapCanvas.SetMap): Clear the selection when a different map is
1536            selected.
1537            (MapCanvas.shape_selected): Simple force a complete redraw. The
1538            selection class now takes care of only issueing SHAPES_SELECTED
1539            messages when the set of selected shapes actually does change.
1540            (MapCanvas.SelectShapeAt): The selection is now managed in
1541            self.selection
1542    
1543            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
1544            (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
1545            Unsubscribe, delegate messages according to the delegated_messages
1546            class variable.
1547            (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
1548            attributes from instance variables as described with the
1549            delegated_methods class variable.
1550            (MainWindow.__init__): The interactor as ivar is gone. The
1551            parameter is still there for compatibility. The selection messages
1552            now come from the canvas.
1553            (MainWindow.current_layer, MainWindow.has_selected_layer):
1554            Delegate to the the canvas.
1555            (MainWindow.LayerShowTable, MainWindow.Classify)
1556            (MainWindow.identify_view_on_demand): The dialogs don't need the
1557            interactor parameter anymore.
1558    
1559            * Thuban/UI/tableview.py (TableFrame.__init__)
1560            (LayerTableFrame.__init__, LayerTableFrame.OnClose)
1561            (LayerTableFrame.row_selected): The interactor is gone. It's job
1562            from the dialog's point of view is now done by the mainwindow,
1563            i.e. the parent. Subscribe to SHAPES_SELECTED instead
1564            of SELECTED_SHAPE
1565            
1566            * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
1567            is gone. It's job from the dialog's point of view is now done by
1568            the mainwindow, i.e. the parent.
1569            
1570            * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
1571            gone. It's job from the dialog's point of view is now done by the
1572            mainwindow, i.e. the parent.
1573    
1574            * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
1575            gone. It's job from the dialog's point of view is now done by the
1576            mainwindow, i.e. the parent.
1577            (SessionTreeCtrl.__init__): New parameter mainwindow which is
1578            stored as self.mainwindow. The mainwindow is need so that the tree
1579            can still subscribe to the selection messages.
1580            (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
1581            (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
1582            selection is now accessible through the mainwindow. Subscribe to
1583            SHAPES_SELECTED instead of SELECTED_SHAPE
1584    
1585            * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
1586            SHAPES_SELECTED message now.
1587            (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
1588            so deal with multiple shapes
1589            (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
1590            gone. It's job from the dialog's point of view is now done by the
1591            mainwindow, i.e. the parent.
1592    
1593            * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
1594            parameter is now a list of shape ids.
1595            (RecordTable.SetTable): The second parameter is now a list of
1596            indices.
1597    
1598            * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
1599            selected_shape parameter and ivar to selected_shapes. It's now a
1600            list of shape ids.
1601            (MapRenderer.draw_label_layer): Deal with multiple selected
1602            shapes. Rearrange the code a bit so that the setup and shape type
1603            distinctions are only executed once.
1604    
1605            * test/test_selection.py: Test cases for the selection class
1606    
1607    2003-03-11  Jonathan Coles   <[email protected]>
1608    
1609            * Thuban/Model/load.py: Temporary fix so that the xml reader
1610            doesn't cause Thuban to crash.
1611    
1612            * Thuban/Model/layer.py: Handle the cyclic references between
1613            a layer and its classification better, and be sure to disconnect
1614            the classification from the layer when the layer is destroyed
1615            so that we don't maintain a cyclic reference that may not be
1616            garbage collected.
1617    
1618            * Thuban/Model/classification.py: See comment for layer.py.
1619    
1620    2003-03-12  Jan-Oliver Wagner <[email protected]>
1621    
1622            * HOWTO-Release: New. Information on the steps for releasing
1623            a new version of Thuban.
1624    
1625    2003-03-11  Jonathan Coles   <[email protected]>
1626    
1627            * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
1628            Use True instead of true.
1629            (Classifier): Should have a single panel in which all the controls lie.
1630    
1631            * Thuban/UI/proj4dialog.py: Add normal border.
1632    
1633            * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
1634    
1635            * Thuban/UI/mainwindow.py: Use True instead of true.
1636    
1637            * setup.py: Update some definitions to use wxWindows2.4 files
1638    
1639            * Data/iceland_sample_class.thuban: Fixed file so that the
1640            field_type information is present.
1641    
1642    2003-03-10  Jonathan Coles   <[email protected]>
1643    
1644            * Thuban/UI/classifier.py (Classifier.__init__): Make the
1645            field type label grow so that when the text changes the
1646            size is updated correctly. This may be a wxWindows bug.
1647    
1648    2003-03-10  Jonathan Coles   <[email protected]>
1649    
1650            * Thuban/UI/application.py: Changed SESSION_CHANGED to
1651            SESSION_REPLACED.
1652    
1653            * Thuban/UI/classifier.py: Wrap text with _().
1654            (ClassGrid.CreateTable): Set dimensions and size hints here,
1655            instead of in Reset, so we only set the size once.
1656    
1657            * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
1658    
1659            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
1660            Call Close() instead of Shutdown().
1661    
1662            * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
1663    
1664            * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
1665            Go back to using OnClose() instead of Shutdown().
1666    
1667    2003-03-10  Jonathan Coles   <[email protected]>
1668    
1669            * Thuban/UI/classifier.py (Classifier): SelectField() needed
1670            to know the old field index as well as the new one.
1671    
1672    2003-03-10  Jonathan Coles   <[email protected]>
1673    
1674            * Thuban/UI/classifier.py (Classifier): Use __SelectField()
1675            to correctly set the table information and call this from
1676            __init__ and from _OnFieldSelect so that all the information
1677            is up to date when the dialog opens and when a field is changed.
1678    
1679    2003-03-10  Jonathan Coles   <[email protected]>
1680    
1681            * Thuban/Model/classification.py (Classification): Don't use
1682            layer's message function directly, use the ClassChanged() method
1683            when then classification changes. SetField/SetFieldType/SetLayer
1684            must keep the information about field name and field type in
1685            sync when an owning layer is set or removed.
1686    
1687            * Thuban/Model/layer.py: Added ClassChanged() so that the
1688            classification can tell the layer when its data has changed.
1689            (Layer.SetClassification): Accepts None as an arguement to
1690            remove the current classification and correctly handles
1691            adding a new classification.
1692    
1693            * Thuban/Model/load.py: Comment out print statement
1694    
1695            * test/test_classification.py, test/test_save.py: New and
1696            improved tests.
1697    
1698    2003-03-07  Jonathan Coles   <[email protected]>
1699    
1700            * Thuban/Model/classification.py: Implemented __copy__ and
1701            __deepcopy__ for ClassGroup* and ClassGroupProperites so
1702            they can easily be copied by the classifier dialog.
1703            (ClassGroupProperites.__init__): The default line color should
1704            have been Color.Black.
1705    
1706            * Thuban/UI/classifier.py: Setting and Getting table values now
1707            uses a consistent set of functions.
1708            (Classifier): Now non-modal. Has field type label which changes
1709            as the field changes. Keep track of buttons in a list so that
1710            we can enable/disable the buttons when the None field is selected.
1711            (SelectPropertiesDialog): Add buttons to make the colors transparent.
1712    
1713            * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
1714            does what OnClose did, but can be called by the application to
1715            close a window. Needed when a session changes, and we have to
1716            close the classifier windows.
1717    
1718            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
1719            Shuts down open dialogs. Used when a new session is created
1720            or a session is opened.
1721            (MainWindow.SaveSession): Should only call application.SaveSession()
1722            if we don't call SaveSessionAs first.
1723            (MainWindow.Classify): Allow different classifier dialogs for
1724            different layers.
1725    
1726            * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
1727            the parent class handle it. Add Shutdown() to unsubscibe from
1728            event notification and call the parent Shutdown(). This was
1729            necessary so the application can close the tree window.
1730    
1731    2003-03-06  Jonathan Coles   <[email protected]>
1732    
1733            * Thuban/Model/classification.py: Minor documentation changes,
1734            Addition of __eq__ and __ne__ methods.
1735            (Classification.SetLayer): prevent recursion between this method
1736            and Layer.SetClassification().
1737    
1738            * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
1739    
1740            * Thuban/Model/layer.py (SetClassification): prevent recursion
1741            between this method and Classification.SetLayer().
1742    
1743            * test/test_classification.py, test/test_load.py,
1744            test/test_session.py: Fixed and added tests for the classification
1745            classes.
1746    
1747    2003-03-06  Bernhard Herzog  <[email protected]>
1748    
1749            * Thuban/UI/classifier.py (ClassGrid.__init__)
1750            (ClassGrid.CreateTable): Move the SetSelectionMode call to
1751            CreateTable because otherwise it triggers an assertion in
1752            wxPython/wxGTK 2.4.
1753    
1754    2003-03-05  Jonathan Coles   <[email protected]>
1755    
1756            * Thuban/common.py: Move FIELDTYPE constants back to table.py.
1757    
1758            * Thuban/Model/load.py: import FIELDTYPE constants from table.
1759    
1760            * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
1761    
1762            * Thuban/Model/table.py: Put FIELDTYPE constants back.
1763    
1764    2003-03-05  Jonathan Coles   <[email protected]>
1765    
1766            * Thuban/UI/classifier.py: Added class documentation.
1767            Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
1768            Store just the groups in the table and generate the other
1769            column information when it is requested. Add "None" field
1770            to pull-down to select no classification.
1771    
1772            * Thuban/common.py: Moved FIELDTYPE constants from table.py
1773            (Str2Num): Only catch ValueError exceptions.
1774    
1775            * Thuban/Model/classification.py: Class documentation. Renaming
1776            of methods with Stroke to Line. Groups are stored in a single
1777            list with the default as the first element. Groups are searched
1778            in the order they appear in the list.
1779    
1780            * Thuban/Model/color.py: Documentation.
1781    
1782            * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
1783            the kind of data represented by a field.
1784    
1785            * Thuban/Model/load.py (ProcessSession): Use proper string
1786            conversion function; fixes RTbug #1713.
1787    
1788            * Thuban/Model/save.py (Saver): Store field type information.
1789    
1790            * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
1791            (Table): Add field_info_by_name() to retrieve field information
1792            by specifying the field name, not the number.
1793    
1794            * Thuban/UI/mainwindow.py: Function name changes.
1795    
1796            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
1797            get the layer classification once. Don't try to classify
1798            values when the field is None: just use the default properties.
1799    
1800            * Thuban/UI/view.py: Function name changes.
1801    
1802            * Doc/thuban.dtd: Add field_type attribute to a classification.
1803    
1804    2003-03-04  Bernhard Herzog  <[email protected]>
1805    
1806            * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
1807            the fill and stroke layer attributes optional with suitable
1808            default values. Add the stroke_width layer attribute. Use correct
1809            syntax for empty elements. Make the attribute list for labels
1810            refer to the label element.
1811    
1812    2003-03-04  Bernhard Herzog  <[email protected]>
1813    
1814            * setup.py (thuban_build_py.build): Add a comment about distutils in
1815            Python 2.3 containing some of the functionality we implement in
1816            setup.py ourselves.
1817    
1818            * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
1819            before the selection mode. Doing it the other way round triggers
1820            an assertion in wxWindows.
1821    
1822            * Thuban/Model/save.py (escape): Fix typo in doc-string
1823    
1824            * Thuban/Model/classification.py: Remove unnecessary wxPython
1825            import
1826    
1827    2003-03-04  Jonathan Coles   <[email protected]>
1828    
1829            * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
1830            Parameter 'value' should default to None.
1831    
1832            * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
1833            the class attribute __classification is now private.
1834    
1835            * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
1836            Classifier to ClassGrid. Added support for removing selected rows,
1837            which including code for keeping track of when cells are selected,
1838            and deselected.
1839            (ClassTable): Support for added/removing rows. Fixed a problem
1840            with __ParseInput whereby it would not allow strings (only numbers)
1841            to be entered.
1842            (Classifier): Added button and supporting code for removing
1843            selected rows.
1844    
1845    2003-02-27  Jonathan Coles   <[email protected]>
1846    
1847            * Thuban/common.py: Moved color conversion functions into
1848            Thuban/UI/common.py.
1849            (Str2Num): Now converts the float (not the string) to a long/int
1850            so that an exception isn't thrown.
1851    
1852            * Thuban/UI/common.py: Common functions used in several UI modules
1853    
1854            * Thuban/Model/classification.py: Changed the class hierarchy
1855            so that a Classification consists of Groups which return
1856            Properties when a value matches a Group.
1857    
1858            * Thuban/Model/layer.py: Fixed name resolution problem.
1859    
1860            * Thuban/Model/load.py: Use new Classification and Group functions.
1861    
1862            * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
1863            failure.
1864            (Saver.write_classification): Use new Classification and Group
1865            functions.
1866    
1867            * Thuban/UI/classifier.py: Changes to use new Classification and Group
1868            functions. Fix to create a tuple with a single value instead of
1869            simply returning the value.
1870    
1871            * Thuban/UI/renderer.py: Use new Classification and Group functions.
1872            Use common.py functions.
1873    
1874            * Thuban/UI/tree.py: Use common.py functions.
1875            
1876            * test/test_classification.py: Use new Classification and Group
1877            classes.
1878    
1879    2003-02-24  Jonathan Coles   <[email protected]>
1880    
1881            * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
1882            functions from Thuban color objects to wxWindow colour objects.
1883    
1884            * Thuban/Model/classification.py (Classification): Renamed
1885            GetProperties() to GetClassData(). Used the new iterator
1886            in TreeInfo().
1887            (ClassIterator): Iterator implementation to iterate over the
1888            ClassData objects in a classification object.
1889    
1890            * Thuban/Model/save.py (Saver.write_classificaton): Uses
1891            the new iterator to save the classification information.
1892    
1893            * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
1894            for changing the stroke and fill colors and previewing the
1895            changes.
1896    
1897            * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
1898            MainWindow.SaveSessionAs): Text string changes so the dialogs
1899            have more meaningful titles.
1900    
1901            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
1902            Classification method name from GetProperties to GetClassData.
1903    
1904            * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
1905            instead of accessing now non-existent class variables.
1906    
1907    2003-02-24  Bernhard Herzog  <[email protected]>
1908    
1909            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
1910            unneeded Shape() call. Rendering is substantially faster without
1911            it and it avoids some problems with broken shape files.
1912    
1913    2003-02-20  Frank Koormann   <[email protected]>
1914    
1915            Force minimal size of identify and label dialogs. The autosizing
1916            looked too ugly.
1917    
1918            * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
1919            * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
1920            Set size of listctrl.
1921            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1922            Set size of dialog.
1923    
1924    2003-02-19  Jonathan Coles   <[email protected]>
1925    
1926            * test/test_classification.py, test/test_layer.py,
1927            test/test_load.py, test/test_map.py, test/test_session.py:
1928            Updated the tests to use the new functions that are in the
1929            respective classes.
1930    
1931            * Thuban/Model/classification.py (Classification):
1932            Uses the new ClassData* classes. Modification messages are
1933            passed up to the parent layer (if it exists).
1934            (ClassData): New class to encapsulate the common data in each
1935            classification property.
1936            (ClassDataDefault): Represents the Default class. data.
1937            (ClassDataPoint): Represents a single class. data point
1938            (ClassDataRange): Represents a class. range
1939            (ClassDataMap): Represents a class. map (unused).
1940    
1941            * Thuban/Model/color.py: Added Color.None to represent something
1942            with no color. Color.Black represents the color black.
1943            (NoColor): Helper class derived from Color to represent something
1944            with no color.
1945    
1946            * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
1947            stroke_width attributes. Made the 'classification' attribute private.
1948            New methods for setting/getting the classification.
1949    
1950            * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
1951            to get the classifcation and use the new ClassData* classes to
1952            hold the classification data. Use Str2Num to convert numbers
1953            properly.
1954    
1955            * Thuban/Model/save.py (Saver): Use new Color and Classification
1956            methods
1957    
1958            * Thuban/UI/classifier.py (ClassGrid): New class to represent a
1959            custom grid.
1960            (ClassTable): Support for editing Values and Labels and for
1961            changing what type (point or range) of data is stored in each
1962            property based on how the user enters the data.
1963            (Classifier): Support for saving the new classifications and
1964            launching the dialog to edit a property.
1965            (SelectPropertiesDialog): New class for editing the visual
1966            properties of a classification (stroke color, width, and fill color)
1967            (ClassPreviewer): Took the Draw method from ClassRenderer and
1968            made most of it into this new class. Intend to use this class in
1969            the SelectPropertiesDialog for previewing changes.
1970    
1971            * Thuban/UI/renderer.py: Use new Color and Classification methods.
1972    
1973            * Thuban/UI/tree.py: Formatting changes.
1974    
1975            * Doc/thuban.dtd: Add 'label' element
1976    
1977            * Thuban/common.py: New. Contains common routines used throughout
1978            the code.
1979            (Str2Num): Takes a string and converts it to the "best" type of
1980            number.
1981    
1982    2003-02-14  Bernhard Herzog  <[email protected]>
1983    
1984            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
1985            dragging flag is always set to 0 even when the tool implementation
1986            raises an exception
1987    
1988    2003-02-11  Bernhard Herzog  <[email protected]>
1989    
1990            * Thuban/UI/application.py (ThubanApplication.splash_screen): New
1991            method to create a splash screen.
1992            (ThubanApplication.ShowMainWindow): New. Show the main window.
1993            Needed so the splash screen can display the mainwindow
1994            (ThubanApplication.OnInit): Call the
1995            new splash_screen method to determine whether the application
1996            should display a splash screen. If it displays a splash screen do
1997            not immediately show the main window.
1998    
1999    2003-02-11  Jonathan Coles  <[email protected]>
2000    
2001            * Thuban/Model/classification.py: Added import line to fix
2002            feature conflicts between running on python2.2 and python2.1.
2003    
2004            * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
2005            onto the clinfo parameter, so removed the deepcopy().
2006    
2007    2003-02-10  Jonathan Coles  <[email protected]>
2008    
2009            * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
2010            Added element_open variable to track opening and closing of tags
2011            so that tags that don't span more than one line are closed with
2012            /> instead of </tag_name>. Use the GetDefault*() methods of
2013            the Classification class.
2014    
2015            * Thuban/Model/classification.py (Classificaton): Added set and
2016            get methods for the default data. The class also takes a layer
2017            reference so that modification messages can be sent. Fixed the
2018            methods to use the new ClassData class.
2019            (ClassData): New class to encapsulate the classification data
2020    
2021            * Thuban/Model/layer.py (Layer): Remove the
2022            Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
2023            SetDefault*() methods on the layer's classification object.
2024            (Layer.__init__): Use the new SetDefault*() methods in the
2025            Classification class.
2026    
2027            * Thuban/Model/load.py (ProcessSession): Use the new ClassData
2028            object instead of a dictionary.
2029    
2030            * Thuban/UI/classifier.py (ClassRenderer): New class to
2031            draw the classifications in the dialog box's table.
2032            (Classifier): Modified to use the ClassRenderer class.
2033    
2034            * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
2035            methods of the Classification class.
2036    
2037            * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
2038            of the ClassData class.
2039    
2040            * test/test_classification.py, test/test_layer.py,
2041            test/test_map.py, test/test_session.py: Fix the tests to work
2042            with the above code changes.
2043    
2044    2003-02-03  Jonathan Coles  <[email protected]>
2045    
2046            * Thuban/Model/classification.py (Classification): Added getNull()
2047            to return the NullData reference
2048    
2049            * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
2050            Layer.SetStrokeWidth): Modified these functions to change the
2051            null data in the classification rather than keep these values
2052            directly in the Layer class. Menu options to change these values
2053            work again.
2054    
2055    2003-01-28  Jonathan Coles  <[email protected]>
2056    
2057            * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
2058            Fixed crashing problem on some systems. Dialog box shows
2059            classification data.
2060    
2061            * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
2062            Colors in the tree view.
2063    
2064            * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
2065            the tree info for classifications. Commented out unnecessary lines.
2066    
2067            * Thuban/Model/classification.py (Classification.TreeInfo): New
2068            function to add information about the classification into the
2069            tree view.
2070    
2071    2003-01-27  Jan-Oliver Wagner <[email protected]>
2072    
2073            * Thuban/__init__.py (_): New.
2074    
2075            * Thuban/Model/classification.py, Thuban/Model/extension.py,
2076            Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
2077            Thuban/Model/session.py, Thuban/UI/application.py,
2078            Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
2079            Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
2080            Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
2081            Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
2082            Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
2083    
2084    2003-01-27  Jonathan Coles  <[email protected]>
2085    
2086            * Thuban/Model/layer.py: Classification initialization calls.
2087    
2088            * Thuban/Model/classification.py: Created class to encapsulate
2089            a layer classification. Supports specific data points and
2090            ranges.
2091    
2092            * Thuban/Model/load.py: Added support for loading classification
2093            information.
2094    
2095            * Thuban/Model/save.py: Added support for saving classification
2096            information.
2097    
2098            * Thuban/UI/classifier.py: Initial class for a dialog box for
2099            specifying classification information.
2100    
2101            * Thuban/UI/mainwindows.py: Support for opening the classifier
2102            dialog.
2103    
2104            * Thuban/UI/renderer.py: Support for drawing a layer with the
2105            classification information.
2106    
2107            * Data/iceland_sample_class.thuban: iceland_sample with
2108            classification data.
2109    
2110            * test/test_classification: Tests for the Classification class.
2111    
2112    2002-12-09  Bernhard Herzog  <[email protected]>
2113    
2114            * test/test_command.py: New. Tests for the command classes.
2115    
2116            * Thuban/UI/command.py (ToolCommand): New class for tool commands.
2117            (Command.IsTool): New method to distinguish between command
2118            switching tools and other commands.
2119    
2120            * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
2121            the tool to avoid direct assignments to instance variables
2122            (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
2123            (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
2124            change the tool
2125    
2126            * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
2127            active tool's command turns insensitive, disable the tool.
2128            (_tool_command): Use the new ToolCommand class
2129    
2130            * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
2131            SelectTool method to change the tool
2132            (iconfile): Use the ToolCommand class
2133    
2134    2002-12-03  Bernhard Herzog  <[email protected]>
2135    
2136            * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
2137            the case of selected items that are not children of Layers or Maps
2138            properly. Previously this bug would trigger an assertion in
2139            wxWindows.
2140    
2141    2002-11-06  Frank Koormann  <[email protected]>
2142    
2143            * Thuban/UI/mainwindow.py: Altered the order of tools in the
2144            toolbar: First now are all navigation tools (Zoom In/Out, Pan,
2145            Full Extent).
2146    
2147    2002-10-23  Bernhard Herzog  <[email protected]>
2148    
2149            * setup.py (setup call): version now 0.1.3
2150    
2151            * MANIFEST.in: Add the files in test/
2152    
2153            * test/README: Add note about tests requiring the iceland data
2154    
2155            * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
2156            copyright notice.
2157    
2158    2002-10-18  Bernhard Herzog  <[email protected]>
2159    
2160            * test/test_map.py
2161            (TestMapWithContents.test_projected_bounding_box): Use an explicit
2162            epsilon.
2163    
2164            * test/support.py (FloatComparisonMixin.assertFloatEqual)
2165            (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
2166            message if the assertion fails and don't return the return value
2167            of self.assert_. In assertFloatSeqEqual the return meant that not
2168            all items of the sequence were compared.
2169    
2170    2002-09-20  Bernhard Herzog  <[email protected]>
2171    
2172            * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
2173    
2174            * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
2175    
2176            * test/test_map.py (TestMapWithContents.test_tree_info): Create
2177            the string with the bounding box on the fly because of platform
2178            differences in the way %g is handled.
2179    
2180            * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
2181            DBFfile too because Thuban layers can't yet cope missing DBF
2182            files.
2183    
2184    2002-09-20  Bernhard Herzog  <[email protected]>
2185    
2186            * test/test_menu.py: Use initthuban instead of
2187            add_thuban_dir_to_path to initialize Thuban.
2188    
2189            * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
2190            Mixin class for float comparisons
2191            (SubscriberMixin): New. Mixin class to test messages sent through
2192            the Connector class
2193    
2194            * test/README: Fix a typo and add the -v flag to the command for
2195            individual tests
2196    
2197            * test/test_session.py: New. Test cases for Thuban.Model.session
2198    
2199            * test/test_proj.py: New. Test cases for Thuban.Model.proj
2200    
2201            * test/test_map.py: New. Test cases for Thuban.Model.map
2202    
2203            * test/test_layer.py: New. Test cases for Thuban.Model.layer
2204    
2205            * test/test_label.py: New. Test cases for Thuban.Model.label
2206    
2207            * test/test_connector.py: New. Test cases for Thuban.Lib.connector
2208    
2209            * test/test_color.py: New. Test cases for Thuban.Model.color
2210    
2211            * test/test_base.py: New. Test cases for Thuban.Model.base
2212    
2213    2002-09-13  Bernhard Herzog  <[email protected]>
2214    
2215            * Thuban/Model/session.py (Session.forwarded_channels): Forward
2216            the CHANGED channel too.
2217    
2218            * Thuban/Model/map.py (Map.forwarded_channels): Forward the
2219            CHANGED channel too.
2220            (Map.__init__): Call the Modifiable constructor as well.
2221    
2222            * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
2223            event if the modified flag changes.
2224            (Modifiable.changed): Tweak the doc-string.
2225    
2226            * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
2227            (MainWindow.set_position_text): Put the code that puts the text
2228            with the mouse position into the status bar into the new method
2229            set_position_text so that it can overwritten in derived classes.
2230    
2231    2002-09-12  Bernhard Herzog  <[email protected]>
2232    
2233            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
2234            message box on the main window.
2235    
2236    2002-09-11  Bernhard Herzog  <[email protected]>
2237    
2238            * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
2239            the 'E' because it's less likely to interfere with other menu
2240            entries.
2241            (MainWindow.build_menu): remove an incorrect comment.
2242    
2243    2002-09-10  Bernhard Herzog  <[email protected]>
2244    
2245            * Thuban/UI/mainwindow.py (MainWindow.Map): New.
2246            (_tool_command): Add sensitive parameter
2247            (_has_visible_map): Sensitivity callback to tools and other
2248            commands that require a visible map. Use it in map_zoom_in_tool,
2249            map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
2250            and map_full_extent
2251    
2252    2002-09-06  Bernhard Herzog  <[email protected]>
2253    
2254            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
2255            VIEW_POSITION
2256    
2257    2002-09-04  Frank Koormann  <[email protected]>
2258    
2259            * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
2260    
2261    2002-09-02  Bernhard Herzog  <[email protected]>
2262    
2263            * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
2264            wxWindows already and our implementation doesn't work correctly
2265            with wxGTK 2.3:
2266            (MapCanvas.__init__): Remove the instance variable
2267            (MapCanvas.OnPaint): Always call do_redraw when there's a map to
2268            be drawin
2269            (MapCanvas.OnIdle): Removed.
2270    
2271            * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
2272            a parameter to determine the size of the rectangle.
2273            (MapCanvas.find_shape_at): Create the box around the point on a
2274            layer by layer basis and make the size depend on the shape type.
2275            This solves a problem with the selection of point shapes at the
2276            border of the layer's bounding box
2277    
2278    2002-08-30  Bernhard Herzog  <[email protected]>
2279    
2280            * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
2281            for the sensitivity  of remove layer.
2282            (_can_remove_layer): New. Sensitivity callback for remove layer
2283            (Command layer_remove): Use _can_remove_layer
2284    
2285            * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
2286            determine whether a given layer can be deleted.
2287    
2288            * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
2289            (MapCanvas.do_redraw): Get rid of the unused update_region
2290            instance variable
2291    
2292            * Thuban/UI/view.py: Add/update some doc-strings.
2293    
2294            * test/: new subdirectory with a bunch of unit tests.
2295    
2296            * test/README, test/test_table.py, test/test_save.py,
2297            test/test_menu.py, test/test_load.py: Initial set of tests and
2298            brief instructions on how to run them
2299    
2300    2002-08-29  Bernhard Herzog  <[email protected]>
2301    
2302            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
2303            arcs with multiple parts.
2304    
2305            * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
2306            Handle degenrate rectangles.
2307    
2308            * Thuban/Model/table.py: Make writing records work correctly:
2309            (Table.__init__): Keep track of whether the DBF is open for
2310            writing
2311            (Table.write_record): Open the DBF file for writing when necessary
2312    
2313    2002-08-27  Bernhard Herzog  <[email protected]>
2314    
2315            * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
2316            dbf files only for reading by default. Use a new writable dbf
2317            object for writing.
2318    
2319    2002-08-26  Bernhard Herzog  <[email protected]>
2320    
2321            * Thuban/UI/mainwindow.py: Refactor the context creation:
2322            (MainWindow.Context): New method to return a context
2323            (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
2324            new method
2325    
2326            * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
2327            layer table specific code from TableGrid into LayerTableGrid
2328            (TableFrame, LayerTableFrame): Split the layer table specific code
2329            from TableFrame into LayerTableFrame
2330            (LayerTableGrid.select_shape): Remove a debug print
2331    
2332            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
2333            LayerTableFrame
2334    
2335    2002-08-23  Bernhard Herzog  <[email protected]>
2336    
2337            * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
2338            absolute filename.
2339    
2340    2002-08-22  Bernhard Herzog  <[email protected]>
2341    
2342            * Thuban/Model/table.py (Table.write_record): New method to write
2343            records.
2344            (Table.__init__): Open the DBF file for writing too.
2345    
2346            * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
2347            into the underlying table.
2348    
2349            * extensions/shapelib/shapefil.h (DBFCommit),
2350            extensions/shapelib/dbfopen.c (DBFCommit): New API function to
2351            commit any changes made to the DBF file.
2352    
2353            * Thuban/UI/mainwindow.py (make_check_current_tool)
2354            (_tool_command): Put the code that generates the "checked"
2355            callback into a separate function so that we can reuse it
2356            elsewhere
2357    
2358            * Thuban/Model/save.py (Saver): New class to handle serializing a
2359            session into an XML file. The main reason to introduce a class is
2360            that applications built on Thuban can derive from it so that they
2361            can save additional information in a session file.
2362            (save_session): Delegate almost all the work to the Saver class.
2363            Rename the filename argument to file because it may be a file like
2364            object now.
2365    
2366            * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
2367            code. Remove the little test code which would be executed when the
2368            module is run as a script which didn't work anymore since it can't
2369            import the other Thuban modules.
2370            (ProcessSession, load_session): Refactor the ProcessSession to
2371            have one method for each element start and end tag so that derived
2372            classes can easily override the processing of individual tags.
2373            Also, always parse with namespaces enabled because applications
2374            built on top of Thuban will likely use namespaces if they extend
2375            the session file format.
2376    
2377    2002-08-21  Bernhard Herzog  <[email protected]>
2378    
2379            * setup.py (ThubanInstall.run): Don't repr install_lib_orig
2380            because thubaninit_contents will do it for us.
2381    
2382    2002-08-16  Jan-Oliver Wagner <[email protected]>
2383    
2384            * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
2385            tree window already open
2386    
2387    2002-08-15  Bernhard Herzog  <[email protected]>
2388    
2389            * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
2390            with self.
2391    
2392            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
2393            when we have actually captured it.
2394    
2395            * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
2396            shapefile and destroy the table.
2397    
2398            * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
2399    
2400    2002-08-14  Bernhard Herzog  <[email protected]>
2401    
2402            * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
2403            instance variable columns
2404            (RecordTable.GetTypeName): row and col may be negative in some
2405            cases.
2406    
2407            * setup.py (InstallLocal.initialize_options)
2408            (InstallLocal.finalize_options, InstallLocal.user_options): New
2409            option create-init-file to build a thubaninit.py when running
2410            install_local
2411            (InstallLocal.run): Create the thubaninit.py module when requested
2412            (thubaninit_contents): Split the template into several parts and
2413            create a new function thubaninit_contents that creates the
2414            contents of a thubaninit module.
2415            (ThubanInstall.run): Use the new function to create the thubaninit
2416            module.
2417    
2418    2002-07-30  Bernhard Herzog  <[email protected]>
2419    
2420            * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
2421            cleanup.
2422            (ThubanApplication.MainLoop): Extend to automatically call OnExit.
2423    
2424            * Thuban/Model/session.py (Session.Destroy): Don't bypass the
2425            direct base class' Destroy method.
2426    
2427            * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
2428            layers.
2429            (Map.Destroy): Destroy the label_layer as well and call the
2430            inherited Desatroymethod first so that no more messages are
2431            issued.
2432            (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
2433            message if the stacking order actually has changed. Add
2434            doc-strings.
2435            (Map.BoundingBox): Correct the doc-string.
2436            (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
2437            (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
2438    
2439            * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
2440            all labels.
2441    
2442  2002-07-29  Bernhard Herzog  <[email protected]>  2002-07-29  Bernhard Herzog  <[email protected]>
2443    
2444          * Thuban/Model/map.py (Map.subscribe_layer_channels)          * Thuban/Model/map.py (Map.subscribe_layer_channels)
# Line 66  Line 2507 
2507          * Thuban/UI/tree.py: We can now simply subscribe to the session's          * Thuban/UI/tree.py: We can now simply subscribe to the session's
2508          CHANGED channel to be informed of changes.          CHANGED channel to be informed of changes.
2509          (SessionTreeCtrl.session_channels): Not needed any longer.          (SessionTreeCtrl.session_channels): Not needed any longer.
2510          (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):          (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
2511          Only have to (un)subscribe CHANGED          Only have to (un)subscribe CHANGED
2512    
2513          * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.          * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
# Line 127  Line 2568 
2568          * Thuban/Model/layer.py (Layer.TreeInfo),          * Thuban/Model/layer.py (Layer.TreeInfo),
2569          Thuban/Model/extension.py (Extension.TreeInfo),          Thuban/Model/extension.py (Extension.TreeInfo),
2570          Thuban/Model/map.py (Map.TreeInfo),          Thuban/Model/map.py (Map.TreeInfo),
2571          Thuban/Model/session.py (Session.TreeInfo):          Thuban/Model/session.py (Session.TreeInfo):
2572          Add TreeInfo methods to implement the new tree view update scheme          Add TreeInfo methods to implement the new tree view update scheme
2573    
2574  2002-07-16  Bernhard Herzog  <[email protected]>  2002-07-16  Bernhard Herzog  <[email protected]>
# Line 208  Line 2649 
2649          * setup.py: In the setup call, make sure that the library          * setup.py: In the setup call, make sure that the library
2650          directories are under $prefix/lib not directly under $prefix.          directories are under $prefix/lib not directly under $prefix.
2651    
2652  2002-06-20      Jan-Oliver Wagner <[email protected]>  2002-06-20  Jan-Oliver Wagner <[email protected]>
2653    
2654          * Thuban/Model/extension.py: new module to handle extension objects.          * Thuban/Model/extension.py: new module to handle extension objects.
2655          * Thuban/Model/messages.py: new messages for extensions.          * Thuban/Model/messages.py: new messages for extensions.
# Line 437  Line 2878 
2878          * Thuban/UI/messages.py (VIEW_POSITION): New message for the          * Thuban/UI/messages.py (VIEW_POSITION): New message for the
2879          position in the statusbar          position in the statusbar
2880    
2881  2002-04-26      Frank Koormann <[email protected]>  2002-04-26  Frank Koormann <[email protected]>
2882    
2883          * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data          * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
2884    
2885  2002-04-24      Frank Koormann <[email protected]>  2002-04-24  Frank Koormann <[email protected]>
2886            
2887          * Resources/Bitmaps/identify.xpm: shadow added          * Resources/Bitmaps/identify.xpm: shadow added
2888    
2889          * Resources/Bitmaps/fullextent.xpm: new          * Resources/Bitmaps/fullextent.xpm: new
           
 2002-04-22      Jan-Oliver Wagner <[email protected]>  
2890    
2891          * Thuban/UI/tree.py (update_tree): added test for None on map bounding box  2002-04-22  Jan-Oliver Wagner <[email protected]>
2892    
2893            * Thuban/UI/tree.py (update_tree): added test for None on map bounding
2894            box
2895    
2896  2002-04-21      Jan-Oliver Wagner <[email protected]>  2002-04-21  Jan-Oliver Wagner <[email protected]>
2897    
2898          * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new          * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
2899    
2900          * Thuban/UI/tree.py (update_tree): added added map extent          * Thuban/UI/tree.py (update_tree): added added map extent
2901    
2902          * Thuban/UI/mainwindow.py (_method_command): extended by parameter          * Thuban/UI/mainwindow.py (_method_command): extended by parameter
2903          icon; added map_full_extend as tool          icon; added map_full_extend as tool
2904    
2905  2002-04-19      Jan-Oliver Wagner <[email protected]>  2002-04-19  Jan-Oliver Wagner <[email protected]>
2906    
2907          * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for          * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
2908          saving _new_ sessions          saving _new_ sessions
# Line 562  Line 3004 
3004    
3005          * setup.py: increase version number to 0.1          * setup.py: increase version number to 0.1
3006          (data_dist): New command class for data distribution          (data_dist): New command class for data distribution
           
3007    
3008  2001-09-14  Bernhard Herzog  <[email protected]>  2001-09-14  Bernhard Herzog  <[email protected]>
3009    
3010          * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):          * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
3011          Handle the case of no layer (i.e. layer is None) properly.          Handle the case of no layer (i.e. layer is None) properly.
3012    
3013          * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):          * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
3014          Set the initial selection of the combo boxes to reflect the          Set the initial selection of the combo boxes to reflect the
3015          projection we're starting with in a way that works on windows,          projection we're starting with in a way that works on windows,
3016          too.          too.
# Line 679  Line 3120 
3120          (MainWindow.identify_view_on_demand): Store the interactor in an          (MainWindow.identify_view_on_demand): Store the interactor in an
3121          instvar and use that reference instead of going through main.app          instvar and use that reference instead of going through main.app
3122    
3123          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
3124          * Thuban/UI/application.py (ThubanApplication.OnInit):          * Thuban/UI/application.py (ThubanApplication.OnInit):
3125          * Thuban/UI/main.py (main): Create the session tree view in main          * Thuban/UI/main.py (main): Create the session tree view in main
3126          with the new mainwindow method ShowSessionTree and not directly          with the new mainwindow method ShowSessionTree and not directly
3127          the application's OnInit method          the application's OnInit method
# Line 696  Line 3137 
3137          layer to the tableview dialog.          layer to the tableview dialog.
3138    
3139          * Thuban/UI/tableview.py: Add some doc-strings          * Thuban/UI/tableview.py: Add some doc-strings
3140          (TableGrid):          (TableGrid):
3141          (TableGrid.OnRangeSelect):          (TableGrid.OnRangeSelect):
3142          (TableGrid.OnSelectCell):          (TableGrid.OnSelectCell):
3143          (TableFrame.__init__):          (TableFrame.__init__):
# Line 763  Line 3204 
3204  2001-09-05  Bernhard Herzog  <[email protected]>  2001-09-05  Bernhard Herzog  <[email protected]>
3205    
3206          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
3207            
3208          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
3209          interactor to pass through to the MapCanvas          interactor to pass through to the MapCanvas
3210            
3211          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
3212          argument to the MainWindow constructor to get rid of the ugly hack          argument to the MainWindow constructor to get rid of the ugly hack
3213          that made main.app available early just so that the mapcanvas          that made main.app available early just so that the mapcanvas
# Line 813  Line 3254 
3254          (ThubanInstall.run): Remove the leading install root from the          (ThubanInstall.run): Remove the leading install root from the
3255          script filename if an install root was specified and use the new          script filename if an install root was specified and use the new
3256          link_file method          link_file method
3257            
3258          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
3259          the window when the first layer is added to the map.          the window when the first layer is added to the map.
3260    
# Line 850  Line 3291 
3291          (InnoIconItem): Helper class for bdist_inno          (InnoIconItem): Helper class for bdist_inno
3292          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
3293          this together with the appropriate parameters, to the setup call.          this together with the appropriate parameters, to the setup call.
3294            
3295          * setup.cfg (bdist_inno): added new section for the inno setup          * setup.cfg (bdist_inno): added new section for the inno setup
3296          installer          installer
3297    

Legend:
Removed from v.247  
changed lines
  Added in v.860

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26