diff options
author | Sushma Rai <rsushma@src.gnome.org> | 2005-12-10 17:52:23 +0800 |
---|---|---|
committer | Sushma Rai <rsushma@src.gnome.org> | 2005-12-10 17:52:23 +0800 |
commit | 20d62c3ff1b7b7bf4380329a863ce5bafaa789e5 (patch) | |
tree | d360fd6cab677e1bc5c59aff3c2bbb71405c6637 /addressbook | |
parent | 6783c373e4c96a5301880c2c301c8b7546e2bbb4 (diff) | |
download | gsoc2013-evolution-20d62c3ff1b7b7bf4380329a863ce5bafaa789e5.tar.gz gsoc2013-evolution-20d62c3ff1b7b7bf4380329a863ce5bafaa789e5.tar.zst gsoc2013-evolution-20d62c3ff1b7b7bf4380329a863ce5bafaa789e5.zip |
Not inserting new line at the end and also placing the cursor at the
beginning of the widget. Fixes #300300.
svn path=/trunk/; revision=30745
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 6 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 14 |
2 files changed, 16 insertions, 4 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 42c2ec1432..79e9fae852 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2005-12-10 Sushma Rai <rsushma@novell.com> + + * gui/contact-editor/e-contact-editor.c (fill_in_address_textview): + Not inserting new line at the end and also, placing the cursor at + the beginning of the widget. Fixes #300300. + 2005-12-06 Veerapuram Varadhan <vvaradhan@novell.com> * conduits/addressbook-conduit.c: (pre_sync): diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index b9757bbdfd..387111ed21 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -1714,7 +1714,7 @@ fill_in_address_textview (EContactEditor *editor, gint record, EContactAddress * gchar *textview_name; GtkWidget *textview; GtkTextBuffer *text_buffer; - GtkTextIter iter; + GtkTextIter iter_end, iter_start; textview_name = g_strdup_printf ("textview-%s-address", address_name [record]); textview = glade_xml_get_widget (editor->gui, textview_name); @@ -1723,9 +1723,15 @@ fill_in_address_textview (EContactEditor *editor, gint record, EContactAddress * text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview)); 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); + gtk_text_buffer_get_end_iter (text_buffer, &iter_end); + if (address->ext) { + gtk_text_buffer_insert (text_buffer, &iter_end, "\n", -1); + gtk_text_buffer_insert (text_buffer, &iter_end, address->ext, -1); + } else { + gtk_text_buffer_insert (text_buffer, &iter_end, "", -1); + } + gtk_text_buffer_get_iter_at_line (text_buffer, &iter_start, 0); + gtk_text_buffer_place_cursor (text_buffer, &iter_start); } static void |