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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 619 - (show annotations)
Mon Apr 7 10:14:03 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 82829 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26