handle correctly save of multi-line status messages. fixes #2719
This commit is contained in:
parent
ec66722faa
commit
adff04903c
|
@ -397,15 +397,15 @@ class ChangeStatusMessageDialog:
|
|||
response = dlg.get_response()
|
||||
if response == gtk.RESPONSE_OK:
|
||||
msg_name = dlg.input_entry.get_text()
|
||||
msg_text = helpers.to_one_line(status_message_to_save_as_preset)
|
||||
msg_text = status_message_to_save_as_preset.decode('utf-8')
|
||||
msg_text_1l = helpers.to_one_line(msg_text)
|
||||
if not msg_name: # msg_name was ''
|
||||
msg_name = msg_text
|
||||
msg_name = msg_text_1l
|
||||
msg_name = msg_name.decode('utf-8')
|
||||
msg_text = msg_text.decode('utf-8')
|
||||
iter_ = self.message_liststore.append((msg_name,))
|
||||
|
||||
gajim.config.add_per('statusmsg', msg_name)
|
||||
gajim.config.set_per('statusmsg', msg_name, 'message', msg_text)
|
||||
gajim.config.set_per('statusmsg', msg_name, 'message', msg_text_1l)
|
||||
self.preset_messages_dict[msg_name] = msg_text
|
||||
# select in combobox the one we just saved
|
||||
self.message_combobox.set_active_iter(iter_)
|
||||
|
|
Loading…
Reference in New Issue