prevent TB in completion list

This commit is contained in:
Dimitur Kirov 2006-07-03 06:52:25 +00:00
parent 88cf8b5c84
commit f1d2380cac
1 changed files with 9 additions and 0 deletions

View File

@ -1081,6 +1081,15 @@ class NewChatDialog(InputDialog):
if self.completion_dict.has_key(jid):
jid = self.completion_dict[jid].jid
else:
try:
jid = helpers.parse_jid(jid)
except helpers.InvalidFormat, e:
ErrorDialog(_('Invalid JID'), e[0])
return
except:
ErrorDialog(_('Invalid JID'), _('Unable to parse "%s".' % jid))
return
gajim.interface.roster.new_chat_from_jid(self.account, jid)
class ChangePasswordDialog: