Browse Source

generate a syntetic event on popup-menu

master
Julio Biason 15 years ago
parent
commit
5556085a70
  1. 5
      mitterlib/ui/ui_pygtk.py

5
mitterlib/ui/ui_pygtk.py

@ -29,6 +29,7 @@ import re
import urllib2 import urllib2
import webbrowser import webbrowser
import gettext import gettext
import time
from cgi import escape as html_escape from cgi import escape as html_escape
@ -1133,7 +1134,6 @@ class Interface(object):
(path, _, _, _) = path (path, _, _, _) = path
return self._url_popup(widget, path, event) return self._url_popup(widget, path, event)
return True
def _message_popup(self, widget, user_data=None): def _message_popup(self, widget, user_data=None):
"""Builds the popup with the URLs in the message.""" """Builds the popup with the URLs in the message."""
@ -1142,6 +1142,9 @@ class Interface(object):
if not path: if not path:
return True return True
# create a syntetic event (the popup requires one)
event = gtk.gdk.Event(gtk.gdk.BUTTON_PRESS)
event.button = 3
return self._url_popup(widget, path, event) return self._url_popup(widget, path, event)
def _open_url(self, widget, user_data=None): def _open_url(self, widget, user_data=None):

Loading…
Cancel
Save