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