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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 587 - (show annotations)
Tue Apr 1 15:57:28 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 76544 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26