allow default status message to be on several lines. Fixes #5580
This commit is contained in:
parent
b56de4fea8
commit
7035a5cb24
|
@ -1026,6 +1026,7 @@ class PreferencesWindow:
|
|||
status.sort()
|
||||
for status_ in status:
|
||||
msg = gajim.config.get_per('defaultstatusmsg', status_, 'message')
|
||||
msg = helpers.from_one_line(msg)
|
||||
enabled = gajim.config.get_per('defaultstatusmsg', status_, 'enabled')
|
||||
iter_ = model.append()
|
||||
uf_show = helpers.get_uf_show(status_)
|
||||
|
@ -1043,6 +1044,7 @@ class PreferencesWindow:
|
|||
def on_default_msg_treemodel_row_changed(self, model, path, iter_):
|
||||
status = model[iter_][0]
|
||||
message = model[iter_][2].decode('utf-8')
|
||||
message = helpers.to_one_line(message)
|
||||
gajim.config.set_per('defaultstatusmsg', status, 'enabled',
|
||||
model[iter_][3])
|
||||
gajim.config.set_per('defaultstatusmsg', status, 'message', message)
|
||||
|
|
|
@ -2136,8 +2136,9 @@ class RosterWindow:
|
|||
'mood': '', 'mood_text': ''}
|
||||
if show in gajim.config.get_per('defaultstatusmsg'):
|
||||
if gajim.config.get_per('defaultstatusmsg', show, 'enabled'):
|
||||
on_response(gajim.config.get_per('defaultstatusmsg', show,
|
||||
'message'), empty_pep)
|
||||
msg = gajim.config.get_per('defaultstatusmsg', show, 'message')
|
||||
msg = helpers.from_one_line(msg)
|
||||
on_response(msg, empty_pep)
|
||||
return
|
||||
if not always_ask and ((show == 'online' and not gajim.config.get(
|
||||
'ask_online_status')) or (show in ('offline', 'invisible') and not \
|
||||
|
|
Loading…
Reference in New Issue