Skip to content
Snippets Groups Projects
Commit fcee8b2a authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

do some check before adding a contact

parent cb7e5396
No related branches found
No related tags found
No related merge requests found
......@@ -333,6 +333,11 @@ class addContact_Window:
textview_sub = self.xml.get_widget("textview_sub")
entry_who = self.xml.get_widget('entry_who')
who = entry_who.get_text()
if not who:
return
if who.find('@') < 0:
warning_Window(_("The contact's name must be something like login@hostname"))
return
buf = textview_sub.get_buffer()
start_iter = buf.get_start_iter()
end_iter = buf.get_end_iter()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment