From 19ed9cded5ddbf8529262c647f8688bfa4f408ef Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Sat, 26 Jun 2004 01:40:03 +0000 Subject: Add a newline between street line and rest of extended address. 2004-06-25 Hans Petter Jansson * gui/contact-editor/e-contact-editor.c (fill_in_address_textview): Add a newline between street line and rest of extended address. (extract_address_textview): Omit the newline trailing the street line. svn path=/trunk/; revision=26526 --- addressbook/gui/contact-editor/e-contact-editor.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'addressbook/gui/contact-editor') diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index f400af0469..6038d44775 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -1645,6 +1645,7 @@ fill_in_address_textview (EContactEditor *editor, gint record, EContactAddress * gtk_text_buffer_set_text (text_buffer, address->street ? address->street : "", -1); gtk_text_buffer_get_end_iter (text_buffer, &iter); + gtk_text_buffer_insert (text_buffer, &iter, "\n", -1); gtk_text_buffer_insert (text_buffer, &iter, address->ext ? address->ext : "", -1); } @@ -1714,12 +1715,14 @@ extract_address_textview (EContactEditor *editor, gint record, EContactAddress * return; iter_2 = iter_1; - gtk_text_iter_forward_line (&iter_2); + gtk_text_iter_forward_to_line_end (&iter_2); /* Extract street (first line of text) */ address->street = gtk_text_iter_get_text (&iter_1, &iter_2); iter_1 = iter_2; + gtk_text_iter_forward_line (&iter_1); + if (gtk_text_iter_is_end (&iter_1)) return; -- cgit v1.2.3