/[thuban]/branches/WIP-pyshapelib-bramz/Extensions/drawshape/drawshape.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Extensions/drawshape/drawshape.py

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

revision 1974 by bh, Tue Nov 25 14:05:35 2003 UTC revision 2207 by jan, Sun May 16 09:30:34 2004 UTC
# Line 23  import os Line 23  import os
23  from wxPython.wx import *  from wxPython.wx import *
24    
25  import shapelib  import shapelib
26    import Thuban
27    from Thuban import _
28  from Thuban.Model.data import SHAPETYPE_POLYGON  from Thuban.Model.data import SHAPETYPE_POLYGON
29  from Thuban.Model.table import FIELDTYPE_INT, FIELDTYPE_STRING, \  from Thuban.Model.table import FIELDTYPE_INT, FIELDTYPE_STRING, \
30       FIELDTYPE_DOUBLE       FIELDTYPE_DOUBLE
31  from Thuban.UI.command import registry, ToolCommand  from Thuban.UI.command import registry, ToolCommand
32  import Thuban.UI.mainwindow  from Thuban.UI.mainwindow import main_menu, main_toolbar
33  from Thuban.UI.viewport import Tool  from Thuban.UI.viewport import Tool
34    
35    
# Line 142  registry.Add(ToolCommand("shape_draw_too Line 144  registry.Add(ToolCommand("shape_draw_too
144                           checked = check_shape_draw_tool))                           checked = check_shape_draw_tool))
145    
146  # Add the command to the toolbar  # Add the command to the toolbar
147  Thuban.UI.mainwindow.main_toolbar.InsertSeparator()  main_toolbar.InsertSeparator()
148  Thuban.UI.mainwindow.main_toolbar.InsertItem("shape_draw_tool")  main_toolbar.InsertItem("shape_draw_tool")
149    
150    # find the experimental menu (create it anew if not found)
151    experimental_menu = main_menu.FindOrInsertMenu('experimental',
152                                                   _('Experimenta&l'))
153    
154    # finally add the new command to the experimental menu
155    experimental_menu.InsertItem('shape_draw_tool')

Legend:
Removed from v.1974  
changed lines
  Added in v.2207

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26