My 2 Cents:
1) What do you want to do on the button 2 click?
The reason why I ask this is that most of us have probably become accustomed
to what happens when we right click on an applet, we get the standard applet
menu plus any menu items the developer wanted to add to it. I know that If I
wanted to adjust the properties on an applet that I can right click on it and
select properties (a common menu item that is added by most developers). I know
that if I right click on the applet that I can choose to move the applet (if
I do not have a three button mouse or emulate three buttons enabled, this is
useful). I also know that when I right click on an applet I can remove it from
the panel. So I guess you need to ask yourself....
2) Does right clicking add enough extra value to the applet that the expected
right click action (bring up a menu) is missing or not the same?
Hrvoje Niksic wrote:
> [ Has this response reached the list? I've sent it once, but I don't
> see it in my inbox. Sorry if you're reading this twice. ]
>
> James Henstridge <[EMAIL PROTECTED]> writes:
>
> > >From what I remember, the button press events are redirected to the panel
> > when you add the widget to the applet with AppletWidget.add(). I think if
> > you do something like:
> > a = AppletWidget('something')
> > box = GtkVBox()
> > a.add(box) # box's events get redirected to panel
> > widget = GtkSomething()
> > box.pack_start(widget) # widget's events do not get redirected
>
> Does that actually work for you? I have slightly different code that
> looks like this:
>
> class DropHole(gnome.applet.AppletWidget):
> def __init__(self):
> gnome.applet.AppletWidget.__init__(self)
> [...]
> dnd_victim = gtk.GtkEventBox()
> [...]
> dnd_victim.set_events(GDK.BUTTON_PRESS_MASK)
> dnd_victim.connect("button_press_event", self.mouse_click)
> self.add(dnd_victim)
>
> And self.mouse_click() still doesn't get called for button2. In fact,
> it does when I click on it several times in succession. :-(
>
> Any other thoughts?
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]