Ángel Alonso | 20 Nov 13:19

Re: Help with gtk.Menu.popup

Thanks for your help.

My problem is this:

self.icon = gtk.status_icon_new_from_stock(gtk.STOCK_REFRESH)
self.icon.connect('popup-menu', self.onRightClick)
self.icon.connect('activate', self.onLeftClick)

In onRightClick function the signal 'popup-menu' has activate_time param
but in onLeftClick function the signal 'activate' has not it.

http://www.pygtk.org/docs/pygtk/class-gtkstatusicon.html

I want to open a menu in a status_icon with the left button of my mouse.

Thanks.

El jue, 20-11-2008 a las 11:45 +0000, Pádraig Brady escribió:
> Ángel Alonso wrote:
> > Hi, i need help with this function:
> > 
> > http://www.pygtk.org/docs/pygtk/class-gtkmenu.html#method-gtkmenu--popup
> > 
> > I need the activate_time but i need to get this param.
> > 
> > Thanks and sorry about my english
> 
> If you specify the activate_time as 0 then the
> popup menu will disappear immediately on a right click being
> released for example. Usually you want the menu to remain
(Continue reading)

Pádraig Brady | 20 Nov 13:38

Re: Help with gtk.Menu.popup

Ángel Alonso wrote:
> Thanks for your help.
> 
> My problem is this:
> 
> self.icon = gtk.status_icon_new_from_stock(gtk.STOCK_REFRESH)
> self.icon.connect('popup-menu', self.onRightClick)
> self.icon.connect('activate', self.onLeftClick)
> 
> In onRightClick function the signal 'popup-menu' has activate_time param
> but in onLeftClick function the signal 'activate' has not it.

That usage is also shown in my example. Just pass 0 for this case

_______________________________________________
pygtk mailing list   pygtk <at> daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Gmane