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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1134 - (hide annotations)
Thu Jun 5 13:28:04 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/ChangeLog
File size: 171882 byte(s)
Minor Updates for Win32 compliance

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26