/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/messages.py
ViewVC logotype

Annotation of /branches/WIP-pyshapelib-bramz/Thuban/UI/messages.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1464 - (hide annotations)
Fri Jul 18 18:20:40 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/messages.py
File MIME type: text/x-python
File size: 923 byte(s)
* 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    

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26