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

Legend:
Removed from v.238  
changed lines
  Added in v.852

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26