[Thuban-devel] Re: extensions/experimental menu

Jan-Oliver Wagner jan at intevation.de
Mon May 3 22:29:42 CEST 2004


On Sun, May 02, 2004 at 02:33:19PM +0200, Martin Schulze wrote:
> Jan-Oliver Wagner wrote:
> > On Thu, Apr 22, 2004 at 07:27:10PM +0200, Bernhard Herzog wrote:
> > > > # find the extensions menu (create it anew if not found)
> > > > extensions_menu = main_menu.find_menu('extensions')
> > > > if extensions_menu is None:
> > > >     extensions_menu = main_menu.InsertMenu('extensions', _('E&xtensions'))
> > > 
> > > We should add a function to Thuban.UI.mainwindow that returns the
> > > extensions menu after creating it if it doesn't exist yet.  This code
> > > has been duplicated in at least 5 extensions.
> > 
> > AFAIKS, we have another option:
> > 
> > Add a method FindOrInsert() for class Menu of Thuban.UI.menu 
> > which either finds and returns the menu or it creates it if not
> > found and then returns the newly created one.
> > 
> > What do you think of this?
> 
> Both sound good, imho.

if noone objects, I will prepare a patch for this.

	Jan

-- 
Jan-Oliver Wagner               http://intevation.de/~jan/

Intevation GmbH	              	     http://intevation.de/
FreeGIS	                               http://freegis.org/




More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)