|
|
|
@ -640,11 +640,11 @@ class Interface(object):
|
|
|
|
|
self._reply_label.set_text('') |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
def _url_popup(self, path, event): |
|
|
|
|
def _url_popup(self, widget, path, event): |
|
|
|
|
"""Builds the popup with URLs in the cell pointed by *path*. Requires |
|
|
|
|
the *event* that the widget received.""" |
|
|
|
|
iter = self._grid.get_model().get_iter(path) |
|
|
|
|
message = self._grid.get_model().get_value(iter, 0) |
|
|
|
|
iter = widget.get_model().get_iter(path) |
|
|
|
|
message = widget.get_model().get_value(iter, 0) |
|
|
|
|
|
|
|
|
|
popup = gtk.Menu() |
|
|
|
|
|
|
|
|
@ -952,22 +952,22 @@ class Interface(object):
|
|
|
|
|
# not right click |
|
|
|
|
return False |
|
|
|
|
|
|
|
|
|
path = self._grid.get_path_at_pos(event.x, event.y) |
|
|
|
|
path = widget.get_path_at_pos(event.x, event.y) |
|
|
|
|
if not path: |
|
|
|
|
return False |
|
|
|
|
|
|
|
|
|
(path, _, _, _) = path |
|
|
|
|
return self._url_popup(path, event) |
|
|
|
|
return self._url_popup(widget, path, event) |
|
|
|
|
return True |
|
|
|
|
|
|
|
|
|
def _message_popup(self, widget, event, user_data=None): |
|
|
|
|
"""Builds the popup with the URLs in the message.""" |
|
|
|
|
_log.debug('Popup') |
|
|
|
|
(path, _) = self._grid.get_cursor() |
|
|
|
|
(path, _) = widget.get_cursor() |
|
|
|
|
if not path: |
|
|
|
|
return True |
|
|
|
|
|
|
|
|
|
return self._url_popup(path, event) |
|
|
|
|
return self._url_popup(widget, path, event) |
|
|
|
|
|
|
|
|
|
def _open_url(self, widget, user_data=None): |
|
|
|
|
"""Opens an URL (used mostly from popup menu items.)""" |
|
|
|
@ -976,12 +976,12 @@ class Interface(object):
|
|
|
|
|
|
|
|
|
|
def _mark_message_read(self, widget, user_data=None): |
|
|
|
|
"""Mark a message as read when it's selected.""" |
|
|
|
|
(path, _) = self._grid.get_cursor() |
|
|
|
|
(path, _) = widget.get_cursor() |
|
|
|
|
if not path: |
|
|
|
|
return True |
|
|
|
|
|
|
|
|
|
iter = self._grid.get_model().get_iter(path) |
|
|
|
|
message = self._grid.get_model().get_value(iter, 0) |
|
|
|
|
iter = widget.get_model().get_iter(path) |
|
|
|
|
message = widget.get_model().get_value(iter, 0) |
|
|
|
|
|
|
|
|
|
if message.read: |
|
|
|
|
return True |
|
|
|
|