From adff04903c42e2e93f9e6944e454ab6b2b47fe4e Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 28 Nov 2006 14:41:14 +0000 Subject: [PATCH] handle correctly save of multi-line status messages. fixes #2719 --- src/dialogs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dialogs.py b/src/dialogs.py index 010ad98da..03f13f537 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -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_)