/[thuban]/branches/WIP-pyshapelib-bramz/ChangeLog
ViewVC logotype

Annotation of /branches/WIP-pyshapelib-bramz/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1143 - (hide annotations)
Tue Jun 10 09:42:10 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 174581 byte(s)
update ChangeLog

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

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26