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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 483 - (show annotations)
Fri Mar 7 18:19:31 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 61447 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26