'Shows a menu when you right click on a URL in the treeview.
:param tv: the treeview.
:param event: The GTK event'

def popup_menu(self, tv, event):

    if (event.button != 3):
        return
    (path, column) = tv.get_cursor()
    if (path is None):
        return
    fullurl = '/'.join((self.treestore[path[:(i + 1)]][0] for i in range(len(path))))
    host = urllib2.urlparse.urlparse(fullurl)[1]
    sendtext = (HEAD_TO_SEND % (fullurl, host))
    gm = gtk.Menu()
    e = gtk.ImageMenuItem(_('Open    with    Manual    Request    Editor...'))
    image = gtk.Image()
    image.set_from_stock(gtk.STOCK_INDEX, gtk.ICON_SIZE_MENU)
    e.set_image(image)
    e.connect('activate', self._send_request, sendtext, ManualRequests)
    gm.append(e)
    image = gtk.Image()
    image.set_from_stock(gtk.STOCK_PROPERTIES, gtk.ICON_SIZE_MENU)
    e = gtk.ImageMenuItem(_('Open    with    Fuzzy    Request    Editor...'))
    e.set_image(image)
    e.connect('activate', self._send_request, sendtext, FuzzyRequests)
    gm.append(e)
    e = gtk.ImageMenuItem(_('Open    with    default    browser...'))
    e.connect('activate', self._open_browser, fullurl)
    gm.append(e)
    gm.show_all()
    gm.popup(None, None, None, event.button, event.time)
