1 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
2 |
|
|
3 |
|
* Thuban/UI/application.py |
4 |
|
(ThubanApplication.run_db_param_dialog): New. Suitable as a |
5 |
|
db_connection_callback. Main difference is that the dialog run |
6 |
|
from this method doesn't have a parent so it can be used even when |
7 |
|
there is no main window |
8 |
|
(ThubanApplication.OpenSession): Use self.run_db_param_dialog if |
9 |
|
no db_connection_callback was given. This way the dialog pops up |
10 |
|
even when the .thuban file was given as a command line parameter. |
11 |
|
|
12 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
13 |
|
|
14 |
|
* Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse |
15 |
|
before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs |
16 |
|
which leads to an effectively frozen X session because the user |
17 |
|
can only interact with the dialog but the mouse is still grabbed |
18 |
|
by the canvas. |
19 |
|
Also, call the tool's Hide method before MouseLeftUp because |
20 |
|
MouseLeftUp may change the tool's coordinates. |
21 |
|
|
22 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
23 |
|
|
24 |
|
* Thuban/UI/application.py (ThubanApplication.OpenSession): Catch |
25 |
|
LoadCancelled exceptions and handle them by returning immediately. |
26 |
|
|
27 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
28 |
|
|
29 |
|
GUI part of loading sessions with postgis connections which may |
30 |
|
require user interaction to get passwords or updated parameters |
31 |
|
|
32 |
|
* Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a |
33 |
|
bit nucer and be more generic. |
34 |
|
(DBFrame.OnAdd): Adapt to new DBDialog interface |
35 |
|
|
36 |
|
* Thuban/UI/application.py (ThubanApplication.OpenSession): New |
37 |
|
optional parameter db_connection_callback which is passed to |
38 |
|
load_session. |
39 |
|
|
40 |
|
* Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New. |
41 |
|
Suitable as a db_connection_callback |
42 |
|
(MainWindow.OpenSession): Use self.run_db_param_dialog as the |
43 |
|
db_connection_callback of the application's OpenSession method |
44 |
|
|
45 |
|
|
46 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
47 |
|
|
48 |
|
Basic loading of sessions containing postgis connections: |
49 |
|
|
50 |
|
* Thuban/Model/load.py (LoadError): Add doc-string |
51 |
|
(LoadCancelled): New exception class to indicate a cancelled load |
52 |
|
(SessionLoader.__init__): Add the db_connection_callback parameter |
53 |
|
which will be used by the loader to get updated parameters and a |
54 |
|
password for a database connection |
55 |
|
(SessionLoader.__init__): Add the new XML elements to the |
56 |
|
dispatchers dictionary |
57 |
|
(SessionLoader.check_attrs): Two new conversions, ascii to convert |
58 |
|
to a byte-string object and idref as a generic id reference |
59 |
|
(SessionLoader.start_dbconnection) |
60 |
|
(SessionLoader.start_dbshapesource): New. Handlers for the new XML |
61 |
|
elements |
62 |
|
(load_session): Add the db_connection_callback to pass through the |
63 |
|
SessionLoader |
64 |
|
|
65 |
|
* test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword): |
66 |
|
New classes to test loading of sessions with postgis database |
67 |
|
connections. |
68 |
|
|
69 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
70 |
|
|
71 |
|
* Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and |
72 |
|
replace it and the comment with __BuildDate__ by the Source: and |
73 |
|
Id: cvs keywords as used in the other files. |
74 |
|
|
75 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
76 |
|
|
77 |
|
* Thuban/Model/load.py (SessionLoader.check_attrs): Raise a |
78 |
|
LoadError when a required attribute is missing. The code used to |
79 |
|
be commented out for some reason, but probably should have been |
80 |
|
active. |
81 |
|
|
82 |
|
* test/test_load.py (TestLoadError.test): Test the message in the |
83 |
|
LoadError too to make sure it really is about the missing |
84 |
|
attribute |
85 |
|
|
86 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
87 |
|
|
88 |
|
* test/test_save.py (SaveSessionTest.test_dbf_table) |
89 |
|
(SaveSessionTest.test_joined_table): Add XML validation tests. |
90 |
|
|
91 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
92 |
|
|
93 |
|
Implement saving a session with a postgis connection |
94 |
|
|
95 |
|
* Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New |
96 |
|
elements for database connections and shapestores using db |
97 |
|
connections |
98 |
|
(session): Add the dbconnections to the content model |
99 |
|
|
100 |
|
* Thuban/Model/save.py (SessionSaver.write_db_connections): New. |
101 |
|
Write the db connections |
102 |
|
(SessionSaver.write_session): Call write_db_connections to write |
103 |
|
the connection before the data sources |
104 |
|
(SessionSaver.write_data_containers): Handle postgis shapestores |
105 |
|
|
106 |
|
* test/test_save.py (SaveSessionTest.thubanids) |
107 |
|
(SaveSessionTest.thubanidrefs): Update for new DTD |
108 |
|
(SaveSessionTest.test_save_postgis): New. Test saving a session |
109 |
|
with postgis connections |
110 |
|
|
111 |
|
* Thuban/Model/postgisdb.py (PostGISTable.DBConnection) |
112 |
|
(PostGISTable.TableName): New accessor methods for the connection |
113 |
|
and table name |
114 |
|
|
115 |
|
* test/test_postgis_db.py (TestPostGISTable.test_dbconn) |
116 |
|
(TestPostGISTable.test_dbname): New methods to test the new |
117 |
|
PostGISConnection methods |
118 |
|
|
119 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
120 |
|
|
121 |
|
* Thuban/Model/postgisdb.py (ConnectionError): New exception class |
122 |
|
for exceptions occurring when establishing a Database connection |
123 |
|
(PostGISConnection.connect): Catch psycopg.OperationalError during |
124 |
|
connects and raise ConnectionError. |
125 |
|
|
126 |
|
* test/test_postgis_db.py (TestPostgisDBExceptions): New class for |
127 |
|
tests for database exceptions |
128 |
|
|
129 |
2003-08-22 Bernhard Herzog <[email protected]> |
2003-08-22 Bernhard Herzog <[email protected]> |
130 |
|
|
131 |
Prepare the test suite for tests with required authentication |
Prepare the test suite for tests with required authentication |