do not allow to create a privacy lists with an empty name. fixes #2541
This commit is contained in:
parent
b69d736c94
commit
1a5a4817b3
|
@ -2138,6 +2138,10 @@ class PrivacyListsWindow:
|
||||||
|
|
||||||
def on_new_privacy_list_button_clicked(self, widget):
|
def on_new_privacy_list_button_clicked(self, widget):
|
||||||
name = self.new_privacy_list_entry.get_text()
|
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
|
key_name = 'privacy_list_%s' % name
|
||||||
if gajim.interface.instances[self.account].has_key(key_name):
|
if gajim.interface.instances[self.account].has_key(key_name):
|
||||||
gajim.interface.instances[self.account][key_name].window.present()
|
gajim.interface.instances[self.account][key_name].window.present()
|
||||||
|
|
Loading…
Reference in New Issue