do not allow to create a privacy lists with an empty name. fixes #2541

This commit is contained in:
Yann Leboulanger 2006-10-13 07:09:43 +00:00
parent b69d736c94
commit 1a5a4817b3
1 changed files with 4 additions and 0 deletions

View File

@ -2138,6 +2138,10 @@ class PrivacyListsWindow:
def on_new_privacy_list_button_clicked(self, widget):
name = self.new_privacy_list_entry.get_text()
if not name:
ErrorDialog(_('Invalid List Name'),
_('You must enter a name to create a privacy list.'))
return
key_name = 'privacy_list_%s' % name
if gajim.interface.instances[self.account].has_key(key_name):
gajim.interface.instances[self.account][key_name].window.present()