/[thuban]/branches/greater-ms3/thuban/ChangeLog
ViewVC logotype

Contents of /branches/greater-ms3/thuban/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 612 - (show annotations)
Mon Apr 7 08:55:01 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 82562 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26