jan: thuban/Extensions/gns2shp gns2shp.py,1.1,1.2
cvs@intevation.de
cvs at intevation.de
Wed May 12 00:34:51 CEST 2004
Author: jan
Update of /thubanrepository/thuban/Extensions/gns2shp
In directory doto:/tmp/cvs-serv30058/gns2shp
Modified Files:
gns2shp.py
Log Message:
Use FindOrInsertMenu() instead of finding menu on its own.
Index: gns2shp.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/gns2shp/gns2shp.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- gns2shp.py 22 Sep 2003 10:32:04 -0000 1.1
+++ gns2shp.py 11 May 2004 22:34:49 -0000 1.2
@@ -18,6 +18,8 @@
"""
__version__ = '$Revision$'
+# $Source$
+# $Id$
import os, sys
@@ -26,7 +28,7 @@
from wxPython.wx import *
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
@@ -176,10 +178,7 @@
helptext = _('Convert GNS-file into a shapefile')))
# find the extensions menu (create it anew if not found)
-main_menu = Thuban.UI.mainwindow.main_menu
-extensions_menu = main_menu.find_menu('extensions')
-if extensions_menu is None:
- extensions_menu = main_menu.InsertMenu('extensions', _('E&xtensions'))
+extensions_menu = main_menu.FindOrInsertMenu('extensions', _('E&xtensions'))
# finally add the new entry to the extensions menu
extensions_menu.InsertItem('gns2shp')
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)