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