aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/contact-editor/e-contact-editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/contact-editor/e-contact-editor.c')
-rw-r--r--addressbook/contact-editor/e-contact-editor.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/addressbook/contact-editor/e-contact-editor.c b/addressbook/contact-editor/e-contact-editor.c
index 2e0d2219a5..5461fe3993 100644
--- a/addressbook/contact-editor/e-contact-editor.c
+++ b/addressbook/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", &note,
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);
+
}
}