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

Legend:
Removed from v.207  
changed lines
  Added in v.1069

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26