changeset 6dc9de7777ad in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=6dc9de7777ad description: don't print reason where there is none
diffstat:
src/gui_interface.py | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
diffs (21 lines):
diff -r ea8a9217a662 -r 6dc9de7777ad src/gui_interface.py --- a/src/gui_interface.py Fri Aug 24 20:13:25 2012 -0400 +++ b/src/gui_interface.py Sat Aug 25 11:32:14 2012 +0200 @@ -619,9 +619,14 @@ account = obj.conn.name gc_control = self.msg_win_mgr.get_gc_control(obj.room_jid, account) if gc_control: - gc_control.print_conversation( - _('%(jid)s declined the invitation: %(reason)s') % { - 'jid': obj.jid_from, 'reason': obj.reason}, graphics=False) + if obj.reason: + gc_control.print_conversation( + _('%(jid)s declined the invitation: %(reason)s') % { + 'jid': obj.jid_from, 'reason': obj.reason}, graphics=False) + else: + gc_control.print_conversation( + _('%(jid)s declined the invitation') % { + 'jid': obj.jid_from}, graphics=False)
def handle_event_gc_invitation(self, obj): #('GC_INVITATION', (room_jid, jid_from, reason, password, is_continued))