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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1015 - (show annotations)
Fri May 23 09:26:40 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/ChangeLog
File size: 154191 byte(s)
Introducing QueryTableFrame and a very coarse ShowTable implementation.

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26