View Single Post
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#241
Originally Posted by Bundyo View Post
  • Popup menu changed to use the internal WebKit one. Since it is an ugly hack it doesn't detect links and images under the cursor. Works better for selections and input elements
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)
__________________
N9: Go white or go home

Last edited by daperl; 2009-03-01 at 21:30.
 

The Following 2 Users Say Thank You to daperl For This Useful Post: