Re: Dynamic menus question



On Fri, 2006-09-08 at 23:10 -0400, Christian Convey wrote:
> I'm using pygtk.  My top-level menubar has a menuitem named "Scripts".
>  Each time user clicks on "Scripts", I want a chance to update the
> Scripts menuitem's submenu content before it's shown to the user. That
> way the submenu's content will alway be up-to-date when it's presented
> to the user.
> 
> I'm having trouble identifying the widget,signal combination that
> triggers (a) sometime after the user clicks on "Scripts" in the menu
> bar, but (b) before it's too late to modify the content the Script
> menuitem's submenu.
> 
> And idea what signal/widget I should attach the code to that does the update?

i use the map signal of the menu for this precise purpose. i rebuild the
menu from the handler, then return false.

--p





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]