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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 634 - (show annotations)
Wed Apr 9 15:41:58 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 85954 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26