View Single Post
Bundyo's Avatar
Posts: 4,708 | Thanked: 4,649 times | Joined on Oct 2007 @ Bulgaria
#244
Originally Posted by daperl View Post
I haven't looked at your latest code yet, but here's a Python right-button-click solution that you should translate 'cause links and images are detected:
Code:
class BrowserPage(webkit.WebView):
    def __init__(self, ...
        ...
        self.connect("button-press-event", self.on_button_press)
        ...
        try:
            self.connect("tap-and-hold", self.on_tap_and_hold)
            self.tap_and_hold_setup(None, None, 0)
        except:
            self.maemo = False
        ...
    ...
    def on_button_press(self, view, event):
        self._event = event.copy()
        ...
    ...
    def on_tap_and_hold(self, menu, widget=None, data=None):
        self.menudown = True
        self._event.button = 3
        gtk.main_do_event(self._event)
That should do quite nicely i think No need for the hack too.
__________________
Technically, there are three determinate states the cat could be in: Alive, Dead, and Bloody Furious.