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

Legend:
Removed from v.152  
changed lines
  Added in v.809

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26