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

Legend:
Removed from v.210  
changed lines
  Added in v.1089

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26