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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1256 - (show annotations)
Fri Jun 20 10:40:42 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 194988 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26