/[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 575 by jonathan, Mon Mar 31 18:30:51 2003 UTC revision 857 by frank, Wed May 7 18:25:05 2003 UTC
# Line 1  Line 1 
1    2003-05-07  Frank Koormann <[email protected]>
2            
3            Basic Scalebar features added.
4    
5            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
6    
7            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
8            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
9            and the renderer.
10    
11            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
12    
13            * Thuban/UI/messages.py: SCALE_CHANGED added.
14    
15    2003-05-07  Bernhard Herzog  <[email protected]>
16    
17            * Thuban/Model/session.py (Session.__init__): New instance
18            variable shapestores to hold a list of all open shapestore objects
19            (Session.ShapeStores): New. Accessor method for the shapestores
20            list.
21            (Session._add_shapestore, Session._clean_weak_store_refs): New.
22            Internal methods to maintain the shapestores list.
23            (Session.Tables): New. Return all tables open in the session.
24            (Session.OpenShapefile): Insert the new ShapeStore into the
25            shapestores list.
26    
27            * test/test_session.py (TestSessionSimple.test_initial_state): Add
28            tests for ShapeStores and Tables
29            (TestSessionWithContent.test_shape_stores)
30            (TestSessionWithContent.test_tables): New. Test cases for
31            ShapeStores and Tables
32    
33    2003-05-07  Bernhard Herzog  <[email protected]>
34    
35            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
36            Add comments about the optimizations used.
37            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
38            Implement the ReadValue table interface method.
39    
40            * test/test_transientdb.py
41            (TestTransientTable.run_iceland_political_tests)
42            (TestTransientTable.test_transient_joined_table): Add tests for
43            ReadValue
44    
45    2003-05-07  Frank Koormann <[email protected]>
46    
47            * Resources/Bitmaps/fulllayerextent.xpm,
48            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
49            new icons.
50    
51    2003-05-06  Bernhard Herzog  <[email protected]>
52    
53            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
54            New. Simply delegate to the transient table's version.
55    
56            * test/test_transientdb.py
57            (TestTransientTable.test_auto_transient_table_query): New. Test
58            case for AutoTransientTable's SimpleQuery
59    
60    2003-05-06  Bernhard Herzog  <[email protected]>
61    
62            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
63            Implement a simple query method for the query dialog
64            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
65            the row index or shapeid.
66            (TransientTable.create): Insert the right value of the row index
67            (TransientJoinedTable.create): Copy the row index of the left
68            table to the joined result table
69    
70            * test/test_transientdb.py
71            (TestTransientTable.test_transient_table_read_twice): Fix
72            doc-string
73            (TestTransientTable.test_transient_table_query): New. Test for the
74            SimpleQuery method
75    
76    2003-05-06  Bernhard Herzog  <[email protected]>
77    
78            Convert all table users to use the new table interface. This only
79            covers Thuban itself, not GREAT-ER or other applications built on
80            Thuban yet, so the compatibility interface stays in place for the
81            time being but it now issues DeprecationWarnings.
82    
83            Finally, the new Table interface has a new method, HasColumn.
84    
85            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
86            issue deprecation warnings when they're. The warnings refer to the
87            caller of the method.
88            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
89            for the deprecation warnings
90    
91            * test/test_table.py: Ignore the deprecation warnings for the old
92            table in the tests in this module. The purpose of the tests is to
93            test the old interface, after all.
94    
95            * test/test_transientdb.py
96            (TestTransientTable.run_iceland_political_tests): Use the
97            constants for the types. Add a test for HasColumn
98            (TestTransientTable.test_transient_joined_table): Adapt to new
99            table interface. Add a test for HasColumn
100            (TestTransientTable.test_transient_table_read_twice): Adapt to new
101            table interface
102    
103            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
104            Adapt to new table interface
105    
106            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
107            new table interface
108    
109            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
110            (RecordTable.SetTable): Adapt to new table interface
111    
112            * Thuban/UI/classifier.py (Classifier.__init__)
113            (Classifier.__init__): Adapt to new table interface
114    
115            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
116            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
117            to new table interface
118    
119            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
120            (AutoTransientTable.HasColumn): Implement the new table interface
121            method
122            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
123            (AutoTransientTable.UniqueValues): Adapt to new table interface
124    
125            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
126            Adapt to new table interface
127    
128            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
129            simplify opening shapefiles a bit easier.
130            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
131            (TestLayer.test_point_layer): Use the new helper method
132            (TestLayer.test_get_field_type): New. Test for the GetFieldType
133            method
134    
135            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
136            the new table method
137    
138            * test/test_memory_table.py (TestMemoryTable.test_has_column):
139            Test for the new table method HasColumn
140    
141    2003-05-06  Jonathan Coles   <[email protected]>
142    
143            Addresses the "Selection Extent" wish of RTbug #1787.
144    
145            * Resources/Bitmaps/fulllayerextent.xpm,
146            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
147            extent. These are just place holders for the real bitmaps.
148    
149            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
150            calculate the bounding box once (the first time compute_bbox() is
151            called).
152            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
153            the bounding box for the shapes in lat/long coordinates.
154    
155            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
156            option.
157            (MainWindow.has_selected_shapes): New. Returns true if there are
158            any selected shapes.
159            (MainWindow.FullSelectionExtent): New. Calls
160            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
161            (_has_selected_shapes): New. Returns true if there are any
162            selected shapes.
163    
164            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
165            true if there are any selected shapes.
166    
167            * Thuban/UI/view.py (MapCanvas): Added delegated method
168            HasSelectedShapes.
169            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
170            shapes on the canvas using the map projection (if any).
171    
172            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
173            for Layer.ShapesBoundingBox().
174    
175    2003-05-06  Bernhard Herzog  <[email protected]>
176    
177            * Resources/Projections/defaults.proj: Fix spelling of Mercator
178    
179    2003-05-05  Jonathan Coles   <[email protected]>
180    
181            Addresses the "Full Layer Extent" wish of RTbug #1787.
182    
183            * Resources/Projections/defaults.proj: Added UK National Grid.
184    
185            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
186            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
187            when the user selects the menu option.
188    
189            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
190            scales the given layer on the canvas using the map projection.
191    
192    2003-05-05  Bernhard Herzog  <[email protected]>
193    
194            Convert the table implementations to a new table interface. All
195            tables use a common mixin class to provide backwards compatibility
196            until all table users have been updated.
197    
198            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
199            provide backwards compatibility for table classes implementing the
200            new interface
201            (DBFTable, MemoryTable): Implement the new table interface. Use
202            OldTableInterfaceMixin as base for compatibility
203            (DBFColumn, MemoryColumn): New. Column description for DBFTable
204            and MemoryTable resp.
205    
206            * test/test_dbf_table.py: New. Test cases for the DBFTable with
207            the new table interface.
208    
209            * test/test_memory_table.py: New. Test cases for the MemoryTable
210            with the new table interface.
211    
212            * test/test_table.py: Document the all tests in this file as only
213            for backwards compatibility. The equivalent tests for the new
214            interface are in test_memory_table.py and test_dbf_table.py
215            (MemoryTableTest.test_read): field_info should be returning tuples
216            with four items
217            (MemoryTableTest.test_write): Make doc-string a more precise.
218    
219            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
220            table interface. Derive from from OldTableInterfaceMixin for
221            compatibility.
222            (TransientTableBase.create): New intance variable column_map to
223            map from names and indices to column objects
224            (TransientTable.create): Use the new table interface of the input
225            table
226            (AutoTransientTable): Convert to new table interface. Derive from
227            from OldTableInterfaceMixin for compatibility.
228            (AutoTransientTable.write_record): Removed. It's not implemented
229            yet and we still have to decide how to handle writing with the new
230            table and data framework.
231    
232            * test/test_transientdb.py
233            (TestTransientTable.run_iceland_political_tests)
234            (TestTransientTable.test_transient_joined_table): Use the new
235            table interface
236    
237    2003-05-05  Jonathan Coles   <[email protected]>
238    
239            This is namely a collection of UI updates to improve user interactivity.
240            Tabbing between controls now exists and you can use ESC to close dialog
241            boxes; ENTER will active the default button.
242    
243            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
244            order that the controls are created so that tabbing works correctly.
245            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
246            wxDialog can handle the default button correctly.
247            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
248            same reasons as for OnOK.
249            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
250            when we ask the table for the maximum/minimum values of a field
251            which could take a very long time.
252    
253            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
254            order that the controls are created so that tabbing works correctly.
255            (SelectPropertiesDialog.__init__): Rearrange the order that the
256            controls are created so that tabbing works correctly.
257    
258            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
259            to derive from a wxDialog but behave like the original implementation
260            which was derived from a wxFrame. wxDialog provides useful key
261            handling functionality like ESC calling OnCancel and ENTER calling
262            OnOK which is lost with wxFrame.
263    
264            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
265            new dialogs.
266    
267            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
268            order that the controls are created so that tabbing works correctly.
269            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
270            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
271            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
272            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
273            can provide the "UK National Grid" as a default projection.
274            (UTMPanel.__init__): Rearrange the order that the controls are
275            created so that tabbing works correctly.
276    
277    2003-05-05  Bernhard Herzog  <[email protected]>
278    
279            * extensions/thuban/wxproj.cpp: Fix some of the comments.
280            (project_point): If a map projection but no layer projection is
281            given, convert degrees to radians before applying the map
282            projection.
283    
284            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
285            (TableGrid.allow_messages): New methods to make it possible to
286            inhibit message sending.
287            (TableGrid.issue): Only send the message if not inhibited.
288            (LayerTableGrid.select_shape): Use the new methods to make sure
289            that no ROW_SELECTED message is sent while we're updating the
290            selected rows to match the selected shapes.
291    
292    2003-05-02  Jan-Oliver Wagner <[email protected]>
293    
294            Implementation of MemoryTable.
295    
296            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
297            implementation that operates on a list of tuples. All of the data
298            are kept in the memory.
299    
300            * test/test_table.py (MemoryTableTest): New.
301    
302            * test/test_transientdb.py (SimpleTable): Removed.
303            (TestTransientTable.test_transient_joined_table,
304            (TestTransientTable.test_transient_table_read_twice): Replaced
305            SimpleTable by MemoryTable.
306    
307    2003-04-30  Jonathan Coles   <[email protected]>
308    
309            * Data/iceland_sample.thuban: Now contains correct projections
310            for each of the layers.
311    
312            * Resources/Projections/defaults.proj: Geographic projection
313            contains unit conversion parameter.
314    
315    2003-04-30  Jonathan Coles   <[email protected]>
316    
317            The most important part of this putback is the projection changes.
318            It should now be possible to specify the projection that a layer
319            is in and then specify a different projection for the map. The
320            projection dialog has an extra parameter for a geographic projection
321            which lets the user select if the input is in degrees or radians.
322    
323            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
324            to say that the parameter is a tuple of unprojected
325            points (which is what the callers to this method were assuming).
326            Also, since the points are unprojected we need to projected them.
327    
328            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
329            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
330            groups are selected, move the layer up/down. Fixes RTbug #1833.
331    
332            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
333    
334            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
335            parameter in call to SetClientData.
336            (GeoPanel): Add support for selecting the units that the
337            source data is in (Radians or Degrees).
338    
339            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
340            the rendering loop by reducing the number of if's, removing the
341            unnecessary try/except block, and checking if the old group
342            is the same as the new one (which happens a lot if there is
343            no classification, or lots of shapes are in the same group).
344    
345            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
346            around the redraw routine to try to catch problems that the user
347            may create by selecting invalid projections for the data set and
348            map. Clears the display if there are any problems and prints the
349            error.
350            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
351            rectangle.
352    
353            * extensions/thuban/wxproj.cpp (project_point): First invert the
354            supplied point (which should be in projected coordinates) using
355            the layer's projection and then project the point using the
356            map's projection.
357            (project_points): Use project_point() to project each point.
358    
359    2003-04-30  Jan-Oliver Wagner <[email protected]>
360    
361            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
362            don't set the Classification to None if the classfication field
363            is None (ie only a DEFAULT).
364    
365    2003-04-30  Bernhard Herzog  <[email protected]>
366    
367            * Thuban/UI/view.py: Fix some typos.
368    
369            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
370            not pop up the dialog if the selection becomes empty (this could
371            happen if e.g. a new selection is opened while the identify tool
372            is active and dialog had been closed)
373    
374    2003-04-30  Bernhard Herzog  <[email protected]>
375    
376            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
377            instance variable read_record_last_result
378            (TransientTableBase.read_record): Make sure reading the same
379            record twice works. The implementation uses the new instance
380            variable read_record_last_result
381    
382            * test/test_transientdb.py
383            (TestTransientTable.test_transient_table_read_twice): New test
384            case for the above bug-fix.
385    
386    2003-04-29  Jonathan Coles   <[email protected]>
387    
388            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
389    
390            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
391    
392            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
393            (ClassTable.SetValueAsCustom): Rename keyword argument in
394            ClassGroup* constructors to match argument name.
395    
396    2003-04-29  Bernhard Herzog  <[email protected]>
397    
398            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
399            transient DB if it exists to make sure it doesn't leave a journal
400            file in the temp directory.
401    
402            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
403            self.conn to None after closing the connection to make sure it's
404            not closed twice
405    
406    2003-04-29  Jonathan Coles   <[email protected]>
407    
408            Add a visible parameter in the layer XML tag. The default value is
409            "true". If anything other than "false" is specified we also assume
410            "true". Addresses RTbug #1025.
411    
412            * Doc/thuban.dtd: Add visible parameter to a layer.
413    
414            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
415            of visible from 1 to True.
416            (Layer.__init__): Change default value of visible from 1 to True.
417    
418            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
419            parameter.
420    
421            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
422            parameter.
423    
424            * test/test_load.py: Add new test data contents_test_visible.
425            (LoadSessionTest.setUp): save test data.
426            (LoadSessionTest.testLayerVisibility): Test if the visible flag
427            is loaded correctly.
428    
429            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
430            for saving an invisible layer.
431    
432    2003-04-29  Jonathan Coles   <[email protected]>
433    
434            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
435            legend dialog box and tell it to change its map to the one
436            supplied to SetMap(). Fixes RTbug #1770.
437    
438    2003-04-29  Bernhard Herzog  <[email protected]>
439    
440            Next step of table implementation. Introduce a transient database
441            using SQLite that some of the data is copied to on demand. This
442            allows us to do joins and other operations that require an index
443            for good performance with reasonable efficiency. Thuban now needs
444            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
445            haven't tested that.
446            
447            * Thuban/Model/transientdb.py: New. Transient database
448            implementation.
449    
450            * test/test_transientdb.py: New. Tests for the transient DB
451            classes.
452    
453            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
454            classes to help automatically remove temporary files and
455            directories.
456            (Session.__init__): New instance variables temp_dir for the
457            temporary directory and transient_db for the SQLite database
458            (Session.temp_directory): New. Create a temporary directory if not
459            yet done and return its name. Use AutoRemoveDir to have it
460            automatically deleted
461            (Session.TransientDB): Instantiate the transient database if not
462            done yet and return it.
463    
464            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
465            AutoTransientTable so that data is copied to the transient DB on
466            demand.
467            (SimpleStore): New class that simply combines a table and a
468            shapefile
469    
470            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
471            DBFTable and update its doc-string to reflect the fact that this
472            is only the table interface to a DBF file. Table is now an alias
473            for DBFTable for temporary backwards compatibility.
474    
475            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
476            the last reference to the session goes away so that the temporary
477            files are removed properly.
478    
479            * test/test_load.py (LoadSessionTest.tearDown): Remove the
480            reference to the session to make sure the temporary files are
481            removed.
482    
483    2003-04-29  Bernhard Herzog  <[email protected]>
484    
485            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
486            the __parser instance variable into a normal local variable in
487            read. It's only used there and read will never be called more than
488            once. Plus it introduces a reference cycle that keeps can keep the
489            session object alive for a long time.
490    
491    2003-04-29  Jonathan Coles   <[email protected]>
492    
493            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
494            Projection an immutable item. Fixes RTbug #1825.
495            (Projection.__init__): Initialize instance variables here.
496            (ProjFile.Replace): New. Replace the given projection object with
497            the new projection object. This solves the problem of needing the
498            mutator Projection.SetProjection() in the ProjFrame class and
499            allows a projection to change parameters without changing its
500            location in the file.
501    
502            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
503            be of type wxSAVE and should verify overwriting a file.
504    
505            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
506            ProjFile.Replace() method instead of the mutator
507            Projection.SetProjection(). Also requires that we reassign the
508            client data to the new projection.
509    
510            * test/test_proj.py (TestProjection.test): Test GetName() and
511            GetAllParameters()
512            (TestProjFile.test): Remove tests for Set*() methods. Add tests
513            for Replace().
514    
515    2003-04-25  Jonathan Coles   <[email protected]>
516    
517            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
518            to save the name of the projection.
519    
520            * test/test_save.py (SaveSessionTest.testLayerProjection): New
521            test to verify layer projections are saved correctly.
522    
523    2003-04-25  Jonathan Coles   <[email protected]>
524    
525            * Thuban/Model/proj.py (Projection.SetName): Set the name
526            to "Unknown" if name is None.
527            (Projection.SetAllParameters): New. Set the projection's
528            parameter list to the one supplied.
529            (Projection.SetProjection): New. Set the projection's
530            properties to those of the supplied Projection.
531    
532            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
533            the dialog title to include the map's title.
534            (MainWindow.LayerProjection): Set the dialog title to include
535            the layer's title.
536    
537            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
538            error dialogs into a single method call.
539            (ProjFrame.__VerifyButtons): Add more states to check.
540            (ProjFrame.__GetProjection): Return the current state of an
541            edited projection or None.
542            (ProjFrame.__FillAvailList): Remove checks for states that
543            shouldn't exist.
544            (ProjFrame._OnNew): Clear all selected items and supply
545            a projection panel if necessary.
546    
547            * test/test_proj.py (TestProjFile.test): Add tests for
548            ProjFile.SetAllParameters, ProjFile.SetProjection,
549            ProjFile.SetName.
550    
551    2003-04-25  Jonathan Coles   <[email protected]>
552    
553            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
554            takes an optional argument to select the current projection.
555            This does not guarantee that the item is visible due to
556            limited wxWindows functionality. Fixes RTBug #1821.
557    
558    2003-04-25  Jonathan Coles   <[email protected]>
559    
560            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
561            the projection name and use it when constructing the Projection
562            object.
563    
564            * Thuban/Model/proj.py (Projection.__init__): Change the default
565            value for 'name' to None and then test if name is equal to None
566            in the body of the constructor. This way the caller doesn't have to
567            know what the default value should be. Namely, useful in load.py
568            where we have to pick a default value if the 'name' parameter
569            doesn't exist in the XML file.
570    
571            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
572            Tests a file where a layer has a projection.
573    
574    2003-04-25  Jonathan Coles   <[email protected]>
575    
576            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
577            tree for projection information.
578    
579            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
580            XMLReader.GetFileName.
581            (SessionLoader): Added support for loading projection tags that
582            appear inside a layer.
583    
584            * Thuban/Model/proj.py (ProjFile): Document the class. Move
585            back to using a list because the order of the projections in
586            the file is important to maintain. Fixes RTbug #1817.
587    
588            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
589            to ProjFile.GetFilename.
590    
591            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
592            information.
593    
594            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
595            ProjFrame._OnSaveAs. Removed old dead code from previous
596            implementation.
597            (ProjFrame._OnExport): Add support for exporting more than one
598            projection to a single file.
599            (ProjFrame.__FillAvailList): use string formatting (% operator)
600            to build strings that are (partly) translated. Fixes RTbug #1818.
601    
602            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
603            class.
604    
605    2003-04-24  Bernhard Herzog  <[email protected]>
606    
607            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
608    
609            * po/fr.po: New. French translation by Daniel Calvelo Aros
610    
611            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
612            empty strings.
613    
614    2003-04-24  Jonathan Coles   <[email protected]>
615    
616            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
617            implement the interface that the ProjFrame dialog expects.
618    
619            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
620            name of the projection to be changed.
621            (ProjFile): Use a dictionary instead of a list so that removing
622            projections is easier and we are sure about uniqueness.
623            (ProjFile.Remove): Remove the given projection object.
624    
625            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
626            Return a list with only one projection file instead of searching for
627            any projection file. This simplifies many things if the user can
628            only have one system file and one user file.
629    
630            * Thuban/UI/classgen.py: Change all references to
631            genCombo to genChoice.
632    
633            * Thuban/UI/mainwindow.py: Add a Projection option under the
634            layer menu.
635            (MainWindow.LayerProjection): New. Open up a projection window
636            for a layer.
637    
638            * Thuban/UI/projdialog.py: Large changes to how the dialog is
639            laid out. Use three panels instead of one. One for the list of
640            projections, one for the edit controls, and one for the buttons.
641            Fixed resizing problems so that the dialog resizes correctly
642            when the projection panel changes. Added import/export, save, and
643            new buttons/functionality.
644    
645    2003-04-24  Bernhard Herzog  <[email protected]>
646    
647            First step towards table management. Introduce a simple data
648            abstraction so that we replace the data a layer uses more easily
649            in the next step.
650    
651            * Thuban/Model/data.py: New file with a simple data abstraction
652            that bundles shapefile and dbffile into one object.
653    
654            * Thuban/Model/session.py (Session.OpenShapefile): New method to
655            open shapefiles and return a shape store object
656    
657            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
658            object instead of a shapefile filename. This introduces a new
659            instance variable store holding the datastore. For intermediate
660            backwards compatibility keep the old instance variables.
661            (open_shapefile): Removed. No longer needed with the shape store.
662            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
663            get the shape store used by a layer.
664            (Layer.Destroy): No need to explicitly destroy the shapefile or
665            table anymore.
666    
667            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
668            (MainWindow.AddLayer): Use the session's OpenShapefile method to
669            open shapefiles
670    
671            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
672            session's OpenShapefile method to open shapefiles
673    
674            * test/test_classification.py
675            (TestClassification.test_classification): Use the session's
676            OpenShapefile method to open shapefiles and build the filename in
677            a more platform independed way
678    
679            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
680            Implement to have a session to use in the tests
681            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
682            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
683            session's OpenShapefile method to open shapefiles
684            (TestLayerLegend.setUp): Instantiate a session so that we can use
685            it to open shapefiles.
686            (TestLayerLegend.tearDown): Make sure that all references to
687            layers and session are removed otherwise we may get a resource
688            leak
689    
690            * test/test_map.py (TestMapAddLayer.test_add_layer)
691            (TestMapWithContents.setUp): Instantiate a session so that we can
692            use it to open shapefiles.
693            (TestMapWithContents.tearDown): Make sure that all references to
694            layers, maps and sessions are removed otherwise we may get a
695            resource leak
696            ("__main__"): use support.run_tests() so that more info about
697            uncollected garbage is printed
698    
699            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
700            session's OpenShapefile method to open shapefiles
701            ("__main__"): use support.run_tests() so that more info about
702            uncollected garbage is printed
703    
704            * test/test_selection.py (TestSelection.tearDown): Make sure that
705            all references to the session and the selection are removed
706            otherwise we may get a resource leak
707            (TestSelection.get_layer): Instantiate a session so that we can
708            use it to open shapefiles.
709            ("__main__"): use support.run_tests() so that more info about
710            uncollected garbage is printed
711    
712            * test/test_session.py (TestSessionBase.tearDown)
713            (TestSessionWithContent.tearDown): Make sure that all references
714            to the session and layers are removed otherwise we may get a
715            resource leak
716            (TestSessionWithContent.setUp): Use the session's OpenShapefile
717            method to open shapefiles
718    
719    2003-04-24  Jonathan Coles   <[email protected]>
720    
721            * Thuban/Model/load.py (XMLReader.read): Should have been checking
722            if the file_or_filename object had the 'read' attribute.
723    
724    2003-04-23  Jonathan Coles   <[email protected]>
725    
726            * Thuban/Model/resource.py: Fixes RTbug #1813.
727            (ReadProjFile): Add documentation about which exceptions are raised.
728            Always pass the exceptions up to the caller.
729            (GetProjFiles): If the directory can't be read return an empty list.
730            If any of the proj files can't be read skip that file and go
731            on to the next one.
732    
733            * test/test_proj.py: Added test cases to handle nonexistent files,
734            unreadable files, and files that don't parse correctly.
735    
736    2003-04-23  Jonathan Coles   <[email protected]>
737    
738            Projection dialog. Allows the user to select from a list
739            of projection templates and optionally edit them and save new ones.
740    
741            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
742            (ProjPanel): Base class for projection specific panels.
743            (TMPanel): Projection panel for Transverse Mercartor.
744            (UTMPanel): Projection panel for Universal Transverse Mercartor.
745            (LCCPanel): Projection panel for Lambert Conic Conformal.
746            (GeoPanel): Projetion panel for Geographic Projection.
747    
748    2003-04-23  Jonathan Coles   <[email protected]>
749    
750            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
751            promote symmetry. There now exists XMLReader and XMLWriter.
752            (XMLReader.read): New. Call to read the given file descriptor or
753            filename.
754            (XMLReader.close): New. Make sure the file is closed.
755            (XMLReader.GetFileName): New. Return just the file name that is being
756            read from.
757            (XMLReader.GetDirectory): New. Return just the directory of the file
758            that is being read.
759            (XMLReader.AddDispatchers): New. Take a dictionary which contains
760            the names of functions to call as the XML tree is parsed.
761            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
762            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
763            (SessionLoader): Removed class variables start_dispatcher and
764            end_dispatcher since this functionality is now part of a class
765            instance. Fixes RTbug #1808.
766            (SessionLoader.__init__): Add dispatcher functions.
767            (load_xmlfile): Code was moved into the XMLReader.read().
768            (load_session): Use modified SessionLoader.
769    
770            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
771            map's projection.
772    
773            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
774            GetAllParameters.
775            (Projection.GetParameter): Returns the value for the given parameter.
776    
777            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
778            (GetProjFiles): Renamed from GetProjections. Now returns a list
779            of ProjFile objects.
780            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
781            a list of ProjFile objects whose files are not user defined.
782            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
783            list of ProjFile objects whose files are user defined.
784            (ProjFileReader): Extend new XMLReader.
785    
786            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
787            promote symmetry.
788    
789            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
790            control instead of a wxComboBox. wxChoice controls do not generate
791            events as the uses highlights possible choices which fixes problems
792            with resizing the dialog when the use selects an option.
793    
794            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
795            control instead of a wxComboBox.
796    
797            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
798            dialog.
799    
800            * test/test_proj.py (TestProjection.test): New tests for GetParameter
801            method.
802    
803    2003-04-22  Bernhard Herzog  <[email protected]>
804    
805            * Thuban/UI/mainwindow.py: Remove some unused imports and global
806            constants
807    
808            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
809            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
810    
811    2003-04-17  Bernhard Herzog  <[email protected]>
812    
813            * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
814            (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
815            anymore.
816            (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
817            (Layer.ShapeType, Layer.Shape): No need to call
818            self.open_shapefile since it's always called in __init__
819    
820            * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
821            In wxPython 2.4 there's no need to extend MainLoop anymore since
822            wxPython itself makes sure OnExit is called.
823    
824    2003-04-16  Jonathan Coles   <[email protected]>
825    
826            Initial putback of projection management code. Includes new
827            classes to read and write projection files. The current load
828            and save classes were abstracted a bit so they could be reused.
829            The Projection class was extended to provide new methods and
830            have a name.
831    
832            * Thuban/Model/load.py (XMLProcessor): New. Contains all the
833            general XML reading methods that were part of ProcessSession.
834    
835            * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
836            name.
837            (ProjFile): New. Represents a file that contains projection
838            information.
839    
840            * Thuban/Model/resource.py: New. Contains general utilities
841            for read and writing projection files.
842    
843            * Thuban/Model/save.py (XMLSaver): New. Contains all the
844            general XML writing methods that were part of SessionSaver.
845            (SessionSaver): Renamed from Saver.
846    
847            * test/test_proj.py: New test cases for the projection
848            file read and write functions.
849    
850    2003-04-16  Jonathan Coles   <[email protected]>
851    
852            * Thuban/Model/classification.py: Use repr() around values
853            in the ClassGroup*.__repr__() methods so it is clearer when
854            a value is a string and when it is a number.
855    
856            * test/test_load.py: Rework the classification test to test
857            that we can load old files.
858            (testLabels): Test a file where the groups have labels.
859    
860    2003-04-16  Bernhard Herzog  <[email protected]>
861    
862            Safer implementation of the performance enhancements of the
863            low-level renderer:
864            
865            * extensions/thuban/wxproj.cpp (extract_projection)
866            (extract_pointer): Rename extract_projection to extract_pointer
867            and redefine its purpose to return the pointer stored in a CObject
868            returned by the object's cobject method. Update all callers.
869            (s_draw_info, free_draw_info, draw_polygon_init): Implement the
870            handling of these low-level parameters so that each s_draw_info
871            instance is handled as a CObject at python level that also
872            contains real references to the actual python objects which
873            contain the values in the struct. Add free_draw_info as the
874            destructor.
875            (draw_polygon_shape): Add the py_draw_info parameter which must a
876            cobject containing an s_draw_info pointer.
877    
878            * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
879            method to instantiat the low-level render parameter
880            (MapRenderer.draw_shape_layer): Use the new method. Remove some
881            commented out code.
882            (MapRenderer.draw_polygon_shape): Make the first parameter not the
883            layer but the low-level render parameter
884            (ScreenRenderer.draw_shape_layer): Use the low-level render
885            parameter.
886    
887    2003-04-15  Jonathan Coles   <[email protected]>
888    
889            * Thuban/Model/classification.py: Implemented __repr__ for
890            the ClassGroup* classes to make debugging a bit easier.
891            (ClassGroup.SetLabel): Check that the string is an instance
892            of StringTypes not StringType. Accounts for Unicode strings.
893    
894            * Thuban/Model/color.py: Implemented __repr__ to make
895            debugging a bit easier.
896    
897            * Thuban/Model/save.py (Saver.write_classification): Need to
898            save the group label.
899    
900            * test/test_load.py (testClassification): New. Loads the
901            iceland_sample_test.thuban file and checks if it was loaded
902            correctly.
903    
904    2003-04-15  Jonathan Coles   <[email protected]>
905    
906            * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
907            to improve rendering performance by initializing the variables
908            that are not change each time draw_polygon_shape() is called.
909            The values are stored in a global struct draw_info.
910            (draw_polygon_shape): Removed initialization code that is
911            now in draw_polygon_init().
912    
913            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
914            drawing initialization call to draw_polygon_init()
915            (MapRenderer.draw_polygon_shape): Use new signature of
916            draw_polygon_shape.
917    
918            * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
919            weirdness by setting the range to (1, maxint).
920    
921            * Thuban/Model/classification.py (ClassGroupProperties): Make
922            instance variables private and optimize comparison operator
923            by first checking if the color references are the same.
924            (ClassGroupSingleton): Make instance variables private.
925            (ClassGroupRange): Make instance variables private.
926    
927            * HOWTO-Release: Filled in missing steps for releasing packages.
928    
929    2003-04-15  Bernhard Herzog  <[email protected]>
930    
931            First stab at internationalized messages:
932    
933            * Thuban/__init__.py (_): Implement the translation function for
934            real using the python gettext module.
935    
936            * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
937            translate empty strings.
938    
939            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
940            Add a missing space to a warning message
941    
942            * po/README: New. Notes about the management of the translation
943            files.
944    
945            * po/Makefile: New. Makefile to help manage the translation files.
946    
947            * po/es.po: New. Spanish translation by Daniel Calvelo Aros
948    
949            * MANIFEST.in: Include the *.mo files in Resources/Locale and the
950            translations and support files in po/
951    
952            * setup.py (data_files): Add the *.mo files to the data_files too
953    
954            * README: Add note about the translations when building from CVS
955    
956    2003-04-14  Jonathan Coles   <[email protected]>
957    
958            * Thuban/UI/dock.py: Fixes some window resizing problems most
959            noticable under windows. Always assume the button bitmaps will
960            be there. Code clean up.
961            (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
962            images for the dock/undock button to the same images.
963            Work around for RTbug #1801.
964    
965            * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
966            be allowed to grow within the sizer. Fixes a bug under Windows
967            where the toolbar wasn't being drawn.
968    
969    2003-04-14  Frank Koormann   <[email protected]>
970    
971            * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
972            Updated design to try to make the button functionality more
973            transparent.
974    
975    2003-04-14  Jonathan Coles   <[email protected]>
976    
977            * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
978            finalize the intialization of the panel.
979    
980            * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
981            creation of the panel. Should be the last thing called in the
982            initializer of a subclass.
983    
984            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
985            set the current selections in the combo boxes. This is needed
986            under Windows.
987    
988            * Thuban/UI/classifier.py (Classifier.__init__): Add a top
989            level panel to the dialog so that the background colors are
990            consistent under Windows.
991    
992    2003-04-11  Jonathan Coles   <[email protected]>
993    
994            * Thuban/UI/classgen.py: Change color ramps to start at white
995            not black.
996    
997            * Thuban/UI/legend.py: Enable/disable the legend buttons when
998            the legend changes. Fixes RTbug #1793.
999    
1000            * test/test_classification.py: Added test for copying of
1001            classifications.
1002    
1003    2003-04-11  Jonathan Coles   <[email protected]>
1004    
1005            * Thuban/UI/resource.py: New. Centralize the loading of resources
1006            such as bitmaps.
1007    
1008            * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
1009            added images to the move buttons, added 'reverse' button.
1010            (CustomRampPanel.__init__): Added images to the move buttons.
1011            (GreyRamp): New. Generates a ramp from white to black.
1012            (HotToColdRamp): New. Generates a ramp from cold to hot colors.
1013    
1014            * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
1015            ID_PROPERTY_*.
1016            (Classifier.__init__): Minor changes to the layout.
1017            (Classifier._OnTitleChanged): Listen for when the user edits the
1018            title and update the dialog's title and the layer's title.
1019    
1020            * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
1021    
1022            * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
1023            (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
1024            if the layer's title changes.
1025    
1026            * Thuban/UI/mainwindow.py: Added new menu item and associated code
1027            to open a dialog to rename the map.
1028            (MainWindow): Use new resource class to import bitmaps.
1029    
1030    2003-04-11  Jonathan Coles   <[email protected]>
1031    
1032            * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
1033            Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
1034            Resources/Bitmaps/group_use_none.xpm,
1035            Resources/Bitmaps/group_use_not.xpm,
1036            Resources/Bitmaps/hide_layer.xpm,
1037            Resources/Bitmaps/layer_properties.xpm,
1038            Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
1039            Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
1040            New.
1041    
1042    2003-04-10  Jonathan Coles   <[email protected]>
1043    
1044            * Thuban/Model/classification.py: (ClassGroupRange.__init__):
1045            Should pass group to ClassGroup constructor.
1046    
1047    2003-04-10  Jonathan Coles   <[email protected]>
1048    
1049            * Thuban/Model/classification.py: (ClassGroup): Move all the common
1050            methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
1051            here. Implement SetVisible(), IsVisible().
1052            (ClassGroup.__init__): Add group parameter which acts as a copy
1053            constructor.
1054    
1055            * Thuban/UI/classifier.py (ClassTable): Add a new column for the
1056            "Visible" check boxes.
1057            (Classifier): Rename the buttons and refactor the code to match
1058            the new labels.
1059    
1060            * Thuban/UI/legend.py: Classify button is now called "Properties".
1061            Refactored the code to change variable names.
1062            (LegendTree.__FillTreeLayer): Only list a group if it is visible.
1063    
1064            * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
1065            MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
1066            renamed to MainWindow.LayerEditProperties.
1067            (MainWindow.ToggleLegend): Don't include map name in legend title.
1068            (MainWindow.SetMap): Added the map name to the window title.
1069            (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
1070            MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
1071            Functionality is found in the layer properties dialog.
1072    
1073            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
1074            draw visible groups.
1075    
1076    2003-04-09  Jonathan Coles   <[email protected]>
1077    
1078            * Thuban/UI/classgen.py: Modifications to allow simple
1079            addition and selection of new color schemes.
1080            (MonochromaticRamp): New. Generates a ramp between two colors.
1081            (RedRamp): New. Generates a ramp of all red.
1082            (GreenRamp): New. Generates a ramp of all green.
1083            (BlueRamp): New. Generates a ramp of all blue.
1084    
1085    2003-04-09  Jonathan Coles   <[email protected]>
1086    
1087            * Thuban/Model/classification.py (Classification.__deepcopy__):
1088            Need to copy over field and fieldType attributes.
1089    
1090            * Thuban/Model/table.py (Table.field_range): New. Retrive the
1091            maximum and minimum values over the entire table for a given
1092            field.
1093            (Table.GetUniqueValues): New. Retrieve all the unique values
1094            in the table for a given field.
1095    
1096            * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
1097            (GenUniquePanel): New. Controls to allow the user to select
1098            which unique field values they would like in the classification.
1099            (CustomRampPanel): Code that was in ClassGenDialog that allows
1100            the user to select the properties for a custom ramp.
1101            (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
1102    
1103            * Thuban/UI/classifier.py: Removed a lot of debugging code.
1104            (Classifier._SetClassification): Callback method so that the
1105            class generator can set the classification in the grid.
1106            (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
1107            editing of a group properties class into a wxWindows control.
1108    
1109            * Thuban/UI/dock.py: It was decided that if the user closes
1110            a dockable window the window should simply hide itself. That
1111            way if the user wants to show the dock again it appears in the
1112            same place as it was when it was closed.
1113            (DockableWindow.Destroy): Call renamed method OnDockDestroy().
1114            (DockableWindow._OnButtonClose): Hide the window instead of
1115            destroying it.
1116            (DockableWindow._OnClose): Hide the window instead of
1117            destroying it.
1118    
1119            * Thuban/UI/legend.py (LegendTree): Use a private method to
1120            consistently set the font and style of the text. Fixes RTbug #1786.
1121    
1122            * Thuban/UI/mainwindow.py: Import just the Classifier class.
1123    
1124    2003-04-07  Bernhard Herzog  <[email protected]>
1125    
1126            * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
1127            to the map module
1128    
1129    2003-04-07  Bernhard Herzog  <[email protected]>
1130    
1131            * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
1132            favor of ToggleSessionTree
1133            (MainWindow.ToggleSessionTree): New method to toggle visibility of
1134            the session tree.
1135            (MainWindow.SessionTreeShown): New method to return whether the
1136            session tree is currently shown.
1137            (MainWindow.ToggleLegend): New method to toggle visibility of the
1138            legend
1139            (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
1140            LegendShown
1141            (MainWindow.LegendShown): New method to return whether the legend
1142            is currently shown.
1143            (_method_command): Add checked parameter so we can define check
1144            menu items
1145            (_has_tree_window_shown, _has_legend_shown): Use the appropriate
1146            mainwindow methods.
1147            (show_session_tree, show_legend commands): Removed.
1148            (toggle_session_tree, toggle_legend commands): New commands to
1149            toggle the visibility of the dialogs
1150    
1151    2003-04-07  Jonathan Coles   <[email protected]>
1152    
1153            * Thuban/UI/classgen.py: Fix Windows problem.
1154    
1155            * Thuban/UI/dock.py: Fix Windows problem.
1156    
1157            * Thuban/UI/mainwindow.py: Use False instead of false.
1158            (MainWindow.ShowLegend): Remove unnecessary switch parameter.
1159    
1160    2003-04-07  Jonathan Coles   <[email protected]>
1161    
1162            Since we now say that the order of the groups in a classification
1163            matters, it makes sense to be able to manipulate that order. Most
1164            of the changes to Thuban/Model/classification.py are to that end.
1165    
1166            * Thuban/Model/classification.py (Classification.AppendGroup,
1167            Classification.InsertGroup, Classification.ReplaceGroup,
1168            Classification.RemoveGroup, Classification.GetGroup): Do as the
1169            names imply.
1170            (Classification.FindGroup): This was called GetGroup, but GetGroup
1171            takes an index, while FindGroup takes a value.
1172            (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
1173            REFERENCE. Currently there is a cyclic reference between the layer
1174            and its classification. If the classification doesn't need to know
1175            its owning layer we can change this, since it may make sense to be
1176            able to use the same classification with different layers.
1177    
1178            * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
1179    
1180            * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
1181            not AddGroup()
1182    
1183            * Thuban/UI/classifier.py: Now that we can depend on the order in
1184            a Classification and have methods to manipulate that order we don't
1185            need to use our own data structures in the grid. We can simply make
1186            the grid/table access the information they need from a copy of
1187            the classification object.
1188            (Classifier._OnCloseBtn): Event handler for when the user clicks
1189            'Close'. This is needed so if the user applies changes and then
1190            continues to change the table the user has the option of discarding
1191            the most recent changes and keeping what they applied.
1192    
1193            * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
1194            into the same group.
1195    
1196            * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
1197            with a really old version of proj, PJ_VERSION won't even be defined.
1198            If it isn't defined then just compile so that the function always
1199            returns Py_False.
1200    
1201            * test/test_classification.py: Fix tests to use the renamed methods.
1202            Still need to write tests for the new methods.
1203    
1204    2003-04-04  Jonathan Coles   <[email protected]>
1205    
1206            * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
1207            call to SetSelection out of the method and before the call
1208            to __SelectField in __init__. This prevents a recursion of events
1209            when _OnFieldSelect is triggered by the user.
1210    
1211    2003-04-04  Jonathan Coles   <[email protected]>
1212    
1213            * Thuban/Model/classification.py: Rename Color.None to
1214            Color.Transparent.
1215            (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
1216            Don't bother copying the color, since Colors are immutable.
1217    
1218            * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
1219            Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
1220            Thuban/UI/renderer.py, Thuban/UI/view.py:
1221            Rename Color.None to Color.Transparent.
1222        
1223            * test/test_classification.py, test/test_load.py: Rename Color.None
1224            to Color.Transparent.
1225    
1226    2003-04-04  Jonathan Coles   <[email protected]>
1227    
1228            * Thuban/Model/classification.py: Fix assert calls.
1229            (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
1230            Copy the color parameter rather than hold onto a reference.
1231    
1232            * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
1233            the color object.
1234            (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
1235            are sure there exists only one refernce to Color.None in the system.
1236            This allows us to use 'is' rather than the comparision functions.
1237            
1238            * Thuban/Model/save.py: Fix assert calls.
1239            
1240            * Thuban/UI/classifier.py: Fix assert calls.
1241            (ClassGrid._OnCellDClick): Call up to the classifier to open the
1242            dialog to edit the groups properties.
1243            (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
1244            correctly if a cell is resized.
1245            (ClassTable.SetClassification): New. Changes the classification
1246            that is in the table.
1247            (ClassTable.__SetRow): Allow groups to be prepended.
1248            (Classifier): New code for opening the EditProperties and
1249            GenerateRanges dialogs.
1250            (SelectPropertiesDialog.__GetColor): Only set the color in the
1251            color dialog if the current color is not None.
1252            
1253            * Thuban/UI/dock.py: Fix assert calls.
1254            
1255            * Thuban/UI/legend.py: Fix assert calls.
1256            
1257            * Thuban/UI/renderer.py: Fix assert calls.
1258            
1259            * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
1260            classifications.
1261            (GenRangePanel): Panel specific to range generation.
1262            (GenSingletonPanel): Panel specific to singleton generation.
1263            (ClassGenerator): Class responsible for actually generating
1264            the classification from the data gathered in the dialog box.
1265            (PropertyRamp): Generates properties whose values range from
1266            a starting property to an ending property.
1267    
1268    2003-04-03  Bernhard Herzog  <[email protected]>
1269    
1270            * test/support.py (print_garbage_information): New function that
1271            prints information about still connected messages and memory
1272            leaks.
1273            (run_suite): Removed.
1274            (run_tests): New function for use as a replacement of
1275            unittest.main in the test_* files. This one calls
1276            print_garbage_information at the end.
1277    
1278            * test/runtests.py (main): Use support.print_garbage_information
1279    
1280            * test/test_layer.py: Use support.run_tests instead of
1281            unittest.main so we get memory leak information
1282            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1283            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1284            (TestLayerLegend.test_visibility): Call the layer's Destroy method
1285            to fix a memory leak.
1286    
1287            * test/test_classification.py: Use support.run_tests instead of
1288            unittest.main so we get memory leak information
1289            (TestClassification.test_classification): Call the layer's Destroy
1290            method to fix a memory leak.
1291    
1292    2003-04-02  Bernhard Herzog  <[email protected]>
1293    
1294            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
1295            Handle the reference counts of the return value and errors in
1296            PyArg_ParseTuple correctly.
1297    
1298            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
1299            sure the filename is absolute to avoid problems when saving the
1300            session again
1301    
1302            * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
1303    
1304    2003-04-01  Jonathan Coles   <[email protected]>
1305    
1306            *  Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
1307            that there actually are points in the returned list of points
1308            before trying to index into the list. The list may be empty if
1309            the shape is a Null Shape.
1310    
1311    2003-04-01  Bernhard Herzog  <[email protected]>
1312    
1313            * test/test_map.py: Don't use from <module> import *
1314    
1315    2003-04-01  Jonathan Coles   <[email protected]>
1316    
1317            * Thuban/Model/session.py: Use LAYER_CHANGED instead of
1318            LAYER_LEGEND_CHANGED
1319    
1320            * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
1321            self.Destroy() to close the window after yesterday's changes.
1322    
1323            * test/test_map.py, test/test_session.py: Fix messages that
1324            are sent from maps and layers.
1325    
1326  2003-03-31  Jonathan Coles   <[email protected]>  2003-03-31  Jonathan Coles   <[email protected]>
1327    
1328          * Thuban/UI/classifier.py: Commented out some debugging statements.          * Thuban/UI/classifier.py: Commented out some debugging statements.

Legend:
Removed from v.575  
changed lines
  Added in v.857

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26