[Jim++] title is needed in preset status messages. Fixes #1768

This commit is contained in:
Yann Leboulanger 2006-03-28 06:06:04 +00:00
parent 1ef1888cbe
commit 4311f7fe0a
1 changed files with 9 additions and 8 deletions

View File

@ -775,14 +775,15 @@ class PreferencesWindow:
iter = model.get_iter_first()
while iter:
val = model[iter][0].decode('utf-8')
gajim.config.add_per('statusmsg', val)
if model[iter][1] is None: # here is the MESSAGE
# so when we press New this func is called by
# on_msg_treemodel_row_changed but message is None
# (hasn't been added yet) so do not TB
return
msg = helpers.to_one_line(model[iter][1].decode('utf-8'))
gajim.config.set_per('statusmsg', val, 'message', msg)
if val:
gajim.config.add_per('statusmsg', val)
if model[iter][1] is None: # here is the MESSAGE
# so when we press New this func is called by
# on_msg_treemodel_row_changed but message is None
# (hasn't been added yet) so do not TB
return
msg = helpers.to_one_line(model[iter][1].decode('utf-8'))
gajim.config.set_per('statusmsg', val, 'message', msg)
iter = model.iter_next(iter)
gajim.interface.save_config()