1 |
|
2002-09-02 Bernhard Herzog <[email protected]> |
2 |
|
|
3 |
|
* Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add |
4 |
|
a parameter to determine the size of the rectangle. |
5 |
|
(MapCanvas.find_shape_at): Create the box around the point on a |
6 |
|
layer by layer basis and make the size depend on the shape type. |
7 |
|
This solves a problem with the selection of point shapes at the |
8 |
|
border of the layer's bounding box |
9 |
|
|
10 |
|
2002-08-30 Bernhard Herzog <[email protected]> |
11 |
|
|
12 |
|
* Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method |
13 |
|
for the sensitivity of remove layer. |
14 |
|
(_can_remove_layer): New. Sensitivity callback for remove layer |
15 |
|
(Command layer_remove): Use _can_remove_layer |
16 |
|
|
17 |
|
* Thuban/Model/map.py (Map.CanRemoveLayer): New method to |
18 |
|
determine whether a given layer can be deleted. |
19 |
|
|
20 |
|
* Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint) |
21 |
|
(MapCanvas.do_redraw): Get rid of the unused update_region |
22 |
|
instance variable |
23 |
|
|
24 |
|
* Thuban/UI/view.py: Add/update some doc-strings. |
25 |
|
|
26 |
|
* test/: new subdirectory with a bunch of unit tests. |
27 |
|
|
28 |
|
* test/README, test/test_table.py, test/test_save.py, |
29 |
|
test/test_menu.py, test/test_load.py: Initial set of tests and |
30 |
|
brief instructions on how to run them |
31 |
|
|
32 |
|
2002-08-29 Bernhard Herzog <[email protected]> |
33 |
|
|
34 |
|
* Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle |
35 |
|
arcs with multiple parts. |
36 |
|
|
37 |
|
* Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp): |
38 |
|
Handle degenrate rectangles. |
39 |
|
|
40 |
|
* Thuban/Model/table.py: Make writing records work correctly: |
41 |
|
(Table.__init__): Keep track of whether the DBF is open for |
42 |
|
writing |
43 |
|
(Table.write_record): Open the DBF file for writing when necessary |
44 |
|
|
45 |
|
2002-08-27 Bernhard Herzog <[email protected]> |
46 |
|
|
47 |
|
* Thuban/Model/table.py (Table.write_record, Table.__init__): Open |
48 |
|
dbf files only for reading by default. Use a new writable dbf |
49 |
|
object for writing. |
50 |
|
|
51 |
|
2002-08-26 Bernhard Herzog <[email protected]> |
52 |
|
|
53 |
|
* Thuban/UI/mainwindow.py: Refactor the context creation: |
54 |
|
(MainWindow.Context): New method to return a context |
55 |
|
(MainWindow.invoke_command, MainWindow.update_command_ui): Use the |
56 |
|
new method |
57 |
|
|
58 |
|
* Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the |
59 |
|
layer table specific code from TableGrid into LayerTableGrid |
60 |
|
(TableFrame, LayerTableFrame): Split the layer table specific code |
61 |
|
from TableFrame into LayerTableFrame |
62 |
|
(LayerTableGrid.select_shape): Remove a debug print |
63 |
|
|
64 |
|
* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the |
65 |
|
LayerTableFrame |
66 |
|
|
67 |
|
2002-08-23 Bernhard Herzog <[email protected]> |
68 |
|
|
69 |
|
* Thuban/Model/layer.py (Layer.__init__): Make sure we have an |
70 |
|
absolute filename. |
71 |
|
|
72 |
|
2002-08-22 Bernhard Herzog <[email protected]> |
73 |
|
|
74 |
|
* Thuban/Model/table.py (Table.write_record): New method to write |
75 |
|
records. |
76 |
|
(Table.__init__): Open the DBF file for writing too. |
77 |
|
|
78 |
|
* Thuban/UI/controls.py (RecordTable.SetValue): Write the value |
79 |
|
into the underlying table. |
80 |
|
|
81 |
|
* extensions/shapelib/shapefil.h (DBFCommit), |
82 |
|
extensions/shapelib/dbfopen.c (DBFCommit): New API function to |
83 |
|
commit any changes made to the DBF file. |
84 |
|
|
85 |
|
* Thuban/UI/mainwindow.py (make_check_current_tool) |
86 |
|
(_tool_command): Put the code that generates the "checked" |
87 |
|
callback into a separate function so that we can reuse it |
88 |
|
elsewhere |
89 |
|
|
90 |
|
* Thuban/Model/save.py (Saver): New class to handle serializing a |
91 |
|
session into an XML file. The main reason to introduce a class is |
92 |
|
that applications built on Thuban can derive from it so that they |
93 |
|
can save additional information in a session file. |
94 |
|
(save_session): Delegate almost all the work to the Saver class. |
95 |
|
Rename the filename argument to file because it may be a file like |
96 |
|
object now. |
97 |
|
|
98 |
|
* Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility |
99 |
|
code. Remove the little test code which would be executed when the |
100 |
|
module is run as a script which didn't work anymore since it can't |
101 |
|
import the other Thuban modules. |
102 |
|
(ProcessSession, load_session): Refactor the ProcessSession to |
103 |
|
have one method for each element start and end tag so that derived |
104 |
|
classes can easily override the processing of individual tags. |
105 |
|
Also, always parse with namespaces enabled because applications |
106 |
|
built on top of Thuban will likely use namespaces if they extend |
107 |
|
the session file format. |
108 |
|
|
109 |
|
2002-08-21 Bernhard Herzog <[email protected]> |
110 |
|
|
111 |
|
* setup.py (ThubanInstall.run): Don't repr install_lib_orig |
112 |
|
because thubaninit_contents will do it for us. |
113 |
|
|
114 |
|
2002-08-16 Jan-Oliver Wagner <[email protected]> |
115 |
|
|
116 |
|
* Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if |
117 |
|
tree window already open |
118 |
|
|
119 |
|
2002-08-15 Bernhard Herzog <[email protected]> |
120 |
|
|
121 |
|
* Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method |
122 |
|
with self. |
123 |
|
|
124 |
|
* Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse |
125 |
|
when we have actually captured it. |
126 |
|
|
127 |
|
* Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the |
128 |
|
shapefile and destroy the table. |
129 |
|
|
130 |
|
* Thuban/Model/table.py (Table.Destroy): New. Close the DBF file. |
131 |
|
|
132 |
|
2002-08-14 Bernhard Herzog <[email protected]> |
133 |
|
|
134 |
|
* Thuban/UI/controls.py (RecordTable.__init__): Remove the unused |
135 |
|
instance variable columns |
136 |
|
(RecordTable.GetTypeName): row and col may be negative in some |
137 |
|
cases. |
138 |
|
|
139 |
|
* setup.py (InstallLocal.initialize_options) |
140 |
|
(InstallLocal.finalize_options, InstallLocal.user_options): New |
141 |
|
option create-init-file to build a thubaninit.py when running |
142 |
|
install_local |
143 |
|
(InstallLocal.run): Create the thubaninit.py module when requested |
144 |
|
(thubaninit_contents): Split the template into several parts and |
145 |
|
create a new function thubaninit_contents that creates the |
146 |
|
contents of a thubaninit module. |
147 |
|
(ThubanInstall.run): Use the new function to create the thubaninit |
148 |
|
module. |
149 |
|
|
150 |
|
2002-07-30 Bernhard Herzog <[email protected]> |
151 |
|
|
152 |
|
* Thuban/UI/application.py (ThubanApplication.OnExit): Do some |
153 |
|
cleanup. |
154 |
|
(ThubanApplication.MainLoop): Extend to automatically call OnExit. |
155 |
|
|
156 |
|
* Thuban/Model/session.py (Session.Destroy): Don't bypass the |
157 |
|
direct base class' Destroy method. |
158 |
|
|
159 |
|
* Thuban/Model/map.py (Map.ClearLayers): New method to delete all |
160 |
|
layers. |
161 |
|
(Map.Destroy): Destroy the label_layer as well and call the |
162 |
|
inherited Desatroymethod first so that no more messages are |
163 |
|
issued. |
164 |
|
(Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED |
165 |
|
message if the stacking order actually has changed. Add |
166 |
|
doc-strings. |
167 |
|
(Map.BoundingBox): Correct the doc-string. |
168 |
|
(Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers) |
169 |
|
(Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings. |
170 |
|
|
171 |
|
* Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete |
172 |
|
all labels. |
173 |
|
|
174 |
|
2002-07-29 Bernhard Herzog <[email protected]> |
175 |
|
|
176 |
|
* Thuban/Model/map.py (Map.subscribe_layer_channels) |
177 |
|
(Map.unsubscribe_layer_channels): Put the code that (un)subscribes |
178 |
|
to a layer's channels into separate methods. |
179 |
|
(Map.RemoveLayer, Map.AddLayer): Call the new methods |
180 |
|
(Map.Destroy): Unsubscribe from a layer's channels before |
181 |
|
destroying it. |
182 |
|
|
183 |
|
* Thuban/UI/view.py (MapCanvas.find_shape_at): Change the |
184 |
|
selected_layer parameter to searched_layer which is the layer to |
185 |
|
search in. |
186 |
|
(MapCanvas.SelectShapeAt): New parameter layer to restrict the |
187 |
|
search to that layer. Return the selected layer and shape. |
188 |
|
|
189 |
|
* Examples/simple_extensions/simple_tool.py (simple_tool): Fix a |
190 |
|
typo |
191 |
|
|
192 |
|
2002-07-24 Bernhard Herzog <[email protected]> |
193 |
|
|
194 |
|
* Thuban/UI/application.py (ThubanApplication.create_session): |
195 |
|
Extend the doc string. |
196 |
|
(ThubanApplication.subscribe_session) |
197 |
|
(ThubanApplication.unsubscribe_session): New methods to |
198 |
|
subscribe/unsubscribe to/from session channels. |
199 |
|
(ThubanApplication.SetSession): Call the new methods here. |
200 |
|
(ThubanApplication.maps_changed, ThubanApplication.set_map): |
201 |
|
Renamed set_map to maps_changed. Its now a subscriber for |
202 |
|
MAPS_CHANGED. |
203 |
|
|
204 |
|
* Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct |
205 |
|
x-coordinate in case of simple clicks |
206 |
|
|
207 |
|
* Thuban/Model/base.py (Modifiable.changed): Apply the args tuple, |
208 |
|
don't pass it as a parameter |
209 |
|
|
210 |
|
* Thuban/Model/session.py (Session.RemoveMap): New |
211 |
|
|
212 |
|
* Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial |
213 |
|
window size into a parameter. |
214 |
|
|
215 |
|
2002-07-23 Bernhard Herzog <[email protected]> |
216 |
|
|
217 |
|
* Thuban/UI/menu.py (Menu.item_index): Also search for menus not |
218 |
|
just commands. |
219 |
|
|
220 |
|
* Thuban/UI/mainwindow.py (MainWindow.__init__): Change the |
221 |
|
parameter list a bit to allow setting the window title and the |
222 |
|
initial message in the status bar. Update the callers. |
223 |
|
|
224 |
|
* Thuban/UI/application.py (ThubanApplication.OnInit) |
225 |
|
(ThubanApplication.CreateMainWindow): Put the mainwindow |
226 |
|
instantiation into a separate method so that it can be overridden |
227 |
|
by a subclass. |
228 |
|
|
229 |
|
2002-07-19 Bernhard Herzog <[email protected]> |
230 |
|
|
231 |
|
* Thuban/Model/session.py: Issue a CHANGED message every time |
232 |
|
another changed message is issued to make it easier to get |
233 |
|
notified of changes. |
234 |
|
(Session): Update the doc string |
235 |
|
(Session.forward): Issue changed-events as CHANGED as well. |
236 |
|
(Session.changed): Overwrite the inherited version to issue |
237 |
|
CHANGED events as well. |
238 |
|
|
239 |
|
* Thuban/UI/tree.py: We can now simply subscribe to the session's |
240 |
|
CHANGED channel to be informed of changes. |
241 |
|
(SessionTreeCtrl.session_channels): Not needed any longer. |
242 |
|
(SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed): |
243 |
|
Only have to (un)subscribe CHANGED |
244 |
|
|
245 |
|
* Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps. |
246 |
|
|
247 |
|
* Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around |
248 |
|
for the wxPython locale bug to __init__.py so that it's |
249 |
|
automatically executed by anybody using UI code from Thuban. |
250 |
|
|
251 |
|
2002-07-18 Bernhard Herzog <[email protected]> |
252 |
|
|
253 |
|
* Thuban/UI/main.py (main): app no longer needs to be global |
254 |
|
|
255 |
|
* Thuban/UI/mainwindow.py (MainWindow.__init__): Add application |
256 |
|
as parameter and store it in an instance variable |
257 |
|
(MainWindow.invoke_command, MainWindow.update_command_ui) |
258 |
|
(MainWindow.save_modified_session, MainWindow.NewSession) |
259 |
|
(MainWindow.OpenSession, MainWindow.SaveSession) |
260 |
|
(MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's |
261 |
|
application object. |
262 |
|
|
263 |
|
* Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate |
264 |
|
the main window with self. |
265 |
|
|
266 |
|
* Thuban/UI/context.py: New module with the context class |
267 |
|
|
268 |
|
* Thuban/UI/command.py (Command): Update doc string. |
269 |
|
|
270 |
|
* Thuban/UI/mainwindow.py (MainWindow.invoke_command, |
271 |
|
MainWindow.update_command_ui): Pass an instance of the context |
272 |
|
class to the command's methods |
273 |
|
(check_current_tool, call_method): Handle the new context |
274 |
|
implementation |
275 |
|
|
276 |
|
* Examples/simple_extensions/simple_tool.py (simple_tool, |
277 |
|
check_simple_tool): Handle the new context implementation |
278 |
|
|
279 |
|
* Examples/simple_extensions/simple_command.py (simple_command): |
280 |
|
Handle the new context implementation. Update the comments about |
281 |
|
the context. |
282 |
|
|
283 |
|
* Thuban/UI/application.py (ThubanApplication.SetSession): Add |
284 |
|
doc-string |
285 |
|
(ThubanApplication.Session): New method to return the session |
286 |
|
object |
287 |
|
|
288 |
|
* Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The |
289 |
|
interactor's selected_layer may not be a layer of the current |
290 |
|
session when the tree is updated while a new session is being set. |
291 |
|
|
292 |
|
2002-07-17 Bernhard Herzog <[email protected]> |
293 |
|
|
294 |
|
* Thuban/UI/tree.py (color_string): Removed. No longer used. |
295 |
|
(SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split |
296 |
|
update_tree into update_tree and add_items. The tree now uses a |
297 |
|
more generic way to display the contents of the tree. |
298 |
|
(SessionTreeCtrl): Add a doc string explaining the TreeInfo method |
299 |
|
|
300 |
|
* Thuban/Model/layer.py (Layer.TreeInfo), |
301 |
|
Thuban/Model/extension.py (Extension.TreeInfo), |
302 |
|
Thuban/Model/map.py (Map.TreeInfo), |
303 |
|
Thuban/Model/session.py (Session.TreeInfo): |
304 |
|
Add TreeInfo methods to implement the new tree view update scheme |
305 |
|
|
306 |
|
2002-07-16 Bernhard Herzog <[email protected]> |
307 |
|
|
308 |
|
* Thuban/UI/application.py: Don't use "import from" for the |
309 |
|
MainWindow. It can't always be resolved. |
310 |
|
(ThubanApplication.OnInit): change reference to MainWindow |
311 |
|
accordingly. |
312 |
|
|
313 |
|
* Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu |
314 |
|
completely |
315 |
|
|
316 |
|
2002-07-10 Bernhard Herzog <[email protected]> |
317 |
|
|
318 |
|
* setup.py (create_init_module): New configurable variable whose |
319 |
|
default depends on the platform we're running on. |
320 |
|
(ThubanInstall.initialize_options): Initialize |
321 |
|
self.create_init_module from the global create_init_module |
322 |
|
(ThubanInstall.user_options): indictate that the options |
323 |
|
create-init-module and init-module-dir have arguments. |
324 |
|
|
325 |
|
* setup.py: In the setup call change the version number to include |
326 |
|
cvs. |
327 |
|
|
328 |
|
* MANIFEST.in: Add the files in Examples |
329 |
|
|
330 |
2002-07-09 Bernhard Herzog <[email protected]> |
2002-07-09 Bernhard Herzog <[email protected]> |
331 |
|
|
332 |
* setup.py: In the setup call, use the thuban homepage as the |
* setup.py: In the setup call, use the thuban homepage as the |