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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 700 - (show annotations)
Thu Apr 17 15:20:25 2003 UTC (21 years, 11 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 95869 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26