[jim++] use message text if user does not give message title. message == preset message [in prefs window]

This commit is contained in:
Nikos Kouremenos 2006-03-28 12:57:35 +00:00
parent 34aef80124
commit ed14ec10eb
1 changed files with 3 additions and 6 deletions

View File

@ -775,13 +775,10 @@ class PreferencesWindow:
iter = model.get_iter_first()
while iter:
val = model[iter][0].decode('utf-8')
if val:
if model[iter][1]: # we have a preset message
if not val: # no title, use message text for title
val = model[iter][1]
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)