jan: thuban/Extensions/importAPR importAPR.py,1.3,1.4

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


Author: jan

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

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


Index: importAPR.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/importAPR/importAPR.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- importAPR.py	30 Oct 2003 09:16:46 -0000	1.3
+++ importAPR.py	11 May 2004 22:34:49 -0000	1.4
@@ -11,6 +11,8 @@
 """
 
 __version__ = "$Revision$"
+# $Source$
+# $Id$
 
 import os, sys
 
@@ -21,7 +23,7 @@
 from Thuban.Model.extension import Extension
 from Thuban.Model.base import TitledObject, Modifiable
 from Thuban.UI.command import registry, Command
-import Thuban.UI.mainwindow
+from Thuban.UI.mainwindow import main_menu
 from Thuban import _
 from Thuban.Model.layer import Layer
 from Thuban.Model.classification import ClassGroupRange, ClassGroupSingleton
@@ -322,10 +324,8 @@
                          helptext = _('Import a ArcView project file')))
 
 # 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('import-apr')





More information about the Thuban-devel mailing list

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