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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 716 - (show annotations)
Wed Apr 23 08:59:19 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 99320 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26