/[thuban]/trunk/thuban/Extensions/gns2shp/gns2shp.py
ViewVC logotype

Diff of /trunk/thuban/Extensions/gns2shp/gns2shp.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2202 by jan, Mon Sep 22 10:32:04 2003 UTC revision 2203 by jan, Tue May 11 22:34:49 2004 UTC
# Line 18  of some country files. Line 18  of some country files.
18  """  """
19    
20  __version__ = '$Revision$'  __version__ = '$Revision$'
21    # $Source$
22    # $Id$
23    
24  import os, sys  import os, sys
25    
# Line 26  if __name__ != '__main__': Line 28  if __name__ != '__main__':
28      from wxPython.wx import *      from wxPython.wx import *
29    
30      from Thuban.UI.command import registry, Command      from Thuban.UI.command import registry, Command
31      import Thuban.UI.mainwindow      from Thuban.UI.mainwindow import main_menu
32      from Thuban import _      from Thuban import _
33      from Thuban.Model.layer import Layer      from Thuban.Model.layer import Layer
34    
# Line 176  registry.Add(Command('gns2shp', _('gns2s Line 178  registry.Add(Command('gns2shp', _('gns2s
178                       helptext = _('Convert GNS-file into a shapefile')))                       helptext = _('Convert GNS-file into a shapefile')))
179    
180  # find the extensions menu (create it anew if not found)  # find the extensions menu (create it anew if not found)
181  main_menu = Thuban.UI.mainwindow.main_menu  extensions_menu = main_menu.FindOrInsertMenu('extensions', _('E&xtensions'))
 extensions_menu = main_menu.find_menu('extensions')  
 if extensions_menu is None:  
     extensions_menu = main_menu.InsertMenu('extensions', _('E&xtensions'))  
182    
183  # finally add the new entry to the extensions menu  # finally add the new entry to the extensions menu
184  extensions_menu.InsertItem('gns2shp')  extensions_menu.InsertItem('gns2shp')

Legend:
Removed from v.2202  
changed lines
  Added in v.2203

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26