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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 715 - (hide annotations)
Wed Apr 23 08:47:18 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 98785 byte(s)
updated ChangeLog

1 jonathan 715 2003-04-23 Jonathan Coles <[email protected]>
2    
3     * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
4     promote symmetry. There now exists XMLReader and XMLWriter.
5     (XMLReader.read): New. Call to read the given file descriptor or
6     filename.
7     (XMLReader.close): New. Make sure the file is closed.
8     (XMLReader.GetFileName): New. Return just the file name that is being
9     read from.
10     (XMLReader.GetDirectory): New. Return just the directory of the file
11     that is being read.
12     (XMLReader.AddDispatchers): New. Take a dictionary which contains
13     the names of functions to call as the XML tree is parsed.
14     (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
15     (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
16     (SessionLoader): Removed class variables start_dispatcher and
17     end_dispatcher since this functionality is now part of a class
18     instance. Fixes RTbug #1808.
19     (SessionLoader.__init__): Add dispatcher functions.
20     (load_xmlfile): Code was moved into the XMLReader.read().
21     (load_session): Use modified SessionLoader.
22    
23     * Thuban/Model/map.py (Map.GetProjection): New. Returns the
24     map's projection.
25    
26     * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
27     GetAllParameters.
28     (Projection.GetParameter): Returns the value for the given parameter.
29    
30     * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
31     (GetProjFiles): Renamed from GetProjections. Now returns a list
32     of ProjFile objects.
33     (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
34     a list of ProjFile objects whose files are not user defined.
35     (GetUserProjFiles): Renamed from GetUserProjections. Returns a
36     list of ProjFile objects whose files are user defined.
37     (ProjFileReader): Extend new XMLReader.
38    
39     * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
40     promote symmetry.
41    
42     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
43     control instead of a wxComboBox. wxChoice controls do not generate
44     events as the uses highlights possible choices which fixes problems
45     with resizing the dialog when the use selects an option.
46    
47     * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
48     control instead of a wxComboBox.
49    
50     * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
51     dialog.
52    
53     * test/test_proj.py (TestProjection.test): New tests for GetParameter
54     method.
55    
56 bh 703 2003-04-22 Bernhard Herzog <[email protected]>
57    
58 bh 705 * Thuban/UI/mainwindow.py: Remove some unused imports and global
59     constants
60    
61 bh 703 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
62     (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
63    
64 bh 700 2003-04-17 Bernhard Herzog <[email protected]>
65    
66 bh 701 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
67     (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
68     anymore.
69     (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
70     (Layer.ShapeType, Layer.Shape): No need to call
71     self.open_shapefile since it's always called in __init__
72    
73 bh 700 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
74     In wxPython 2.4 there's no need to extend MainLoop anymore since
75     wxPython itself makes sure OnExit is called.
76    
77 jonathan 688 2003-04-16 Jonathan Coles <[email protected]>
78    
79 jonathan 693 Initial putback of projection management code. Includes new
80     classes to read and write projection files. The current load
81     and save classes were abstracted a bit so they could be reused.
82     The Projection class was extended to provide new methods and
83     have a name.
84    
85     * Thuban/Model/load.py (XMLProcessor): New. Contains all the
86     general XML reading methods that were part of ProcessSession.
87    
88     * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
89     name.
90     (ProjFile): New. Represents a file that contains projection
91     information.
92    
93     * Thuban/Model/resource.py: New. Contains general utilities
94     for read and writing projection files.
95    
96     * Thuban/Model/save.py (XMLSaver): New. Contains all the
97     general XML writing methods that were part of SessionSaver.
98     (SessionSaver): Renamed from Saver.
99    
100     * test/test_proj.py: New test cases for the projection
101     file read and write functions.
102    
103     2003-04-16 Jonathan Coles <[email protected]>
104    
105 jonathan 688 * Thuban/Model/classification.py: Use repr() around values
106     in the ClassGroup*.__repr__() methods so it is clearer when
107     a value is a string and when it is a number.
108    
109     * test/test_load.py: Rework the classification test to test
110     that we can load old files.
111     (testLabels): Test a file where the groups have labels.
112    
113 bh 687 2003-04-16 Bernhard Herzog <[email protected]>
114    
115     Safer implementation of the performance enhancements of the
116     low-level renderer:
117    
118     * extensions/thuban/wxproj.cpp (extract_projection)
119     (extract_pointer): Rename extract_projection to extract_pointer
120     and redefine its purpose to return the pointer stored in a CObject
121     returned by the object's cobject method. Update all callers.
122     (s_draw_info, free_draw_info, draw_polygon_init): Implement the
123     handling of these low-level parameters so that each s_draw_info
124     instance is handled as a CObject at python level that also
125     contains real references to the actual python objects which
126     contain the values in the struct. Add free_draw_info as the
127     destructor.
128     (draw_polygon_shape): Add the py_draw_info parameter which must a
129     cobject containing an s_draw_info pointer.
130    
131     * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
132     method to instantiat the low-level render parameter
133     (MapRenderer.draw_shape_layer): Use the new method. Remove some
134     commented out code.
135     (MapRenderer.draw_polygon_shape): Make the first parameter not the
136     layer but the low-level render parameter
137     (ScreenRenderer.draw_shape_layer): Use the low-level render
138     parameter.
139    
140 jonathan 673 2003-04-15 Jonathan Coles <[email protected]>
141    
142 jonathan 680 * Thuban/Model/classification.py: Implemented __repr__ for
143     the ClassGroup* classes to make debugging a bit easier.
144     (ClassGroup.SetLabel): Check that the string is an instance
145     of StringTypes not StringType. Accounts for Unicode strings.
146    
147     * Thuban/Model/color.py: Implemented __repr__ to make
148     debugging a bit easier.
149    
150     * Thuban/Model/save.py (Saver.write_classification): Need to
151     save the group label.
152    
153     * test/test_load.py (testClassification): New. Loads the
154     iceland_sample_test.thuban file and checks if it was loaded
155     correctly.
156    
157     2003-04-15 Jonathan Coles <[email protected]>
158    
159 jonathan 673 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
160     to improve rendering performance by initializing the variables
161     that are not change each time draw_polygon_shape() is called.
162     The values are stored in a global struct draw_info.
163     (draw_polygon_shape): Removed initialization code that is
164     now in draw_polygon_init().
165    
166     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
167 jonathan 674 drawing initialization call to draw_polygon_init()
168     (MapRenderer.draw_polygon_shape): Use new signature of
169     draw_polygon_shape.
170 jonathan 673
171 jonathan 674 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
172     weirdness by setting the range to (1, maxint).
173 jonathan 673
174 jonathan 674 * Thuban/Model/classification.py (ClassGroupProperties): Make
175     instance variables private and optimize comparison operator
176     by first checking if the color references are the same.
177     (ClassGroupSingleton): Make instance variables private.
178     (ClassGroupRange): Make instance variables private.
179 jonathan 673
180 jonathan 674 * HOWTO-Release: Filled in missing steps for releasing packages.
181    
182 bh 672 2003-04-15 Bernhard Herzog <[email protected]>
183    
184     First stab at internationalized messages:
185    
186     * Thuban/__init__.py (_): Implement the translation function for
187     real using the python gettext module.
188    
189     * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
190     translate empty strings.
191    
192     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
193     Add a missing space to a warning message
194    
195     * po/README: New. Notes about the management of the translation
196     files.
197    
198     * po/Makefile: New. Makefile to help manage the translation files.
199    
200     * po/es.po: New. Spanish translation by Daniel Calvelo Aros
201    
202     * MANIFEST.in: Include the *.mo files in Resources/Locale and the
203     translations and support files in po/
204    
205     * setup.py (data_files): Add the *.mo files to the data_files too
206    
207     * README: Add note about the translations when building from CVS
208    
209 jonathan 669 2003-04-14 Jonathan Coles <[email protected]>
210    
211     * Thuban/UI/dock.py: Fixes some window resizing problems most
212     noticable under windows. Always assume the button bitmaps will
213     be there. Code clean up.
214     (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
215     images for the dock/undock button to the same images.
216     Work around for RTbug #1801.
217    
218     * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
219     be allowed to grow within the sizer. Fixes a bug under Windows
220     where the toolbar wasn't being drawn.
221    
222 frank 664 2003-04-14 Frank Koormann <[email protected]>
223    
224     * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
225     Updated design to try to make the button functionality more
226     transparent.
227    
228 jonathan 662 2003-04-14 Jonathan Coles <[email protected]>
229    
230     * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
231     finalize the intialization of the panel.
232    
233     * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
234     creation of the panel. Should be the last thing called in the
235     initializer of a subclass.
236    
237     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
238     set the current selections in the combo boxes. This is needed
239     under Windows.
240    
241     * Thuban/UI/classifier.py (Classifier.__init__): Add a top
242     level panel to the dialog so that the background colors are
243     consistent under Windows.
244    
245 jonathan 646 2003-04-11 Jonathan Coles <[email protected]>
246    
247 jonathan 662 * Thuban/UI/classgen.py: Change color ramps to start at white
248     not black.
249    
250     * Thuban/UI/legend.py: Enable/disable the legend buttons when
251     the legend changes. Fixes RTbug #1793.
252    
253     * test/test_classification.py: Added test for copying of
254     classifications.
255    
256     2003-04-11 Jonathan Coles <[email protected]>
257    
258 jonathan 647 * Thuban/UI/resource.py: New. Centralize the loading of resources
259     such as bitmaps.
260    
261     * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
262     added images to the move buttons, added 'reverse' button.
263     (CustomRampPanel.__init__): Added images to the move buttons.
264     (GreyRamp): New. Generates a ramp from white to black.
265     (HotToColdRamp): New. Generates a ramp from cold to hot colors.
266    
267     * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
268     ID_PROPERTY_*.
269     (Classifier.__init__): Minor changes to the layout.
270     (Classifier._OnTitleChanged): Listen for when the user edits the
271     title and update the dialog's title and the layer's title.
272    
273     * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
274    
275     * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
276     (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
277     if the layer's title changes.
278    
279     * Thuban/UI/mainwindow.py: Added new menu item and associated code
280     to open a dialog to rename the map.
281     (MainWindow): Use new resource class to import bitmaps.
282    
283     2003-04-11 Jonathan Coles <[email protected]>
284    
285 jonathan 646 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
286 jonathan 647 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
287     Resources/Bitmaps/group_use_none.xpm,
288     Resources/Bitmaps/group_use_not.xpm,
289     Resources/Bitmaps/hide_layer.xpm,
290     Resources/Bitmaps/layer_properties.xpm,
291     Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
292     Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
293     New.
294 jonathan 646
295 jonathan 636 2003-04-10 Jonathan Coles <[email protected]>
296    
297 jonathan 644 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
298     Should pass group to ClassGroup constructor.
299    
300     2003-04-10 Jonathan Coles <[email protected]>
301    
302 jonathan 636 * Thuban/Model/classification.py: (ClassGroup): Move all the common
303     methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
304     here. Implement SetVisible(), IsVisible().
305     (ClassGroup.__init__): Add group parameter which acts as a copy
306     constructor.
307    
308     * Thuban/UI/classifier.py (ClassTable): Add a new column for the
309     "Visible" check boxes.
310     (Classifier): Rename the buttons and refactor the code to match
311     the new labels.
312    
313     * Thuban/UI/legend.py: Classify button is now called "Properties".
314     Refactored the code to change variable names.
315     (LegendTree.__FillTreeLayer): Only list a group if it is visible.
316    
317     * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
318     MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
319     renamed to MainWindow.LayerEditProperties.
320     (MainWindow.ToggleLegend): Don't include map name in legend title.
321     (MainWindow.SetMap): Added the map name to the window title.
322     (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
323     MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
324     Functionality is found in the layer properties dialog.
325    
326     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
327     draw visible groups.
328    
329 jonathan 626 2003-04-09 Jonathan Coles <[email protected]>
330    
331 jonathan 634 * Thuban/UI/classgen.py: Modifications to allow simple
332     addition and selection of new color schemes.
333     (MonochromaticRamp): New. Generates a ramp between two colors.
334     (RedRamp): New. Generates a ramp of all red.
335     (GreenRamp): New. Generates a ramp of all green.
336     (BlueRamp): New. Generates a ramp of all blue.
337    
338     2003-04-09 Jonathan Coles <[email protected]>
339    
340 jonathan 626 * Thuban/Model/classification.py (Classification.__deepcopy__):
341     Need to copy over field and fieldType attributes.
342    
343     * Thuban/Model/table.py (Table.field_range): New. Retrive the
344     maximum and minimum values over the entire table for a given
345     field.
346     (Table.GetUniqueValues): New. Retrieve all the unique values
347     in the table for a given field.
348    
349     * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
350     (GenUniquePanel): New. Controls to allow the user to select
351     which unique field values they would like in the classification.
352     (CustomRampPanel): Code that was in ClassGenDialog that allows
353     the user to select the properties for a custom ramp.
354     (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
355    
356     * Thuban/UI/classifier.py: Removed a lot of debugging code.
357     (Classifier._SetClassification): Callback method so that the
358     class generator can set the classification in the grid.
359     (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
360     editing of a group properties class into a wxWindows control.
361    
362     * Thuban/UI/dock.py: It was decided that if the user closes
363     a dockable window the window should simply hide itself. That
364     way if the user wants to show the dock again it appears in the
365     same place as it was when it was closed.
366     (DockableWindow.Destroy): Call renamed method OnDockDestroy().
367     (DockableWindow._OnButtonClose): Hide the window instead of
368     destroying it.
369     (DockableWindow._OnClose): Hide the window instead of
370     destroying it.
371    
372     * Thuban/UI/legend.py (LegendTree): Use a private method to
373     consistently set the font and style of the text. Fixes RTbug #1786.
374    
375     * Thuban/UI/mainwindow.py: Import just the Classifier class.
376    
377 bh 623 2003-04-07 Bernhard Herzog <[email protected]>
378    
379 bh 625 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
380     to the map module
381    
382     2003-04-07 Bernhard Herzog <[email protected]>
383    
384 bh 623 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
385     favor of ToggleSessionTree
386     (MainWindow.ToggleSessionTree): New method to toggle visibility of
387     the session tree.
388     (MainWindow.SessionTreeShown): New method to return whether the
389     session tree is currently shown.
390     (MainWindow.ToggleLegend): New method to toggle visibility of the
391     legend
392     (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
393     LegendShown
394     (MainWindow.LegendShown): New method to return whether the legend
395     is currently shown.
396     (_method_command): Add checked parameter so we can define check
397     menu items
398     (_has_tree_window_shown, _has_legend_shown): Use the appropriate
399     mainwindow methods.
400     (show_session_tree, show_legend commands): Removed.
401     (toggle_session_tree, toggle_legend commands): New commands to
402     toggle the visibility of the dialogs
403    
404 jonathan 612 2003-04-07 Jonathan Coles <[email protected]>
405    
406 jonathan 619 * Thuban/UI/classgen.py: Fix Windows problem.
407    
408     * Thuban/UI/dock.py: Fix Windows problem.
409    
410     * Thuban/UI/mainwindow.py: Use False instead of false.
411     (MainWindow.ShowLegend): Remove unnecessary switch parameter.
412    
413     2003-04-07 Jonathan Coles <[email protected]>
414    
415 jonathan 612 Since we now say that the order of the groups in a classification
416     matters, it makes sense to be able to manipulate that order. Most
417     of the changes to Thuban/Model/classification.py are to that end.
418    
419     * Thuban/Model/classification.py (Classification.AppendGroup,
420     Classification.InsertGroup, Classification.ReplaceGroup,
421     Classification.RemoveGroup, Classification.GetGroup): Do as the
422     names imply.
423     (Classification.FindGroup): This was called GetGroup, but GetGroup
424     takes an index, while FindGroup takes a value.
425     (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
426     REFERENCE. Currently there is a cyclic reference between the layer
427     and its classification. If the classification doesn't need to know
428     its owning layer we can change this, since it may make sense to be
429     able to use the same classification with different layers.
430    
431     * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
432    
433     * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
434     not AddGroup()
435    
436     * Thuban/UI/classifier.py: Now that we can depend on the order in
437     a Classification and have methods to manipulate that order we don't
438     need to use our own data structures in the grid. We can simply make
439     the grid/table access the information they need from a copy of
440     the classification object.
441     (Classifier._OnCloseBtn): Event handler for when the user clicks
442     'Close'. This is needed so if the user applies changes and then
443     continues to change the table the user has the option of discarding
444     the most recent changes and keeping what they applied.
445    
446     * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
447     into the same group.
448    
449     * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
450     with a really old version of proj, PJ_VERSION won't even be defined.
451     If it isn't defined then just compile so that the function always
452     returns Py_False.
453    
454     * test/test_classification.py: Fix tests to use the renamed methods.
455     Still need to write tests for the new methods.
456    
457 jonathan 601 2003-04-04 Jonathan Coles <[email protected]>
458 jonathan 608
459 jonathan 612 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
460     call to SetSelection out of the method and before the call
461     to __SelectField in __init__. This prevents a recursion of events
462     when _OnFieldSelect is triggered by the user.
463    
464     2003-04-04 Jonathan Coles <[email protected]>
465    
466 jonathan 608 * Thuban/Model/classification.py: Rename Color.None to
467     Color.Transparent.
468     (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
469     Don't bother copying the color, since Colors are immutable.
470    
471     * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
472     Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
473     Thuban/UI/renderer.py, Thuban/UI/view.py:
474     Rename Color.None to Color.Transparent.
475    
476     * test/test_classification.py, test/test_load.py: Rename Color.None
477     to Color.Transparent.
478    
479     2003-04-04 Jonathan Coles <[email protected]>
480 jonathan 603
481     * Thuban/Model/classification.py: Fix assert calls.
482     (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
483     Copy the color parameter rather than hold onto a reference.
484 jonathan 601
485 jonathan 603 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
486     the color object.
487     (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
488     are sure there exists only one refernce to Color.None in the system.
489     This allows us to use 'is' rather than the comparision functions.
490    
491     * Thuban/Model/save.py: Fix assert calls.
492    
493     * Thuban/UI/classifier.py: Fix assert calls.
494     (ClassGrid._OnCellDClick): Call up to the classifier to open the
495     dialog to edit the groups properties.
496     (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
497     correctly if a cell is resized.
498     (ClassTable.SetClassification): New. Changes the classification
499     that is in the table.
500     (ClassTable.__SetRow): Allow groups to be prepended.
501     (Classifier): New code for opening the EditProperties and
502     GenerateRanges dialogs.
503     (SelectPropertiesDialog.__GetColor): Only set the color in the
504     color dialog if the current color is not None.
505    
506     * Thuban/UI/dock.py: Fix assert calls.
507    
508     * Thuban/UI/legend.py: Fix assert calls.
509    
510     * Thuban/UI/renderer.py: Fix assert calls.
511    
512     * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
513     classifications.
514     (GenRangePanel): Panel specific to range generation.
515     (GenSingletonPanel): Panel specific to singleton generation.
516     (ClassGenerator): Class responsible for actually generating
517     the classification from the data gathered in the dialog box.
518     (PropertyRamp): Generates properties whose values range from
519     a starting property to an ending property.
520 jonathan 601
521 bh 600 2003-04-03 Bernhard Herzog <[email protected]>
522    
523     * test/support.py (print_garbage_information): New function that
524     prints information about still connected messages and memory
525     leaks.
526     (run_suite): Removed.
527     (run_tests): New function for use as a replacement of
528     unittest.main in the test_* files. This one calls
529     print_garbage_information at the end.
530    
531     * test/runtests.py (main): Use support.print_garbage_information
532    
533     * test/test_layer.py: Use support.run_tests instead of
534     unittest.main so we get memory leak information
535     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
536     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
537     (TestLayerLegend.test_visibility): Call the layer's Destroy method
538     to fix a memory leak.
539    
540     * test/test_classification.py: Use support.run_tests instead of
541     unittest.main so we get memory leak information
542     (TestClassification.test_classification): Call the layer's Destroy
543     method to fix a memory leak.
544    
545 bh 591 2003-04-02 Bernhard Herzog <[email protected]>
546    
547 bh 595 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
548     Handle the reference counts of the return value and errors in
549     PyArg_ParseTuple correctly.
550    
551 bh 593 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
552     sure the filename is absolute to avoid problems when saving the
553     session again
554    
555 bh 591 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
556    
557 jonathan 587 2003-04-01 Jonathan Coles <[email protected]>
558    
559 jonathan 589 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
560 jonathan 587 that there actually are points in the returned list of points
561     before trying to index into the list. The list may be empty if
562     the shape is a Null Shape.
563    
564 bh 586 2003-04-01 Bernhard Herzog <[email protected]>
565    
566     * test/test_map.py: Don't use from <module> import *
567    
568 jonathan 581 2003-04-01 Jonathan Coles <[email protected]>
569    
570     * Thuban/Model/session.py: Use LAYER_CHANGED instead of
571     LAYER_LEGEND_CHANGED
572    
573     * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
574     self.Destroy() to close the window after yesterday's changes.
575    
576     * test/test_map.py, test/test_session.py: Fix messages that
577     are sent from maps and layers.
578    
579 jonathan 575 2003-03-31 Jonathan Coles <[email protected]>
580    
581     * Thuban/UI/classifier.py: Commented out some debugging statements.
582     (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
583     RTbug #1769.
584    
585     * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
586     position (although position doesn't work yet under GTK).
587     (DockableWindow.Destroy): New. Called when the window must be
588     closed. Namely needed when the DockFrame closes and must close
589     its children.
590     (DockFrame): Listen for EVT_CLOSE and destroy all children.
591    
592     * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
593     when then window is told to close.
594     (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
595     comment in source for more info.
596    
597     * Thuban/UI/main.py: Show the legend by default when Thuban starts.
598    
599     * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
600     symmetry with other such methods.
601     (MainWindow.ShowLegend): Show the legend docked by default.
602    
603 jonathan 569 2003-03-28 Jonathan Coles <[email protected]>
604    
605     * Thuban/UI/classifier.py: Support for highlighting a specific
606     group within the grid when the classification dialog is opened.
607     Also contains a lot of debugging printouts which will later
608     be removed.
609    
610     * Thuban/UI/dock.py: Complete rework on the dock code so that
611     that it is fairly removed from the rest of the Thuban application.
612     It is easy to add new docks which the rest of the program having
613     to be aware of them.
614    
615     * Thuban/UI/legend.py: Modifications to support selecting a
616     specific group in the classification dialog. Changed how layers
617     are drawn when the layer is visible/invisible.
618    
619     * Thuban/UI/mainwindow.py: Removed legend specific code and
620     replaced it with calls to the new dock code.
621    
622     * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
623     to check if scale > 0. Trying to track down a divide by zero.
624    
625 jonathan 557 2003-03-26 Jonathan Coles <[email protected]>
626    
627 jonathan 567 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
628     (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
629     now part of DockableWindow.
630     (LegendPanel.DoOnSelChanged): Select the current layer in the
631     map.
632     (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
633     with the selected layer and/or group.
634    
635     2003-03-26 Jonathan Coles <[email protected]>
636    
637 jonathan 557 This putback contains the code for dockable windows. There is
638     no support in wxWindows as of this date for windows that can
639     attach themselves to other windows.
640    
641     The current model contains a DockableWindow which has a parent
642     window for when it is detached and a dock window that it puts
643     its contents in when it is docked. The contents of a DockableWindow
644     must be a DockPanel. DockPanel itself derives from wxPanel.
645    
646     * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
647     message, not a LAYER_LEGEND_CHANGED message.
648    
649     * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
650    
651     * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
652     as one of the style properties for the fieldTypeText item to
653     be sure that its size is correct when the text changes.
654    
655     * Thuban/UI/dock.py: New. Classes for the DockPanel and
656     DockableWindow.
657    
658     * Thuban/UI/legend.py: Added some more buttons and made the
659     LegendPanel a DockPanel.
660    
661     * Thuban/UI/mainwindow.py: Added sash windows to the main window
662     and supporting functions for manipulating the sashes.
663     (MainWindow.ShowLegend): Create a DockableWindow with the
664     LegendPanel as the contents.
665    
666     * Thuban/UI/messages.py: Added DOCKABLE_* messages
667    
668     * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
669     not LAYER_LEGEND_CHANGED, messages.
670    
671 jonathan 554 2003-03-25 Jonathan Coles <[email protected]>
672    
673     * setup.py: Added custom script bdist_rpm_build_script so that
674     when the rpm is built the path to wx-config is correct.
675    
676     * setup.cfg: Added line saying to use the custom build script
677    
678 jonathan 552 2003-03-20 Jonathan Coles <[email protected]>
679    
680     Initial implementation of the Legend.
681    
682     * Thuban/UI/legend.py: New. Creates a window that shows the map's
683     Legend information and allows the user to add/modify classifications
684     and how the layers are drawn on the map.
685    
686     * setup.py: New command 'build_docs' which currently uses
687     happydoc to generate html documentation for Thuban.
688    
689     * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
690     Returns a string which is appropriately describes the group.
691    
692     * Thuban/Model/layer.py (Layer.SetClassification): Generate a
693     LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
694    
695     * Thuban/Model/map.py (Map): Rename messages and use new, more
696     specific, messages.
697    
698     * Thuban/Model/messages.py: New message to indicate that a layer's
699     data has changed (LAYER_CHANGED). New map messages to indicate
700     when layers have been added/removed/changed or if the stacking order
701     of the layers has changed.
702    
703     * Thuban/Model/session.py: Rename and use new messages.
704    
705     * Thuban/UI/classifier.py: Remember if any changes have actually
706     been applied so that if the dialog is cancelled without an application
707     of changes we don't have to set a new classification.
708     (ClassDataPreviewer): Pulled out the window specific code and put it
709     ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
710     symbols on any DC.
711    
712     * Thuban/UI/mainwindow.py: New code to open the legend.
713    
714     * Thuban/UI/view.py: Use new message names.
715    
716 jonathan 541 2003-03-19 Jonathan Coles <[email protected]>
717    
718     * Thuban/UI/main.py (verify_versions): New. Checks the versions
719     of Python, wxPython, and some other libraries.
720    
721     * extensions/thuban/wxproj.cpp (check_version): Checks the given
722     version against what wxproj was compiled with.
723     (check_version_gtk): If wxproj was compiled with gtk then check
724     the given version against the version of the gtk library
725     currently being used.
726    
727 bh 538 2003-03-14 Bernhard Herzog <[email protected]>
728    
729     * test/test_command.py: Run the tests when the module is run as a
730     script
731    
732     2003-03-14 Bernhard Herzog <[email protected]>
733    
734     Implement selection of multiple selected shapes in the same layer:
735    
736     - Introduce a new class to hold the selection. This basically
737     replaces the interactor which was nothing more than the
738     selection anyway. A major difference is of course that the new
739     selection class supports multiple selected shapes in one layer
740    
741     - Move the object that represents the selection from the
742     application to the canvas. The canvas is a better place than the
743     application because the selection represents which shapes and
744     layer of the map displayed by the canvas are selected and
745     affects how the map is drawn.
746    
747     - Make the selection and its messages publicly available through
748     the mainwindow.
749    
750     - The non-modal dialogs do not get a reference to the interactor
751     anymore as they can simply refer to their parent, the
752     mainwindow, for the what the interactor had to offer.
753    
754     * Thuban/UI/selection.py: New module with a class to represent the
755     selection.
756    
757     * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
758     these unused messages
759    
760     * Thuban/UI/application.py (ThubanApplication.OnInit)
761     (ThubanApplication.OnExit, ThubanApplication.SetSession): The
762     interactor is gone now.
763     (ThubanApplication.CreateMainWindow): There is no interactor
764     anymore so we pass None as the interactor argument for now for
765     compatibility.
766    
767     * Thuban/UI/view.py (MapCanvas.delegated_messages)
768     (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
769     Unsubscribe, delegate messages according to the delegated_messages
770     class variable.
771     (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
772     attributes from instance variables as described with the
773     delegated_methods class variable.
774     (MapCanvas.__init__): New instance variable selection holding the
775     current selection
776     (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
777     pass them on to the renderer
778     (MapCanvas.SetMap): Clear the selection when a different map is
779     selected.
780     (MapCanvas.shape_selected): Simple force a complete redraw. The
781     selection class now takes care of only issueing SHAPES_SELECTED
782     messages when the set of selected shapes actually does change.
783     (MapCanvas.SelectShapeAt): The selection is now managed in
784     self.selection
785    
786     * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
787     (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
788     Unsubscribe, delegate messages according to the delegated_messages
789     class variable.
790     (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
791     attributes from instance variables as described with the
792     delegated_methods class variable.
793     (MainWindow.__init__): The interactor as ivar is gone. The
794     parameter is still there for compatibility. The selection messages
795     now come from the canvas.
796     (MainWindow.current_layer, MainWindow.has_selected_layer):
797     Delegate to the the canvas.
798     (MainWindow.LayerShowTable, MainWindow.Classify)
799     (MainWindow.identify_view_on_demand): The dialogs don't need the
800     interactor parameter anymore.
801    
802     * Thuban/UI/tableview.py (TableFrame.__init__)
803     (LayerTableFrame.__init__, LayerTableFrame.OnClose)
804     (LayerTableFrame.row_selected): The interactor is gone. It's job
805     from the dialog's point of view is now done by the mainwindow,
806     i.e. the parent. Subscribe to SHAPES_SELECTED instead
807     of SELECTED_SHAPE
808    
809     * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
810     is gone. It's job from the dialog's point of view is now done by
811     the mainwindow, i.e. the parent.
812    
813     * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
814     gone. It's job from the dialog's point of view is now done by the
815     mainwindow, i.e. the parent.
816    
817     * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
818     gone. It's job from the dialog's point of view is now done by the
819     mainwindow, i.e. the parent.
820     (SessionTreeCtrl.__init__): New parameter mainwindow which is
821     stored as self.mainwindow. The mainwindow is need so that the tree
822     can still subscribe to the selection messages.
823     (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
824     (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
825     selection is now accessible through the mainwindow. Subscribe to
826     SHAPES_SELECTED instead of SELECTED_SHAPE
827    
828     * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
829     SHAPES_SELECTED message now.
830     (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
831     so deal with multiple shapes
832     (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
833     gone. It's job from the dialog's point of view is now done by the
834     mainwindow, i.e. the parent.
835    
836     * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
837     parameter is now a list of shape ids.
838     (RecordTable.SetTable): The second parameter is now a list of
839     indices.
840    
841     * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
842     selected_shape parameter and ivar to selected_shapes. It's now a
843     list of shape ids.
844     (MapRenderer.draw_label_layer): Deal with multiple selected
845     shapes. Rearrange the code a bit so that the setup and shape type
846     distinctions are only executed once.
847    
848     * test/test_selection.py: Test cases for the selection class
849    
850 jonathan 527 2003-03-11 Jonathan Coles <[email protected]>
851    
852     * Thuban/Model/load.py: Temporary fix so that the xml reader
853     doesn't cause Thuban to crash.
854    
855     * Thuban/Model/layer.py: Handle the cyclic references between
856     a layer and its classification better, and be sure to disconnect
857     the classification from the layer when the layer is destroyed
858     so that we don't maintain a cyclic reference that may not be
859     garbage collected.
860    
861     * Thuban/Model/classification.py: See comment for layer.py.
862    
863 jan 523 2003-03-12 Jan-Oliver Wagner <[email protected]>
864    
865     * HOWTO-Release: New. Information on the steps for releasing
866     a new version of Thuban.
867    
868 jonathan 514 2003-03-11 Jonathan Coles <[email protected]>
869    
870     * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
871     Use True instead of true.
872     (Classifier): Should have a single panel in which all the controls lie.
873    
874     * Thuban/UI/proj4dialog.py: Add normal border.
875    
876     * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
877    
878     * Thuban/UI/mainwindow.py: Use True instead of true.
879    
880     * setup.py: Update some definitions to use wxWindows2.4 files
881    
882     * Data/iceland_sample_class.thuban: Fixed file so that the
883     field_type information is present.
884    
885 jonathan 490 2003-03-10 Jonathan Coles <[email protected]>
886    
887 jonathan 505 * Thuban/UI/classifier.py (Classifier.__init__): Make the
888     field type label grow so that when the text changes the
889     size is updated correctly. This may be a wxWindows bug.
890    
891     2003-03-10 Jonathan Coles <[email protected]>
892    
893 jonathan 499 * Thuban/UI/application.py: Changed SESSION_CHANGED to
894     SESSION_REPLACED.
895    
896     * Thuban/UI/classifier.py: Wrap text with _().
897     (ClassGrid.CreateTable): Set dimensions and size hints here,
898     instead of in Reset, so we only set the size once.
899    
900     * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
901    
902     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
903     Call Close() instead of Shutdown().
904    
905     * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
906    
907     * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
908     Go back to using OnClose() instead of Shutdown().
909    
910     2003-03-10 Jonathan Coles <[email protected]>
911    
912 jonathan 497 * Thuban/UI/classifier.py (Classifier): SelectField() needed
913     to know the old field index as well as the new one.
914    
915     2003-03-10 Jonathan Coles <[email protected]>
916    
917 jonathan 495 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
918     to correctly set the table information and call this from
919     __init__ and from _OnFieldSelect so that all the information
920     is up to date when the dialog opens and when a field is changed.
921    
922     2003-03-10 Jonathan Coles <[email protected]>
923    
924 jonathan 490 * Thuban/Model/classification.py (Classification): Don't use
925     layer's message function directly, use the ClassChanged() method
926     when then classification changes. SetField/SetFieldType/SetLayer
927     must keep the information about field name and field type in
928     sync when an owning layer is set or removed.
929    
930     * Thuban/Model/layer.py: Added ClassChanged() so that the
931     classification can tell the layer when its data has changed.
932     (Layer.SetClassification): Accepts None as an arguement to
933     remove the current classification and correctly handles
934     adding a new classification.
935    
936     * Thuban/Model/load.py: Comment out print statement
937    
938     * test/test_classification.py, test/test_save.py: New and
939     improved tests.
940    
941 jonathan 483 2003-03-07 Jonathan Coles <[email protected]>
942    
943     * Thuban/Model/classification.py: Implemented __copy__ and
944     __deepcopy__ for ClassGroup* and ClassGroupProperites so
945     they can easily be copied by the classifier dialog.
946     (ClassGroupProperites.__init__): The default line color should
947     have been Color.Black.
948    
949     * Thuban/UI/classifier.py: Setting and Getting table values now
950     uses a consistent set of functions.
951     (Classifier): Now non-modal. Has field type label which changes
952     as the field changes. Keep track of buttons in a list so that
953     we can enable/disable the buttons when the None field is selected.
954     (SelectPropertiesDialog): Add buttons to make the colors transparent.
955    
956     * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
957     does what OnClose did, but can be called by the application to
958     close a window. Needed when a session changes, and we have to
959     close the classifier windows.
960    
961     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
962     Shuts down open dialogs. Used when a new session is created
963     or a session is opened.
964     (MainWindow.SaveSession): Should only call application.SaveSession()
965     if we don't call SaveSessionAs first.
966     (MainWindow.Classify): Allow different classifier dialogs for
967     different layers.
968    
969     * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
970     the parent class handle it. Add Shutdown() to unsubscibe from
971     event notification and call the parent Shutdown(). This was
972     necessary so the application can close the tree window.
973    
974 jonathan 478 2003-03-06 Jonathan Coles <[email protected]>
975    
976     * Thuban/Model/classification.py: Minor documentation changes,
977     Addition of __eq__ and __ne__ methods.
978     (Classification.SetLayer): prevent recursion between this method
979     and Layer.SetClassification().
980    
981     * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
982    
983     * Thuban/Model/layer.py (SetClassification): prevent recursion
984     between this method and Classification.SetLayer().
985    
986     * test/test_classification.py, test/test_load.py,
987     test/test_session.py: Fixed and added tests for the classification
988     classes.
989    
990 bh 477 2003-03-06 Bernhard Herzog <[email protected]>
991    
992     * Thuban/UI/classifier.py (ClassGrid.__init__)
993     (ClassGrid.CreateTable): Move the SetSelectionMode call to
994     CreateTable because otherwise it triggers an assertion in
995     wxPython/wxGTK 2.4.
996    
997 jonathan 459 2003-03-05 Jonathan Coles <[email protected]>
998    
999 jonathan 475 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
1000 jonathan 471
1001 jonathan 475 * Thuban/Model/load.py: import FIELDTYPE constants from table.
1002 jonathan 471
1003 jonathan 475 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
1004 jonathan 471
1005 jonathan 475 * Thuban/Model/table.py: Put FIELDTYPE constants back.
1006 jonathan 471
1007     2003-03-05 Jonathan Coles <[email protected]>
1008    
1009 jonathan 459 * Thuban/UI/classifier.py: Added class documentation.
1010     Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
1011     Store just the groups in the table and generate the other
1012     column information when it is requested. Add "None" field
1013     to pull-down to select no classification.
1014    
1015     * Thuban/common.py: Moved FIELDTYPE constants from table.py
1016     (Str2Num): Only catch ValueError exceptions.
1017    
1018     * Thuban/Model/classification.py: Class documentation. Renaming
1019     of methods with Stroke to Line. Groups are stored in a single
1020     list with the default as the first element. Groups are searched
1021     in the order they appear in the list.
1022    
1023     * Thuban/Model/color.py: Documentation.
1024    
1025     * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
1026     the kind of data represented by a field.
1027    
1028     * Thuban/Model/load.py (ProcessSession): Use proper string
1029     conversion function; fixes RTbug #1713.
1030    
1031     * Thuban/Model/save.py (Saver): Store field type information.
1032    
1033     * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
1034     (Table): Add field_info_by_name() to retrieve field information
1035     by specifying the field name, not the number.
1036    
1037     * Thuban/UI/mainwindow.py: Function name changes.
1038    
1039     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
1040     get the layer classification once. Don't try to classify
1041     values when the field is None: just use the default properties.
1042    
1043     * Thuban/UI/view.py: Function name changes.
1044    
1045     * Doc/thuban.dtd: Add field_type attribute to a classification.
1046    
1047 bh 456 2003-03-04 Bernhard Herzog <[email protected]>
1048    
1049 bh 458 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
1050     the fill and stroke layer attributes optional with suitable
1051     default values. Add the stroke_width layer attribute. Use correct
1052     syntax for empty elements. Make the attribute list for labels
1053     refer to the label element.
1054    
1055     2003-03-04 Bernhard Herzog <[email protected]>
1056    
1057 bh 456 * setup.py (thuban_build_py.build): Add a comment about distutils in
1058     Python 2.3 containing some of the functionality we implement in
1059     setup.py ourselves.
1060    
1061     * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
1062     before the selection mode. Doing it the other way round triggers
1063     an assertion in wxWindows.
1064    
1065     * Thuban/Model/save.py (escape): Fix typo in doc-string
1066    
1067     * Thuban/Model/classification.py: Remove unnecessary wxPython
1068     import
1069    
1070 jonathan 448 2003-03-04 Jonathan Coles <[email protected]>
1071    
1072     * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
1073     Parameter 'value' should default to None.
1074    
1075     * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
1076     the class attribute __classification is now private.
1077    
1078     * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
1079     Classifier to ClassGrid. Added support for removing selected rows,
1080     which including code for keeping track of when cells are selected,
1081     and deselected.
1082     (ClassTable): Support for added/removing rows. Fixed a problem
1083     with __ParseInput whereby it would not allow strings (only numbers)
1084     to be entered.
1085     (Classifier): Added button and supporting code for removing
1086     selected rows.
1087    
1088 jonathan 445 2003-02-27 Jonathan Coles <[email protected]>
1089 jonathan 434
1090     * Thuban/common.py: Moved color conversion functions into
1091     Thuban/UI/common.py.
1092     (Str2Num): Now converts the float (not the string) to a long/int
1093     so that an exception isn't thrown.
1094    
1095     * Thuban/UI/common.py: Common functions used in several UI modules
1096    
1097     * Thuban/Model/classification.py: Changed the class hierarchy
1098     so that a Classification consists of Groups which return
1099     Properties when a value matches a Group.
1100    
1101     * Thuban/Model/layer.py: Fixed name resolution problem.
1102    
1103     * Thuban/Model/load.py: Use new Classification and Group functions.
1104    
1105     * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
1106     failure.
1107     (Saver.write_classification): Use new Classification and Group
1108     functions.
1109    
1110     * Thuban/UI/classifier.py: Changes to use new Classification and Group
1111 jonathan 445 functions. Fix to create a tuple with a single value instead of
1112     simply returning the value.
1113 jonathan 434
1114     * Thuban/UI/renderer.py: Use new Classification and Group functions.
1115     Use common.py functions.
1116    
1117 jonathan 445 * Thuban/UI/tree.py: Use common.py functions.
1118 jonathan 447
1119     * test/test_classification.py: Use new Classification and Group
1120     classes.
1121 jonathan 434
1122 jonathan 426 2003-02-24 Jonathan Coles <[email protected]>
1123    
1124     * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
1125     functions from Thuban color objects to wxWindow colour objects.
1126    
1127     * Thuban/Model/classification.py (Classification): Renamed
1128     GetProperties() to GetClassData(). Used the new iterator
1129     in TreeInfo().
1130     (ClassIterator): Iterator implementation to iterate over the
1131     ClassData objects in a classification object.
1132    
1133     * Thuban/Model/save.py (Saver.write_classificaton): Uses
1134     the new iterator to save the classification information.
1135    
1136     * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
1137     for changing the stroke and fill colors and previewing the
1138     changes.
1139    
1140     * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
1141     MainWindow.SaveSessionAs): Text string changes so the dialogs
1142     have more meaningful titles.
1143    
1144     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
1145     Classification method name from GetProperties to GetClassData.
1146    
1147     * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
1148     instead of accessing now non-existent class variables.
1149    
1150 bh 425 2003-02-24 Bernhard Herzog <[email protected]>
1151    
1152     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
1153     unneeded Shape() call. Rendering is substantially faster without
1154     it and it avoids some problems with broken shape files.
1155    
1156 frank 423 2003-02-20 Frank Koormann <[email protected]>
1157    
1158     Force minimal size of identify and label dialogs. The autosizing
1159     looked too ugly.
1160    
1161     * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
1162     * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
1163     Set size of listctrl.
1164     * Thuban/UI/identifyview.py (IdentifyView.__init__):
1165     Set size of dialog.
1166    
1167 jonathan 408 2003-02-19 Jonathan Coles <[email protected]>
1168    
1169     * test/test_classification.py, test/test_layer.py,
1170     test/test_load.py, test/test_map.py, test/test_session.py:
1171     Updated the tests to use the new functions that are in the
1172     respective classes.
1173    
1174     * Thuban/Model/classification.py (Classification):
1175     Uses the new ClassData* classes. Modification messages are
1176     passed up to the parent layer (if it exists).
1177     (ClassData): New class to encapsulate the common data in each
1178     classification property.
1179     (ClassDataDefault): Represents the Default class. data.
1180     (ClassDataPoint): Represents a single class. data point
1181     (ClassDataRange): Represents a class. range
1182     (ClassDataMap): Represents a class. map (unused).
1183    
1184     * Thuban/Model/color.py: Added Color.None to represent something
1185     with no color. Color.Black represents the color black.
1186     (NoColor): Helper class derived from Color to represent something
1187     with no color.
1188    
1189     * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
1190     stroke_width attributes. Made the 'classification' attribute private.
1191     New methods for setting/getting the classification.
1192    
1193     * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
1194     to get the classifcation and use the new ClassData* classes to
1195     hold the classification data. Use Str2Num to convert numbers
1196     properly.
1197    
1198     * Thuban/Model/save.py (Saver): Use new Color and Classification
1199     methods
1200    
1201     * Thuban/UI/classifier.py (ClassGrid): New class to represent a
1202     custom grid.
1203     (ClassTable): Support for editing Values and Labels and for
1204     changing what type (point or range) of data is stored in each
1205     property based on how the user enters the data.
1206     (Classifier): Support for saving the new classifications and
1207     launching the dialog to edit a property.
1208     (SelectPropertiesDialog): New class for editing the visual
1209     properties of a classification (stroke color, width, and fill color)
1210     (ClassPreviewer): Took the Draw method from ClassRenderer and
1211     made most of it into this new class. Intend to use this class in
1212     the SelectPropertiesDialog for previewing changes.
1213    
1214     * Thuban/UI/renderer.py: Use new Color and Classification methods.
1215    
1216     * Thuban/UI/tree.py: Formatting changes.
1217    
1218     * Doc/thuban.dtd: Add 'label' element
1219    
1220     * Thuban/common.py: New. Contains common routines used throughout
1221     the code.
1222     (Str2Num): Takes a string and converts it to the "best" type of
1223     number.
1224    
1225 bh 405 2003-02-14 Bernhard Herzog <[email protected]>
1226    
1227     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
1228     dragging flag is always set to 0 even when the tool implementation
1229     raises an exception
1230    
1231 bh 402 2003-02-11 Bernhard Herzog <[email protected]>
1232    
1233     * Thuban/UI/application.py (ThubanApplication.splash_screen): New
1234     method to create a splash screen.
1235     (ThubanApplication.ShowMainWindow): New. Show the main window.
1236     Needed so the splash screen can display the mainwindow
1237     (ThubanApplication.OnInit): Call the
1238     new splash_screen method to determine whether the application
1239     should display a splash screen. If it displays a splash screen do
1240     not immediately show the main window.
1241    
1242 jonathan 399 2003-02-11 Jonathan Coles <[email protected]>
1243    
1244     * Thuban/Model/classification.py: Added import line to fix
1245     feature conflicts between running on python2.2 and python2.1.
1246    
1247     * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
1248     onto the clinfo parameter, so removed the deepcopy().
1249    
1250 jonathan 396 2003-02-10 Jonathan Coles <[email protected]>
1251    
1252 tkoester 403 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
1253 jonathan 396 Added element_open variable to track opening and closing of tags
1254     so that tags that don't span more than one line are closed with
1255     /> instead of </tag_name>. Use the GetDefault*() methods of
1256     the Classification class.
1257    
1258     * Thuban/Model/classification.py (Classificaton): Added set and
1259     get methods for the default data. The class also takes a layer
1260     reference so that modification messages can be sent. Fixed the
1261     methods to use the new ClassData class.
1262     (ClassData): New class to encapsulate the classification data
1263    
1264     * Thuban/Model/layer.py (Layer): Remove the
1265 tkoester 403 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
1266 jonathan 396 SetDefault*() methods on the layer's classification object.
1267 tkoester 403 (Layer.__init__): Use the new SetDefault*() methods in the
1268 jonathan 396 Classification class.
1269    
1270     * Thuban/Model/load.py (ProcessSession): Use the new ClassData
1271     object instead of a dictionary.
1272    
1273 tkoester 403 * Thuban/UI/classifier.py (ClassRenderer): New class to
1274 jonathan 396 draw the classifications in the dialog box's table.
1275     (Classifier): Modified to use the ClassRenderer class.
1276    
1277 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
1278     methods of the Classification class.
1279 jonathan 396
1280     * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
1281     of the ClassData class.
1282    
1283     * test/test_classification.py, test/test_layer.py,
1284     test/test_map.py, test/test_session.py: Fix the tests to work
1285     with the above code changes.
1286    
1287 jonathan 387 2003-02-03 Jonathan Coles <[email protected]>
1288    
1289     * Thuban/Model/classification.py (Classification): Added getNull()
1290     to return the NullData reference
1291    
1292     * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
1293     Layer.SetStrokeWidth): Modified these functions to change the
1294     null data in the classification rather than keep these values
1295     directly in the Layer class. Menu options to change these values
1296     work again.
1297    
1298 jonathan 380 2003-01-28 Jonathan Coles <[email protected]>
1299    
1300 jonathan 384 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
1301 tkoester 403 Fixed crashing problem on some systems. Dialog box shows
1302 jonathan 380 classification data.
1303    
1304 jonathan 384 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
1305     Colors in the tree view.
1306    
1307     * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
1308     the tree info for classifications. Commented out unnecessary lines.
1309    
1310     * Thuban/Model/classification.py (Classification.TreeInfo): New
1311     function to add information about the classification into the
1312     tree view.
1313    
1314 tkoester 403 2003-01-27 Jan-Oliver Wagner <[email protected]>
1315 jan 375
1316 tkoester 403 * Thuban/__init__.py (_): New.
1317 jan 375
1318     * Thuban/Model/classification.py, Thuban/Model/extension.py,
1319     Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
1320 tkoester 403 Thuban/Model/session.py, Thuban/UI/application.py,
1321     Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
1322     Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
1323     Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
1324     Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
1325     Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
1326 jan 375
1327 jonathan 370 2003-01-27 Jonathan Coles <[email protected]>
1328    
1329 tkoester 403 * Thuban/Model/layer.py: Classification initialization calls.
1330 jonathan 370
1331 tkoester 403 * Thuban/Model/classification.py: Created class to encapsulate
1332     a layer classification. Supports specific data points and
1333     ranges.
1334 jonathan 370
1335 tkoester 403 * Thuban/Model/load.py: Added support for loading classification
1336     information.
1337 jonathan 370
1338 tkoester 403 * Thuban/Model/save.py: Added support for saving classification
1339     information.
1340 jonathan 370
1341 tkoester 403 * Thuban/UI/classifier.py: Initial class for a dialog box for
1342     specifying classification information.
1343 jonathan 370
1344 tkoester 403 * Thuban/UI/mainwindows.py: Support for opening the classifier
1345     dialog.
1346 jonathan 370
1347 tkoester 403 * Thuban/UI/renderer.py: Support for drawing a layer with the
1348     classification information.
1349 jonathan 370
1350 tkoester 403 * Data/iceland_sample_class.thuban: iceland_sample with
1351     classification data.
1352 jonathan 370
1353 tkoester 403 * test/test_classification: Tests for the Classification class.
1354 jonathan 370
1355 bh 359 2002-12-09 Bernhard Herzog <[email protected]>
1356    
1357 bh 361 * test/test_command.py: New. Tests for the command classes.
1358    
1359 bh 359 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
1360     (Command.IsTool): New method to distinguish between command
1361     switching tools and other commands.
1362    
1363     * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
1364     the tool to avoid direct assignments to instance variables
1365     (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
1366     (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
1367     change the tool
1368    
1369     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
1370     active tool's command turns insensitive, disable the tool.
1371     (_tool_command): Use the new ToolCommand class
1372    
1373     * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
1374     SelectTool method to change the tool
1375     (iconfile): Use the ToolCommand class
1376    
1377 bh 354 2002-12-03 Bernhard Herzog <[email protected]>
1378    
1379     * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
1380     the case of selected items that are not children of Layers or Maps
1381     properly. Previously this bug would trigger an assertion in
1382     wxWindows.
1383    
1384 frank 352 2002-11-06 Frank Koormann <[email protected]>
1385    
1386 bh 354 * Thuban/UI/mainwindow.py: Altered the order of tools in the
1387     toolbar: First now are all navigation tools (Zoom In/Out, Pan,
1388     Full Extent).
1389 tkoester 403
1390 bh 349 2002-10-23 Bernhard Herzog <[email protected]>
1391    
1392     * setup.py (setup call): version now 0.1.3
1393    
1394     * MANIFEST.in: Add the files in test/
1395    
1396     * test/README: Add note about tests requiring the iceland data
1397    
1398     * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
1399     copyright notice.
1400    
1401 bh 344 2002-10-18 Bernhard Herzog <[email protected]>
1402    
1403     * test/test_map.py
1404     (TestMapWithContents.test_projected_bounding_box): Use an explicit
1405     epsilon.
1406    
1407     * test/support.py (FloatComparisonMixin.assertFloatEqual)
1408     (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
1409     message if the assertion fails and don't return the return value
1410     of self.assert_. In assertFloatSeqEqual the return meant that not
1411     all items of the sequence were compared.
1412    
1413 bh 326 2002-09-20 Bernhard Herzog <[email protected]>
1414    
1415 bh 341 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
1416    
1417     * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
1418    
1419 bh 338 * test/test_map.py (TestMapWithContents.test_tree_info): Create
1420     the string with the bounding box on the fly because of platform
1421     differences in the way %g is handled.
1422    
1423     * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
1424     DBFfile too because Thuban layers can't yet cope missing DBF
1425     files.
1426    
1427     2002-09-20 Bernhard Herzog <[email protected]>
1428    
1429 bh 326 * test/test_menu.py: Use initthuban instead of
1430     add_thuban_dir_to_path to initialize Thuban.
1431    
1432     * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
1433     Mixin class for float comparisons
1434     (SubscriberMixin): New. Mixin class to test messages sent through
1435     the Connector class
1436    
1437     * test/README: Fix a typo and add the -v flag to the command for
1438     individual tests
1439    
1440 bh 335 * test/test_session.py: New. Test cases for Thuban.Model.session
1441    
1442     * test/test_proj.py: New. Test cases for Thuban.Model.proj
1443    
1444     * test/test_map.py: New. Test cases for Thuban.Model.map
1445    
1446     * test/test_layer.py: New. Test cases for Thuban.Model.layer
1447    
1448     * test/test_label.py: New. Test cases for Thuban.Model.label
1449    
1450     * test/test_connector.py: New. Test cases for Thuban.Lib.connector
1451    
1452     * test/test_color.py: New. Test cases for Thuban.Model.color
1453    
1454     * test/test_base.py: New. Test cases for Thuban.Model.base
1455    
1456 bh 322 2002-09-13 Bernhard Herzog <[email protected]>
1457    
1458     * Thuban/Model/session.py (Session.forwarded_channels): Forward
1459     the CHANGED channel too.
1460    
1461     * Thuban/Model/map.py (Map.forwarded_channels): Forward the
1462     CHANGED channel too.
1463     (Map.__init__): Call the Modifiable constructor as well.
1464    
1465     * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
1466     event if the modified flag changes.
1467     (Modifiable.changed): Tweak the doc-string.
1468    
1469     * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
1470     (MainWindow.set_position_text): Put the code that puts the text
1471     with the mouse position into the status bar into the new method
1472     set_position_text so that it can overwritten in derived classes.
1473    
1474 bh 317 2002-09-12 Bernhard Herzog <[email protected]>
1475    
1476     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
1477     message box on the main window.
1478    
1479 bh 313 2002-09-11 Bernhard Herzog <[email protected]>
1480    
1481     * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
1482     the 'E' because it's less likely to interfere with other menu
1483     entries.
1484 bh 315 (MainWindow.build_menu): remove an incorrect comment.
1485 bh 313
1486 bh 311 2002-09-10 Bernhard Herzog <[email protected]>
1487    
1488     * Thuban/UI/mainwindow.py (MainWindow.Map): New.
1489     (_tool_command): Add sensitive parameter
1490     (_has_visible_map): Sensitivity callback to tools and other
1491     commands that require a visible map. Use it in map_zoom_in_tool,
1492     map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
1493     and map_full_extent
1494    
1495 bh 308 2002-09-06 Bernhard Herzog <[email protected]>
1496    
1497     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
1498     VIEW_POSITION
1499    
1500 tkoester 403 2002-09-04 Frank Koormann <[email protected]>
1501 frank 306
1502     * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
1503    
1504 bh 302 2002-09-02 Bernhard Herzog <[email protected]>
1505    
1506 bh 304 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
1507     wxWindows already and our implementation doesn't work correctly
1508     with wxGTK 2.3:
1509     (MapCanvas.__init__): Remove the instance variable
1510     (MapCanvas.OnPaint): Always call do_redraw when there's a map to
1511     be drawin
1512     (MapCanvas.OnIdle): Removed.
1513    
1514 bh 302 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
1515     a parameter to determine the size of the rectangle.
1516     (MapCanvas.find_shape_at): Create the box around the point on a
1517     layer by layer basis and make the size depend on the shape type.
1518     This solves a problem with the selection of point shapes at the
1519     border of the layer's bounding box
1520    
1521 bh 292 2002-08-30 Bernhard Herzog <[email protected]>
1522    
1523 bh 300 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
1524     for the sensitivity of remove layer.
1525     (_can_remove_layer): New. Sensitivity callback for remove layer
1526     (Command layer_remove): Use _can_remove_layer
1527    
1528     * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
1529     determine whether a given layer can be deleted.
1530    
1531 bh 297 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
1532     (MapCanvas.do_redraw): Get rid of the unused update_region
1533     instance variable
1534    
1535 bh 294 * Thuban/UI/view.py: Add/update some doc-strings.
1536    
1537 bh 292 * test/: new subdirectory with a bunch of unit tests.
1538    
1539     * test/README, test/test_table.py, test/test_save.py,
1540     test/test_menu.py, test/test_load.py: Initial set of tests and
1541     brief instructions on how to run them
1542    
1543 bh 287 2002-08-29 Bernhard Herzog <[email protected]>
1544    
1545 bh 291 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
1546     arcs with multiple parts.
1547    
1548 bh 289 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
1549     Handle degenrate rectangles.
1550    
1551 bh 287 * Thuban/Model/table.py: Make writing records work correctly:
1552     (Table.__init__): Keep track of whether the DBF is open for
1553     writing
1554     (Table.write_record): Open the DBF file for writing when necessary
1555    
1556 bh 285 2002-08-27 Bernhard Herzog <[email protected]>
1557    
1558     * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
1559     dbf files only for reading by default. Use a new writable dbf
1560     object for writing.
1561    
1562 bh 278 2002-08-26 Bernhard Herzog <[email protected]>
1563    
1564 bh 282 * Thuban/UI/mainwindow.py: Refactor the context creation:
1565     (MainWindow.Context): New method to return a context
1566     (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
1567     new method
1568    
1569 bh 278 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
1570     layer table specific code from TableGrid into LayerTableGrid
1571     (TableFrame, LayerTableFrame): Split the layer table specific code
1572     from TableFrame into LayerTableFrame
1573 bh 280 (LayerTableGrid.select_shape): Remove a debug print
1574 bh 278
1575     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
1576     LayerTableFrame
1577    
1578 bh 277 2002-08-23 Bernhard Herzog <[email protected]>
1579    
1580     * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
1581     absolute filename.
1582    
1583 bh 269 2002-08-22 Bernhard Herzog <[email protected]>
1584    
1585 bh 275 * Thuban/Model/table.py (Table.write_record): New method to write
1586     records.
1587 tkoester 403 (Table.__init__): Open the DBF file for writing too.
1588 bh 275
1589     * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
1590     into the underlying table.
1591    
1592     * extensions/shapelib/shapefil.h (DBFCommit),
1593     extensions/shapelib/dbfopen.c (DBFCommit): New API function to
1594     commit any changes made to the DBF file.
1595    
1596 bh 271 * Thuban/UI/mainwindow.py (make_check_current_tool)
1597     (_tool_command): Put the code that generates the "checked"
1598     callback into a separate function so that we can reuse it
1599     elsewhere
1600    
1601 bh 269 * Thuban/Model/save.py (Saver): New class to handle serializing a
1602     session into an XML file. The main reason to introduce a class is
1603     that applications built on Thuban can derive from it so that they
1604     can save additional information in a session file.
1605     (save_session): Delegate almost all the work to the Saver class.
1606     Rename the filename argument to file because it may be a file like
1607     object now.
1608    
1609     * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
1610     code. Remove the little test code which would be executed when the
1611     module is run as a script which didn't work anymore since it can't
1612     import the other Thuban modules.
1613     (ProcessSession, load_session): Refactor the ProcessSession to
1614     have one method for each element start and end tag so that derived
1615     classes can easily override the processing of individual tags.
1616     Also, always parse with namespaces enabled because applications
1617     built on top of Thuban will likely use namespaces if they extend
1618     the session file format.
1619    
1620 bh 266 2002-08-21 Bernhard Herzog <[email protected]>
1621    
1622     * setup.py (ThubanInstall.run): Don't repr install_lib_orig
1623     because thubaninit_contents will do it for us.
1624    
1625 tkoester 403 2002-08-16 Jan-Oliver Wagner <[email protected]>
1626 jan 265
1627     * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
1628     tree window already open
1629    
1630 bh 259 2002-08-15 Bernhard Herzog <[email protected]>
1631    
1632 bh 263 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
1633     with self.
1634    
1635     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
1636     when we have actually captured it.
1637    
1638 bh 259 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
1639     shapefile and destroy the table.
1640    
1641     * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
1642    
1643 bh 254 2002-08-14 Bernhard Herzog <[email protected]>
1644    
1645 bh 256 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
1646     instance variable columns
1647     (RecordTable.GetTypeName): row and col may be negative in some
1648     cases.
1649    
1650 bh 254 * setup.py (InstallLocal.initialize_options)
1651     (InstallLocal.finalize_options, InstallLocal.user_options): New
1652     option create-init-file to build a thubaninit.py when running
1653     install_local
1654     (InstallLocal.run): Create the thubaninit.py module when requested
1655     (thubaninit_contents): Split the template into several parts and
1656     create a new function thubaninit_contents that creates the
1657     contents of a thubaninit module.
1658     (ThubanInstall.run): Use the new function to create the thubaninit
1659     module.
1660    
1661 bh 252 2002-07-30 Bernhard Herzog <[email protected]>
1662    
1663     * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
1664     cleanup.
1665     (ThubanApplication.MainLoop): Extend to automatically call OnExit.
1666    
1667     * Thuban/Model/session.py (Session.Destroy): Don't bypass the
1668     direct base class' Destroy method.
1669    
1670     * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
1671     layers.
1672     (Map.Destroy): Destroy the label_layer as well and call the
1673     inherited Desatroymethod first so that no more messages are
1674     issued.
1675     (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
1676     message if the stacking order actually has changed. Add
1677     doc-strings.
1678     (Map.BoundingBox): Correct the doc-string.
1679     (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
1680     (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
1681    
1682     * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
1683     all labels.
1684    
1685 bh 247 2002-07-29 Bernhard Herzog <[email protected]>
1686    
1687     * Thuban/Model/map.py (Map.subscribe_layer_channels)
1688     (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
1689     to a layer's channels into separate methods.
1690     (Map.RemoveLayer, Map.AddLayer): Call the new methods
1691     (Map.Destroy): Unsubscribe from a layer's channels before
1692     destroying it.
1693    
1694     * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
1695     selected_layer parameter to searched_layer which is the layer to
1696     search in.
1697     (MapCanvas.SelectShapeAt): New parameter layer to restrict the
1698     search to that layer. Return the selected layer and shape.
1699    
1700     * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
1701     typo
1702    
1703 bh 238 2002-07-24 Bernhard Herzog <[email protected]>
1704    
1705 bh 243 * Thuban/UI/application.py (ThubanApplication.create_session):
1706     Extend the doc string.
1707     (ThubanApplication.subscribe_session)
1708     (ThubanApplication.unsubscribe_session): New methods to
1709     subscribe/unsubscribe to/from session channels.
1710     (ThubanApplication.SetSession): Call the new methods here.
1711     (ThubanApplication.maps_changed, ThubanApplication.set_map):
1712     Renamed set_map to maps_changed. Its now a subscriber for
1713     MAPS_CHANGED.
1714    
1715     * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
1716     x-coordinate in case of simple clicks
1717    
1718     * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
1719     don't pass it as a parameter
1720    
1721     * Thuban/Model/session.py (Session.RemoveMap): New
1722    
1723 bh 238 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
1724     window size into a parameter.
1725    
1726 bh 235 2002-07-23 Bernhard Herzog <[email protected]>
1727    
1728 bh 237 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
1729     just commands.
1730    
1731 bh 235 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
1732     parameter list a bit to allow setting the window title and the
1733     initial message in the status bar. Update the callers.
1734    
1735     * Thuban/UI/application.py (ThubanApplication.OnInit)
1736     (ThubanApplication.CreateMainWindow): Put the mainwindow
1737     instantiation into a separate method so that it can be overridden
1738     by a subclass.
1739    
1740 bh 230 2002-07-19 Bernhard Herzog <[email protected]>
1741    
1742 bh 234 * Thuban/Model/session.py: Issue a CHANGED message every time
1743     another changed message is issued to make it easier to get
1744     notified of changes.
1745     (Session): Update the doc string
1746     (Session.forward): Issue changed-events as CHANGED as well.
1747     (Session.changed): Overwrite the inherited version to issue
1748     CHANGED events as well.
1749    
1750     * Thuban/UI/tree.py: We can now simply subscribe to the session's
1751     CHANGED channel to be informed of changes.
1752     (SessionTreeCtrl.session_channels): Not needed any longer.
1753 tkoester 403 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
1754 bh 234 Only have to (un)subscribe CHANGED
1755    
1756     * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
1757    
1758 bh 230 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
1759     for the wxPython locale bug to __init__.py so that it's
1760     automatically executed by anybody using UI code from Thuban.
1761    
1762 bh 225 2002-07-18 Bernhard Herzog <[email protected]>
1763    
1764 bh 228 * Thuban/UI/main.py (main): app no longer needs to be global
1765    
1766     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
1767     as parameter and store it in an instance variable
1768     (MainWindow.invoke_command, MainWindow.update_command_ui)
1769     (MainWindow.save_modified_session, MainWindow.NewSession)
1770     (MainWindow.OpenSession, MainWindow.SaveSession)
1771     (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
1772     application object.
1773    
1774     * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
1775     the main window with self.
1776    
1777 bh 225 * Thuban/UI/context.py: New module with the context class
1778    
1779     * Thuban/UI/command.py (Command): Update doc string.
1780    
1781     * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
1782     MainWindow.update_command_ui): Pass an instance of the context
1783     class to the command's methods
1784     (check_current_tool, call_method): Handle the new context
1785     implementation
1786    
1787     * Examples/simple_extensions/simple_tool.py (simple_tool,
1788     check_simple_tool): Handle the new context implementation
1789    
1790     * Examples/simple_extensions/simple_command.py (simple_command):
1791     Handle the new context implementation. Update the comments about
1792     the context.
1793    
1794     * Thuban/UI/application.py (ThubanApplication.SetSession): Add
1795     doc-string
1796     (ThubanApplication.Session): New method to return the session
1797     object
1798    
1799     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
1800     interactor's selected_layer may not be a layer of the current
1801     session when the tree is updated while a new session is being set.
1802    
1803 bh 217 2002-07-17 Bernhard Herzog <[email protected]>
1804    
1805     * Thuban/UI/tree.py (color_string): Removed. No longer used.
1806     (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
1807     update_tree into update_tree and add_items. The tree now uses a
1808     more generic way to display the contents of the tree.
1809     (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
1810    
1811     * Thuban/Model/layer.py (Layer.TreeInfo),
1812     Thuban/Model/extension.py (Extension.TreeInfo),
1813     Thuban/Model/map.py (Map.TreeInfo),
1814 tkoester 403 Thuban/Model/session.py (Session.TreeInfo):
1815 bh 217 Add TreeInfo methods to implement the new tree view update scheme
1816    
1817 bh 216 2002-07-16 Bernhard Herzog <[email protected]>
1818    
1819     * Thuban/UI/application.py: Don't use "import from" for the
1820     MainWindow. It can't always be resolved.
1821     (ThubanApplication.OnInit): change reference to MainWindow
1822     accordingly.
1823    
1824     * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
1825     completely
1826    
1827 bh 213 2002-07-10 Bernhard Herzog <[email protected]>
1828    
1829     * setup.py (create_init_module): New configurable variable whose
1830     default depends on the platform we're running on.
1831     (ThubanInstall.initialize_options): Initialize
1832     self.create_init_module from the global create_init_module
1833     (ThubanInstall.user_options): indictate that the options
1834     create-init-module and init-module-dir have arguments.
1835    
1836     * setup.py: In the setup call change the version number to include
1837     cvs.
1838    
1839     * MANIFEST.in: Add the files in Examples
1840    
1841 bh 205 2002-07-09 Bernhard Herzog <[email protected]>
1842    
1843 bh 210 * setup.py: In the setup call, use the thuban homepage as the
1844     value of the url parameter.
1845    
1846 bh 208 * Examples: New subdirectory for examples.
1847    
1848     * Examples/simple_extensions/simple_tool.xpm,
1849     Examples/simple_extensions/simple_tool.py,
1850     Examples/simple_extensions/simple_command.py,
1851     Examples/simple_extensions/README: Simple examples showing how to
1852     add new commands and tools.
1853    
1854 bh 207 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
1855     bdist_rpm that we also have an install script.
1856     (bdist_inno): Add 2002 to the copyright notice.
1857    
1858 bh 205 * setup.py: Create a file in python's site-packages directory to
1859     make installation of Thuban as a library easier.
1860     (ThubanInstall.user_options): Add two new options,
1861     create-init-module and init-module-dir
1862     (ThubanInstall.expand_with_pure_python_dirs): New method to expand
1863     filenames for installation in the default directories.
1864     (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
1865     the inherited methods to capture some filenames before they're
1866     transformed too much by distutils.
1867     (ThubanInstall.run): Create the init module if requested.
1868     (ThubanInstall.thuban_init_filename): New method to return the
1869     full name of the init module.
1870     (ThubanInstall.get_outputs): Append the filename of the init
1871     module.
1872    
1873 bh 202 2002-07-08 Bernhard Herzog <[email protected]>
1874    
1875 bh 205 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
1876     handle the prefix properly which means that the default for the
1877     installation prefix should be /usr for RPMs and /usr/local when
1878     doing a normal source install.
1879     (bdist_rpm_install_script): Script to override the default install
1880     commands in the specfile generated by the bdist_rpm command.
1881     (thuban_bdist_rpm.user_options): Add a prefix option
1882     (thuban_bdist_rpm.initialize_options): Init the prefix option.
1883     Create the script files for the spec files as empty files here
1884     (thuban_bdist_rpm._make_spec_file): Override the inherited method
1885     to fill the script files with content.
1886    
1887 bh 202 * Thuban/Model/save.py (relative_filename): Wrapper around
1888     Thuban.Lib.fileutil.relative_filename that accepts an empty dir
1889     argument. save_session now automatically uses this version,
1890     solving a problem when saving to a relative filename.
1891    
1892     * setup.py: In the setup call, make sure that the library
1893     directories are under $prefix/lib not directly under $prefix.
1894    
1895 tkoester 403 2002-06-20 Jan-Oliver Wagner <[email protected]>
1896 jan 199
1897     * Thuban/Model/extension.py: new module to handle extension objects.
1898     * Thuban/Model/messages.py: new messages for extensions.
1899     * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
1900     Session.AddExtension): new for handling extensions.
1901     Also some other minor changes to round up extension handling.
1902     * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
1903     of Extension titles and title and names of its objects.
1904    
1905 bh 194 2002-05-29 Bernhard Herzog <[email protected]>
1906    
1907     * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
1908 bh 202 the events for a command.
1909 bh 194 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
1910     Call bind_command_events to bind the events. add_toolbar_command
1911     can now bind events too so that it's possible to have commands
1912     that are only available through the toolbar.
1913     (MainWindow.init_ids): New instance variable events_bound to keep
1914     track of for which commands events have been bound.
1915    
1916 bh 190 2002-05-28 Bernhard Herzog <[email protected]>
1917    
1918     * Thuban/UI/menu.py: New module to build and manage menus.
1919    
1920     * Thuban/UI/mainwindow.py: Remove some unused imports.
1921     (MainWindow.__init__, main_menu): move the definition of the main
1922     menu from __init__ to the Menu instance main_menu.
1923     (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
1924     build the menu bar and sub-menus from a menu description.
1925    
1926     * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
1927     startup file
1928     (ThubanApplication.read_startup_files): New method to run
1929     ~/.thuban/thubanstart.py
1930    
1931 bh 192 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
1932     Move the toolbar definition to the Menu instance main_toolbar.
1933     (MainWindow.build_toolbar): New method to build the toolbar
1934     similar to the build_menu methods
1935    
1936 bh 184 2002-05-23 Bernhard Herzog <[email protected]>
1937    
1938 bh 186 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
1939     layer_outline_color. Fix it in the definition of the command too.
1940    
1941 bh 184 * Thuban/UI/command.py (Command): Fix typo in doc string
1942    
1943 bh 182 2002-05-22 Bernhard Herzog <[email protected]>
1944    
1945     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
1946     in the docstring
1947    
1948 bh 175 2002-05-15 Bernhard Herzog <[email protected]>
1949    
1950 bh 180 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
1951     when the shapefile is empty.
1952     (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
1953     now return None for empty shapefiles. Update doc-strings.
1954    
1955     * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
1956     the layer's bbox being None.
1957    
1958     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
1959     layer's bbox being None.
1960    
1961 bh 175 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
1962     necessary.
1963     (MapCanvas.__init__): New instance variables, last_selected_layer
1964     and last_selected_shape to determine how the selection has
1965     changed.
1966    
1967     * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
1968     AutoSizeColumns because it will cause a traversal of the entire
1969     table which for large .dbf files will take a very long time.
1970    
1971 bh 172 2002-05-14 Bernhard Herzog <[email protected]>
1972    
1973     * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
1974     maximum depth for the tree than shapelib does by default.
1975    
1976 bh 165 2002-05-10 Bernhard Herzog <[email protected]>
1977    
1978     * setup.py (py_modules): The shptree modules doesn't have a
1979     wrapper, so don't include it in the py_modules
1980    
1981 bh 163 2002-05-08 Bernhard Herzog <[email protected]>
1982    
1983     * extensions/shapelib/shptree.c (compare_ints): Make arguments
1984     const void * as in the qsort prototype
1985     (SHPTreeFindLikelyShapes): Remove some unused variables.
1986    
1987     * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
1988     maintains to redraw the window during a drag.
1989     (MapCanvas.unprojected_rect_around_point): New method to determine
1990     a small region around a point for hit-testing.
1991     (MapCanvas.find_shape_at): Only test the shapes in a small region
1992     around the point.
1993    
1994     * setup.py: Increment the version to 0.1.2
1995    
1996     * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
1997     debug print and set session to None after unsubscribing
1998    
1999 bh 146 2002-05-07 Bernhard Herzog <[email protected]>
2000    
2001 bh 154 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
2002     the file to have a .thuban extension.
2003    
2004 bh 152 * Thuban/UI/tree.py (session_channels): New class constant with
2005     all the session channels to subscribe to to update the tree
2006     (SessionTreeCtrl.session_changed): Remember the session so that we
2007     can unsubscribe properly. Use the new class constant to
2008     unsubscribe from the old session and subscribe to the new one.
2009     (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
2010     subscriptions of the SessionTreeCtrl.
2011     (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
2012    
2013     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
2014     Session Tree" command to the file menu.
2015    
2016     * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
2017     as update_region to the renderer.
2018    
2019     * Thuban/UI/renderer.py
2020     (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
2021     update box is now directly a tuple, not a wxRect anymore.
2022    
2023     * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
2024     prints.
2025    
2026     2002-05-07 Bernhard Herzog <[email protected]>
2027    
2028 bh 146 * setup.py: Add the shptree extension module. See
2029     extensions/pyshapelib/ChangeLog for more details.
2030    
2031     * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
2032     extensions/shapelib/dbfopen.c: Really update to the versions of
2033     shapelib 1.2.9. For some reason it wasn't really done on
2034     2002-04-11.
2035    
2036     * extensions/shapelib/shptree.c: Modified version of shptree.c of
2037     shapelib 1.2.9. The only real difference is the use of qsort
2038     instead of a bubble sort implementation
2039    
2040     * Thuban/Model/layer.py (Layer.__init__): New instance variable
2041     shapetree to hold the shapelib quadtree for the shapefile
2042     (Layer.open_shapefile): Create the quad tree.
2043     (Layer.ShapesInRegion): New method to return the ids of shapes in
2044     a given region using the quad tree.
2045    
2046     * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
2047     comment
2048     (draw_polygon_shape): Accept both arcs and polygons.
2049     (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
2050     the api.
2051    
2052     * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
2053     return the shape ids to be rendered in a given layer.
2054     (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
2055     ids. Use draw_polygon_shape to draw arc shapes as well.
2056     (ScreenRenderer.RenderMap): New parameter for the rectangle that
2057     has to be updated
2058     (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
2059     calling it's ShapesInRegion method.
2060    
2061     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
2062     update_region for the update region.
2063     (MapCanvas.OnPaint): Maintain the update region
2064     (MapCanvas.do_redraw): Pass the bounding box of the update_region
2065     to the renderer when drawing the bitmap. Reset the update_region.
2066    
2067 bh 129 2002-05-03 Bernhard Herzog <[email protected]>
2068    
2069 bh 131 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
2070     MainWindow.OpenSession): Change the file extension of the session
2071     files to .thuban
2072    
2073 bh 129 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
2074     Move the map channels to be forwarded by the session into the
2075 bh 146 class constant with forwarded_channels. Also add
2076     LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
2077     forwarded_channels
2078 bh 129
2079     * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
2080     typo and some rewording).
2081    
2082 bh 126 2002-05-02 Bernhard Herzog <[email protected]>
2083    
2084     * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
2085     around to speed up most redraws:
2086     (MapCanvas.__init__): New instance variable bitmap which holds the
2087     bitmap
2088     (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
2089     self.bitmap to draw.
2090     (MapCanvas.full_redraw): New method to force a full redraw
2091     including the bitmap
2092     (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
2093     make sure the bitmap is redrawn.
2094     (MapCanvas.projection_changed, MapCanvas.set_view_transform,
2095     MapCanvas.shape_selected): Call full_redraw instead of readraw to
2096     make sure the bitmap is redrawn.
2097     (MapCanvas.OnSize): New method to handle size events so that the
2098     bitmap can be redrawn.
2099    
2100 bh 124 2002-04-29 Bernhard Herzog <[email protected]>
2101    
2102     * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
2103     canvas' VIEW_POSITION event
2104     (MainWindow.view_position_changed): Handler for VIEW_POSITION.
2105     Update the text in the status-bar accordingly.
2106    
2107     * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
2108     (MapCanvas.__del__): Implement because Publisher.__del__ has to be
2109     called.
2110     (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
2111     current_position
2112     (MapCanvas.set_current_position): New method to set
2113     current_position. Issue a VIEW_POSITION event
2114     (MapCanvas.CurrentPosition): New public method to return the value
2115     of current_position. Should be called when the VIEW_POSITION event
2116     is processed.
2117     (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
2118     Update the position.
2119     (MapCanvas.OnLeaveWindow): Set the position to None.
2120    
2121     * Thuban/UI/messages.py (VIEW_POSITION): New message for the
2122     position in the statusbar
2123    
2124 tkoester 403 2002-04-26 Frank Koormann <[email protected]>
2125 frank 120
2126     * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
2127    
2128 tkoester 403 2002-04-24 Frank Koormann <[email protected]>
2129    
2130 frank 118 * Resources/Bitmaps/identify.xpm: shadow added
2131    
2132     * Resources/Bitmaps/fullextent.xpm: new
2133 jan 116
2134 tkoester 403 2002-04-22 Jan-Oliver Wagner <[email protected]>
2135 jan 116
2136 tkoester 403 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
2137     box
2138 jan 114
2139 tkoester 403 2002-04-21 Jan-Oliver Wagner <[email protected]>
2140    
2141 jan 114 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
2142    
2143     * Thuban/UI/tree.py (update_tree): added added map extent
2144    
2145     * Thuban/UI/mainwindow.py (_method_command): extended by parameter
2146 tkoester 403 icon; added map_full_extend as tool
2147 jan 114
2148 tkoester 403 2002-04-19 Jan-Oliver Wagner <[email protected]>
2149 jan 107
2150     * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
2151     saving _new_ sessions
2152    
2153     * Thuban/Model/session.py (create_empty_session): new session
2154     don't have a filename (set to None)
2155    
2156     * Thuban/UI/tree.py (update_tree): added filename and modified flag
2157    
2158     * Thuban/Model/load.py (ProcessSession): convert projection
2159     parameters from unicode to regular string
2160    
2161     * Data/iceland_sample.session: Added UTM Zone 26 projection.
2162    
2163 bh 100 2002-04-11 Bernhard Herzog <[email protected]>
2164    
2165     * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
2166     extensions/shapelib/dbfopen.c: Update to the versions of shapelib
2167     1.2.9
2168    
2169     * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
2170     the pyshapelib directoy into the list of include dirs, so that
2171     pyshapelib_api.h can be found.
2172    
2173     * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
2174     holds the pyshapelib C-API
2175     (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
2176     pyshapelib_api to access the shapelib functions.
2177     (initwxproj): Import the c_api from the shapelib module and
2178     initialize pyshapelib_api.
2179    
2180 bh 89 2002-04-04 Bernhard Herzog <[email protected]>
2181    
2182 bh 91 * setup.py (thuban_bdist_rpm.initialize_options): Use
2183     initialize_options to create the scripts for the rpm.
2184    
2185 bh 89 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
2186    
2187 bh 85 2002-04-03 Bernhard Herzog <[email protected]>
2188    
2189 bh 87 * setup.py: Increment version to 0.1.1
2190    
2191 bh 85 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
2192     Layer" and "Remove Layer" commands from the layer menu to the map
2193     menu
2194    
2195 bh 83 2002-02-15 Bernhard Herzog <[email protected]>
2196    
2197     * Thuban/Model/layer.py (Layer.Shape): list append only takes one
2198     argument (python <= 1.5.2 erroneously accepted multiuple
2199     arguments)
2200    
2201 bh 81 2002-02-04 Bernhard Herzog <[email protected]>
2202    
2203     * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
2204     RecordGrid in the identifyview.
2205     (IdentifyView.__init__): Use IdentifyGridCtrl instead of
2206     IdentifyListCtrl. The grid allows editing of the values.
2207    
2208     * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
2209     implementing a grid for a single row of a thuban table.
2210    
2211     * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
2212     layers by default. Easier to use than the previous default of only
2213     searching through the select layer which meant that if no layer
2214     was selected, you couldn't select a shape.
2215    
2216     * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
2217    
2218     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
2219     stroke_width attribute
2220    
2221     * Thuban/Model/save.py (save_session): Write the new stroke_width
2222     attribute
2223    
2224     * Thuban/Model/load.py (ProcessSession.startElement): Read the
2225     stroke_width attribute
2226    
2227     * Thuban/Model/layer.py (Layer.__init__): New parameter and
2228     instance variable stroke_width
2229     (Layer.SetStrokeWidth): Set the stroke_width.
2230    
2231 bh 72 2002-02-01 Bernhard Herzog <[email protected]>
2232    
2233     * extensions/thuban/wxproj.cpp (project_points): Fix two
2234     off-by-one errors in the last loop that joins the various parts
2235     together.
2236    
2237 bh 71 2002-01-14 Bernhard Herzog <[email protected]>
2238    
2239     * setup.py (data_dist.make_distribution): Fix some typos
2240    
2241 bh 70 2001-09-18 Bernhard Herzog <[email protected]>
2242    
2243     * README: Slight tweaking in preparation for the 0.1 release
2244    
2245     * setup.cfg: Add section for sdist to create both tgz and zip
2246     archives
2247    
2248     * setup.py: increase version number to 0.1
2249     (data_dist): New command class for data distribution
2250    
2251 bh 64 2001-09-14 Bernhard Herzog <[email protected]>
2252    
2253 bh 70 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
2254     Handle the case of no layer (i.e. layer is None) properly.
2255    
2256 tkoester 403 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
2257 bh 70 Set the initial selection of the combo boxes to reflect the
2258     projection we're starting with in a way that works on windows,
2259     too.
2260    
2261 bh 64 * Thuban/Lib/connector.py (Connector.print_connections): Print the
2262     puiblisher's ids in hex to make it easier to compare them to the
2263     standard repr of python methods
2264    
2265     * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
2266     messages
2267    
2268 bh 59 2001-09-13 Bernhard Herzog <[email protected]>
2269    
2270 bh 64 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
2271     deselect the layer if no layer is selected
2272    
2273 bh 59 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
2274     idle time when there actually is something to draw. If there's
2275     nothing to draw simply clear the window
2276     (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
2277     (MapCanvas.SetMap): force a redraw in all cases because
2278     FitMapToWindow doesn't always do it.
2279     (MapCanvas.ZoomFactor): Add an optional parameter, center, to
2280     specify the point to move into the center of the window
2281     (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
2282     dragged, zoon in/out by a factor of 2
2283 bh 64 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
2284     index, i.e. reversed drawing order) so that objects appearing to
2285     be in from of others are selected first. This is probably mostly
2286     relevant for point shapes where the symbols used may overlap
2287 bh 59
2288     * Thuban/Model/session.py (create_empty_session): Unset the
2289     modified bit before returning it
2290    
2291     * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
2292     create_empty_session session to create the new, empty session.
2293    
2294     * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
2295     the tool bitmaps.
2296     (MainWindow.OnClose, MainWindow.save_modified_session): Separate
2297     the code that asks whether the session should be saved into the
2298     new method save_modified_session.
2299     (MainWindow.OpenSession, MainWindow.NewSession): Use the new
2300     method to save modified session here too.
2301    
2302 bh 55 2001-09-11 Bernhard Herzog <[email protected]>
2303    
2304     * setup.py (InnoIconItem): fix typo
2305    
2306     (thuban_bdist_inno.run):
2307     (bdist_inno.run): Move the decision not to create symlinks on
2308     non-nt platforms to thuban_bdist_inno and do it unconditinally
2309     since we never want to create the symlinks here
2310    
2311 bh 48 2001-09-10 Bernhard Herzog <[email protected]>
2312    
2313 bh 53 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
2314     identify view immediately
2315    
2316     * Thuban/UI/controls.py: New file with two classes RecordListCtrl
2317     and SelectableRecordListCtrl that implement the code shared by the
2318     identify view and the label dialog
2319    
2320     * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
2321     new class RecordListCtrl
2322    
2323     * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
2324     return value of GetValue is None instead of using it as a boolean
2325     directly so that Zero numbers are handled properly.
2326     (LabelListCtrl): Derive from the new class
2327     SelectableRecordListCtrl
2328    
2329 bh 48 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
2330     (Proj4Dialog.dialogLayout): Make the window resizable and set the
2331     size of the text control explicitly to make the sizers work on
2332     both Windows and X.
2333    
2334 bh 44 2001-09-07 Bernhard Herzog <[email protected]>
2335    
2336     * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
2337     that can limit the search to the currently selected layer.
2338     (MapCanvas.SelectShapeAt): Make sure that the currently selected
2339     layer stays selected even when no shape is found
2340 bh 46 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
2341     height do nothing (avoids zero division errors)
2342 bh 44
2343 bh 32 2001-09-06 Bernhard Herzog <[email protected]>
2344    
2345 bh 42 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
2346     Correct the spelling of SessionTreeCtrl. dabbrev is too damn
2347     convenient :-)
2348     (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
2349     a new instvar layer_to_item to map layers to tree items
2350     (SessionTreeCtrl.layer_selected): Select the appropriate tree item
2351     to match the current selection in the interactor
2352    
2353 bh 40 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
2354     (Interactor.HasSelectedLayer): New methods to query the current
2355     selection
2356    
2357     * Thuban/UI/mainwindow.py (MainWindow.current_layer):
2358     (MainWindow.has_selected_layer): Simply call the appropriate
2359     interactor method
2360    
2361     * Thuban/UI/mainwindow.py (MainWindow.__init__):
2362     (MainWindow.LayerShowTable):
2363     (MainWindow.identify_view_on_demand): Store the interactor in an
2364     instvar and use that reference instead of going through main.app
2365    
2366 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
2367     * Thuban/UI/application.py (ThubanApplication.OnInit):
2368 bh 40 * Thuban/UI/main.py (main): Create the session tree view in main
2369     with the new mainwindow method ShowSessionTree and not directly
2370     the application's OnInit method
2371    
2372     * Thuban/UI/tree.py (myTreeCtrlPanel):
2373     (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
2374     TreeCtrl isntead of a panel. This affects most method since we now
2375     refer to self instead of self.tree
2376     (SessionTreeView): New class implementing a non-modal dialog
2377     showing the session tree.
2378    
2379 bh 35 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
2380     layer to the tableview dialog.
2381    
2382     * Thuban/UI/tableview.py: Add some doc-strings
2383 tkoester 403 (TableGrid):
2384 bh 35 (TableGrid.OnRangeSelect):
2385     (TableGrid.OnSelectCell):
2386     (TableFrame.__init__):
2387     (TableFrame.row_selected):
2388     Selecting rows in the grid view now updates the selected shapes
2389     through the TableFrame. To achieve this we derive TableGrid from
2390     Publisher and introduce the message type ROW_SELECTED which the
2391     TableFrame subscribes to and which is issued by OnRangeSelect and
2392     OnSelectCell
2393    
2394     (DataTable.SelectRow): Removed because it's no longer needed in
2395     the row/shape selection scheme
2396    
2397 bh 32 * Thuban/UI/dialogs.py: New file implementing common classes for
2398     dialogs
2399    
2400     * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
2401     the SELECTED_SHAPE message anymore. This is now handled by the
2402     parent.
2403     (TableGrid.select_shape): Only update the selection if the shape
2404     is not None.
2405     (TableFrame): Inherit from the new NonModalDialog class.
2406     (TableFrame.__init__, TableFrame.select_shape): Handle the
2407     SELECT_SHAPE message.
2408     (TableFrame.OnClose): Extend the inherited method to unsubscribe
2409     SELECT_SHAPE
2410    
2411     * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
2412     (MainWindow.add_dialog):
2413     (MainWindow.dialog_open):
2414     (MainWindow.remove_dialog):
2415     (MainWindow.get_open_dialog): New methods to maintain a dictionary
2416     of opened non-modal dialogs.
2417    
2418     (MainWindow.__init__): Initialize the new non-modal dictionary
2419     management code
2420     (MainWindow.LayerShowTable): maintain separate dialogs for each
2421     table using the non-modal dialog management code to only open a
2422     view once for each table.
2423    
2424     (MainWindow.IdentifyTool):
2425     (MainWindow.__init__):
2426     (MainWindow.identify_view_on_demand): Don't open the identify view
2427     in IdentifyTool anymore. This will be done automatically by the
2428     new method identify_view_on_demand which handles the
2429     SELECTED_SHAPE message so that the identify view will be opened on
2430     demand
2431    
2432     * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
2433     the interactor argument. The SELECTED_SHAPE message is now handled
2434     by the parent.
2435     (IdentifyView.__init__): Add the interactor argument so that we
2436     can handle the SELECTED_SHAPE message here
2437     (IdentifyView.selected_shape): New method to handle the
2438     SELECTED_SHAPE messages
2439    
2440     * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
2441     NonModalDialog class
2442     (IdentifyView.OnClose): Extend the inherited version to
2443     unsubscribe SELECT_SHAPE
2444    
2445     * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
2446    
2447 bh 26 2001-09-05 Bernhard Herzog <[email protected]>
2448    
2449     * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
2450 tkoester 403
2451 bh 26 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
2452     interactor to pass through to the MapCanvas
2453 tkoester 403
2454 bh 26 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
2455     argument to the MainWindow constructor to get rid of the ugly hack
2456     that made main.app available early just so that the mapcanvas
2457     could access the interactor object.
2458    
2459 bh 19 2001-09-04 Bernhard Herzog <[email protected]>
2460    
2461 bh 22 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
2462     that runs a modal message box
2463     (MainWindow.OnClose): Use the new method
2464     (MainWindow.RemoveLayer): Just do nothing in case no layer is
2465     selected. The command should be grayed out anyway, so there's no
2466     need to pop up a message box.
2467     (MainWindow.AddLayer): Pop up a message box with an error message
2468     if the shape file can't be opened
2469    
2470     * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
2471     immediately. This will cause an exception in case the file can't
2472     be opened and we can display an appropriate message.
2473    
2474 bh 19 * MANIFEST.in: Add extensions/pyprojection/LICENSE
2475    
2476     * setup.py (thuban_bdist_rpm): New class implementing a Thuban
2477     specific bdist_rpm command.
2478    
2479     * Thuban/UI/main.py: Catch ImportError exceptions when importing
2480     the locale module because it may not be available on some
2481     installations.
2482    
2483     * extensions/pyprojection/LICENSE: Copy of the license text in
2484     Projection.i. Having it in a separate file makes it easier to
2485     refer to license text in e.g. RPMs
2486    
2487 bh 18 2001-09-03 Bernhard Herzog <[email protected]>
2488    
2489 bh 19 * setup.py: use wx-config instead of wxgtk-config because it's
2490     more generic
2491    
2492     * setup.py (ThubanInstall.get_outputs): Add the symlink in
2493     <prefix>/bin to the outputs
2494     (ThubanInstall.link_file): New method to link files. We need this
2495     because the standard copy_files refuses to link non-existing
2496     files.
2497     (ThubanInstall.run): Remove the leading install root from the
2498     script filename if an install root was specified and use the new
2499     link_file method
2500 tkoester 403
2501 bh 18 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
2502     the window when the first layer is added to the map.
2503    
2504     * setup.py (ThubanInstall.run): Honor the build root (self.root)
2505     when linking thuban.py to <prefix>/bin
2506    
2507 bh 16 2001-08-31 Bernhard Herzog <[email protected]>
2508    
2509     * setup.py: In the setup call, the install parameters shouldn't
2510     have trailing slashes because distutils on non-posix platforms
2511     doesn't like that. The same applies to other directories like
2512     "Resources/Bitmaps"
2513    
2514     In the configuration section for nt, move the wxWindows directory
2515     optins into the part clearly marked as editable.
2516    
2517     (InstallLocal.initialize_options):
2518     (InstallLocal.user_options): remove the currently unused debug
2519     flag
2520     (thuban_build_py.find_all_modules): Add this method so that it
2521     works for our case of having packages and modules in one
2522     distribution as well.
2523     (ThubanInstall.initialize_options):
2524     (ThubanInstall.finalize_options):
2525     (ThubanInstall.user_options):
2526     (ThubanInstall.boolean_options): Add new options, do-symlink and
2527     extra files. Since these are the first ThubanInstall specific
2528     options, override user_options and boolean_options
2529     (ThubanInstall.run): Honor the new do-symlink and extra-files
2530     options.
2531     (ThubanInstall.get_outputs): Add to override the base-class's
2532     version and add the extra-files to the outputs
2533     (bdist_inno): New class for windows distributions with Inno Setup
2534     (InnoIconItem): Helper class for bdist_inno
2535     (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
2536     this together with the appropriate parameters, to the setup call.
2537 tkoester 403
2538 bh 16 * setup.cfg (bdist_inno): added new section for the inno setup
2539     installer
2540    
2541     * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
2542     changing_selection to avoid recursive selection events when
2543     modifying the selection in response to a selection event.
2544     (myTreeCtrlPanel.normalize_selection): Set the new inst var when
2545     changing the tree's selection.
2546     (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
2547     we're not being called indirectly from normalize_selection.
2548    
2549     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
2550     event.Check only if the command is actuall checkable.
2551     (MainWindow.__init__): Call the toolbar's Realize method to make
2552     sure that the items are actually shown
2553    
2554 bh 7 2001-08-28 Bernhard Herzog <[email protected]>
2555    
2556 bh 9 * setup.py: Fix some doc strings
2557    
2558 bh 7 * ChangeLog: started
2559    

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26