Browse Source

Delete now removes the message from the list after success

master
Julio Biason 15 years ago
parent
commit
94367b3fc9
  1. 12
      mitterlib/ui/ui_pygtk.py

12
mitterlib/ui/ui_pygtk.py

@ -767,7 +767,8 @@ class Interface(object):
error_dialog.run()
error_dialog.destroy()
return
self._delete_iter = iter
_log.debug('Deleting messing %d', message.id)
self._threads.add_work(self._post_delete_message,
self._exception_delete_message,
@ -850,6 +851,9 @@ class Interface(object):
def _post_delete_message(self, widget, data):
"""Called when the message is deleted successfully."""
_log.debug('Message deleted.')
if self._delete_iter:
self._grid.get_model().remove(self._delete_iter)
self._delete_iter = None
return
def _exception_delete_message(self, widget, exception):
@ -887,6 +891,12 @@ class Interface(object):
self._default_pixmap = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,
has_alpha=False, bits_per_sample=8, width=48, height=48)
# This is the ugly bit for speeding up things and making
# interthread communication.
self._delete_iter = None
self._reply_message = None
self._repost_message = None
return
def __call__(self):

Loading…
Cancel
Save