Commit 61c541ae authored by Yann Leboulanger's avatar Yann Leboulanger

[Dicson] fix save preset status message behaviour. Fixes #3584

parent 5bb34369
......@@ -398,7 +398,7 @@ class ChangeStatusMessageDialog:
_('Please type a name for this status message'), is_modal = True)
response = dlg.get_response()
if response == gtk.RESPONSE_OK:
msg_name = dlg.input_entry.get_text().decode('utf-8')
msg_name = dlg.input_entry.get_text()
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 ''
......@@ -411,13 +411,14 @@ class ChangeStatusMessageDialog:
resp = dlg2.run()
if resp != gtk.RESPONSE_OK:
return
self.preset_messages_dict[msg_name] = msg_text
else:
self.preset_messages_dict[msg_name] = msg_text
iter_ = self.message_liststore.append((msg_name,))
gajim.config.add_per('statusmsg', msg_name)
# select in combobox the one we just saved
self.message_combobox.set_active_iter(iter_)
gajim.config.set_per('statusmsg', msg_name, 'message', msg_text_1l)
self.preset_messages_dict[msg_name] = msg_text
class AddNewContactWindow:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment