Parent Directory
|
Revision Log
* Thuban/UI/messages.py (MAP_REPLACED): New message. * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED after the new map has been assigned * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Delegate MAP_REPLACED to the canvas too (MainWindow.prepare_new_session): Removed. Thanks to the new MAP_REPLACED message it's no longer needed (MainWindow.OpenSession, MainWindow.NewSession): prepare_new_session has been removed. * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to MAP_REPLACED so that we can close the dialog if a new map is set. (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED (Classifier.map_replaced): Handle MAP_REPLACED by closing the dialog * test/test_viewport.py (SimpleViewPortTest) (SimpleViewPortTest.test_default_size): Add doc-strings (ViewPortTest.setUp): Bind map to self.map so we can use it in tests. Subscribe to MAP_REPLACED messages too. (ViewPortTest.tearDown): No need to explicitly unsubscribe (ViewPortTest.test_set_map): New test for the SetMap method.
1 | bh | 535 | # Copyright (c) 2001, 2002, 2003 by Intevation GmbH |
2 | bh | 6 | # Authors: |
3 | # Bernhard Herzog <[email protected]> | ||
4 | # | ||
5 | # This program is free software under the GPL (>=v2) | ||
6 | # Read the file COPYING coming with Thuban for details. | ||
7 | |||
8 | |||
9 | """ | ||
10 | Define the message types used in Thuban's GUI. The messages types are | ||
11 | simply strings. The message system itself is implemented in | ||
12 | Thuban.Lib.connector. | ||
13 | """ | ||
14 | |||
15 | __version__ = "$Revision$" | ||
16 | |||
17 | # Application object | ||
18 | jonathan | 503 | SESSION_REPLACED = "SESSION_REPLACED" |
19 | bh | 6 | |
20 | bh | 535 | # events for the selection |
21 | LAYER_SELECTED = "LAYER_SELECTED" | ||
22 | SHAPES_SELECTED = "SHAPES_SELECTED" | ||
23 | # obsolete selection messages. | ||
24 | SELECTED_SHAPE = "SELECTED_SHAPE" | ||
25 | bh | 6 | SELECTED_LAYER = "SELECTED_LAYER" |
26 | |||
27 | bh | 121 | # events for the view |
28 | VIEW_POSITION = "VIEW_POSITION" | ||
29 | frank | 856 | SCALE_CHANGED = "SCALE_CHANGED" |
30 | bh | 1464 | MAP_REPLACED = "MAP_REPLACED" |
31 | jonathan | 564 | |
32 | # event for a dockable window | ||
33 | DOCKABLE_DOCKED = "DOCKABLE_DOCKED" | ||
34 | DOCKABLE_UNDOCKED = "DOCKABLE_UNDOCKED" | ||
35 | DOCKABLE_CLOSED = "DOCKABLE_CLOSED" | ||
36 |
Name | Value |
---|---|
svn:eol-style | native |
svn:keywords | Author Date Id Revision |
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |