make default added jid translatable in jid-multi field of a dataform
This commit is contained in:
parent
227c811b82
commit
5febd11788
|
@ -537,12 +537,13 @@ class SingleForm(gtk.Table, object):
|
|||
field.values = values
|
||||
|
||||
def on_jid_multi_add_button_clicked(self, widget, treeview, model, field):
|
||||
jid = 'new@jabber.id'
|
||||
#Default jid
|
||||
jid = _('new@jabber.id')
|
||||
if jid in field.values:
|
||||
i = 1
|
||||
while 'new%d@jabber.id' % i in field.values:
|
||||
while _('new%d@jabber.id') % i in field.values:
|
||||
i += 1
|
||||
jid = 'new%d@jabber.id' % i
|
||||
jid = _('new%d@jabber.id') % i
|
||||
iter = model.insert(999999, (jid,))
|
||||
treeview.set_cursor(model.get_path(iter), treeview.get_column(0), True)
|
||||
field.values = field.values + [jid]
|
||||
|
|
Loading…
Reference in New Issue