extensions/experimental menu
Martin Schulze
joey at infodrom.org
Sun May 2 14:33:19 CEST 2004
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.
Regards,
Joey
--
Still can't talk about what I can't talk about. Sorry. -- Bruce Schneier
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)