1 |
# Copyright (C) 2003 by Intevation GmbH |
# Copyright (C) 2003, 2004 by Intevation GmbH |
2 |
# Authors: |
# Authors: |
3 |
# Jan-Oliver Wagner <[email protected]> |
# Jan-Oliver Wagner <[email protected]> (2003, 2004) |
4 |
# |
# |
5 |
# This program is free software under the GPL (>=v2) |
# This program is free software under the GPL (>=v2) |
6 |
# Read the file COPYING coming with Thuban for details. |
# Read the file COPYING coming with Thuban for details. |
18 |
""" |
""" |
19 |
|
|
20 |
__version__ = '$Revision$' |
__version__ = '$Revision$' |
21 |
|
# $Source$ |
22 |
|
# $Id$ |
23 |
|
|
24 |
import os, sys |
import os, sys |
25 |
|
|
26 |
# only import GUI when not called as command line tool |
# only import GUI and register when not called as command line tool |
27 |
if __name__ != '__main__': |
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 |
|
|
77 |
dbf.add_field('SORT_NAME', dbflib.FTString, 40, 0) |
dbf.add_field('SORT_NAME', dbflib.FTString, 40, 0) |
78 |
dbf.add_field('FULL_NAME', dbflib.FTString, 40, 0) |
dbf.add_field('FULL_NAME', dbflib.FTString, 40, 0) |
79 |
dbf.add_field('FULL_ND', dbflib.FTString, 40, 0) |
dbf.add_field('FULL_ND', dbflib.FTString, 40, 0) |
80 |
dbf.add_field('MODIFY_DATE', dbflib.FTString, 10, 0) |
dbf.add_field('MODIFY_DATE', dbflib.FTString, 11, 0) |
81 |
del dbf |
del dbf |
82 |
dbf = dbflib.open(dbf_filename, 'r+b') |
dbf = dbflib.open(dbf_filename, 'r+b') |
83 |
|
|
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') |