From 205da23b89649beca7f5d1cb72d8353e8a6f79ad Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 26 Aug 2012 22:34:29 +0200 Subject: [PATCH] don't close send single message if there was an error sending the message. Fixes #7187 --- src/dialogs.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dialogs.py b/src/dialogs.py index d08616398..2128ed738 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -3112,7 +3112,7 @@ class SingleMessageWindow: # if offline or connecting ErrorDialog(_('Connection not available'), _('Please make sure you are connected with "%s".') % self.account) - return + return True if isinstance(self.to, list): sender_list = [] for i in self.to: @@ -3132,7 +3132,7 @@ class SingleMessageWindow: ErrorDialog(_('Invalid Jabber ID'), _('It is not possible to send a message to %s, this JID is not ' 'valid.') % to_whom_jid) - return + return True subject = self.subject_entry.get_text().decode('utf-8') begin, end = self.message_tv_buffer.get_bounds() @@ -3176,7 +3176,8 @@ class SingleMessageWindow: session=self.session) def on_send_and_close_button_clicked(self, widget): - self.send_single_message() + if self.send_single_message(): + return self.save_pos() self.window.destroy()