/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/menu.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/menu.py

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

revision 2201 by jan, Tue May 27 13:11:18 2003 UTC revision 2202 by jan, Tue May 11 21:39:39 2004 UTC
# Line 126  class Menu: Line 126  class Menu:
126          self.InsertItem(newmenu, menu = menu, after = after)          self.InsertItem(newmenu, menu = menu, after = after)
127          return newmenu          return newmenu
128    
129        def FindOrInsertMenu(self, name, title, menu = (), after = None):
130            """
131            Find the menu with the specified name. If found, return it.
132            Else insert the menu as specified and return it.
133    
134            Parameters: See InsertMenu().
135            """
136    
137            m = self.find_menu(name)
138            if m is None:
139                m = self.InsertMenu(name, title, menu, after)
140            return m
141    
142    
143      def SetItems(self, items):      def SetItems(self, items):
144          """Replace the contents of the menu by items."""          """Replace the contents of the menu by items."""
145          self.items = items          self.items = items

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26