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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 823 - (show annotations)
Mon May 5 18:20:39 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 121855 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26