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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 735 - (show annotations)
Fri Apr 25 09:11:39 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 105816 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26