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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 734 - (show annotations)
Thu Apr 24 19:14:16 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 104681 byte(s)
(ProjFrame._OnSaveAs): Don't translate
empty strings.

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26