From d3458a25fb2f524be86d57bc35ff71a5b3d62d45 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Thu, 8 Apr 2010 12:01:26 -0300 Subject: [PATCH] Abort also in case of empty replies. --- mitterlib/ui/ui_pygtk.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mitterlib/ui/ui_pygtk.py b/mitterlib/ui/ui_pygtk.py index cd42c80..edaa06c 100644 --- a/mitterlib/ui/ui_pygtk.py +++ b/mitterlib/ui/ui_pygtk.py @@ -487,9 +487,19 @@ class Interface(object): status = self._update_field.text.strip() if not status: + _log.debug('Empty message, aborting.') self._update_field.hide() return + page = self._main_tabs.get_current_page() + child = self._main_tabs.get_nth_page(page) + if child.selected: + if child.selected.reply_prefix.strip() == status: + _log.debug('Empty reply, aborting.') + self._udpate_field.hide() + return + + _log.debug('Status: %s', status) self._update_statusbar(_('Sending update...'))