jan: thuban/Extensions/wms wms.py,1.8,1.9

cvs@intevation.de cvs at intevation.de
Wed May 12 00:34:52 CEST 2004


Author: jan

Update of /thubanrepository/thuban/Extensions/wms
In directory doto:/tmp/cvs-serv30058/wms

Modified Files:
	wms.py 
Log Message:
Use FindOrInsertMenu() instead of finding menu on its own.


Index: wms.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/wms/wms.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- wms.py	15 Apr 2004 07:14:25 -0000	1.8
+++ wms.py	11 May 2004 22:34:49 -0000	1.9
@@ -16,6 +16,8 @@
 """
 
 __version__ = "$Revision$"
+# $Source$
+# $Id$
 
 import os, sys
 import xml.dom.minidom
@@ -26,7 +28,7 @@
 from Thuban.Model.proj import Projection
 from Thuban.Model.extension import Extension
 from Thuban.UI.command import registry, Command
-import Thuban.UI.mainwindow
+from Thuban.UI.mainwindow import main_menu
 from Thuban import _
 import Thuban.UI.baserenderer
 
@@ -143,10 +145,8 @@
                          helptext = _('Add a WMS Layer')))
 
 # find the experimental menu (create it anew if not found)
-main_menu = Thuban.UI.mainwindow.main_menu
-experimental_menu = main_menu.find_menu('experimental')
-if experimental_menu is None:
-    experimental_menu = main_menu.InsertMenu('experimental', _('Experimenta&l'))
+experimental_menu = main_menu.FindOrInsertMenu('experimental',
+                                               _('Experimenta&l'))
 
 # finally add the new entry to the experimental menu
 experimental_menu.InsertItem('wms')





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)