> Have you tried container.emit() instead of propagate_event? I think
> there's a good chance of it working.

Thanks, that seems to help. The right-clicks now drop through to the
underlying panel and manage to bring up the menu (and make it go away again).
I haven't figured out how to send button2 through (to invoke the drag-applet
stuff), but I figure I'll probably have to look more deeply into gnome-panel
to figure out what events it wants to receive that the GtkButton is
consuming.

I still wish I knew why this stopped working in Gnome2. I'm pretty sure it
was easier to use back in Gnome1.

For reference, here's the pair of helper functions I ended up using. Just use
MyButton() whereever you'd use gtk.Button(), and mouse2/3 press/release
events will be sent up to the Button's container:

def button_hack_helper(widget, event, updown):
    if event.button != 1:
        if updown == "press":
            widget.parent.emit("button_press_event", event)
        else:
            widget.parent.emit("button_release_event", event)
        return gtk.TRUE
    return gtk.FALSE

def MyButton():
    b = gtk.Button()
    b.connect('button_press_event', button_hack_helper, "press")
    b.connect('button_release_event', button_hack_helper, "release")
    return b


thanks for the help,
 -Brian
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to