Dynamic menu with UIManager



I'm porting an application from GTKmm2.0 to GTKMM2.6 (on Debian 3.1 - Sarge).

In my application I have multiple edit windows and implemented a "Windows" menu listing all the windows opened and allowing to jump to each.

With GTKmm 2.0 I connected an handler to the menu show event with the call:

menu_finestre->signal_show().connect(SigC::slot(*this,&Pcmon::m_show));

In the m_show handler I empty the menu and refill it with all the windows.

I tried to rproduce the same behaviour with UIManager, introducing a Windows menu in the xml string, getting an handler of the menu, connecting the siganl and so on, but it didn't work.

What is the right method to build this kind of "windows" menu on the fly every time the menu is openede from the menubar?

Thank you
	Stefano Salvi



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