From 82e77d6d8e73f418ae75d975324dbfa59218c4cd Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sat, 15 Apr 2000 00:14:42 +0000 Subject: Added a note field. 2000-04-14 Christopher James Lahey * addressbook/backend/ebook/e-card.c, addressbook/backend/ebook/e-card.h, addressbook/backend/pas/pas-backend-file.c, addressbook/backend/pas/pas-backend-ldap.c, addressbook/contact-editor/e-contact-editor.c: Added a note field. From shell/ChangeLog: 2000-04-14 Christopher James Lahey * e-shell-view.c: Made the left pane of the shell view not autoresize. svn path=/trunk/; revision=2444 --- addressbook/gui/contact-editor/e-contact-editor.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'addressbook/gui') diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 2e0d2219a5..5461fe3993 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -584,6 +584,7 @@ fill_in_info(EContactEditor *editor) ECardList *email_list; char *title; char *url; + char *note; const ECardDeliveryAddress *address; const ECardPhone *phone; GtkEditable *editable; @@ -599,6 +600,7 @@ fill_in_info(EContactEditor *editor) "email", &email_list, "url", &url, "title", &title, + "note", ¬e, NULL); position = 0; @@ -645,6 +647,12 @@ fill_in_info(EContactEditor *editor) gtk_editable_delete_text(editable, 0, -1); if (title) gtk_editable_insert_text(editable, title, strlen(title), &position); + + position = 0; + editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "text-comments")); + gtk_editable_delete_text(editable, 0, -1); + if (note) + gtk_editable_insert_text(editable, note, strlen(note), &position); } } @@ -660,6 +668,7 @@ extract_info(EContactEditor *editor) ECardList *email_list; char *url; char *title; + char *note; const ECardDeliveryAddress *address; const ECardPhone *phone; ECardDeliveryAddress *address_copy; @@ -760,5 +769,13 @@ extract_info(EContactEditor *editor) NULL); g_free(title); + editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "text-comments")); + note = gtk_editable_get_chars(editable, 0, -1); + if (note && *note) + gtk_object_set(GTK_OBJECT(card), + "note", note, + NULL); + g_free(note); + } } -- cgit v1.2.3