/[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

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

Legend:
Removed from v.228  
changed lines
  Added in v.1214

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26