diff options
author | JP Rosevear <jpr@ximian.com> | 2001-09-19 03:20:21 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-09-19 03:20:21 +0800 |
commit | 3835a0d437af0f4cc1392a469c44baa20e812261 (patch) | |
tree | 69c564569692def5a7ce42ee0c8c82e5e4b56e05 /addressbook/gui/contact-editor/e-contact-editor.c | |
parent | 9f792d1de540a5f4839bd81ada06151c9e122aa3 (diff) | |
download | gsoc2013-evolution-3835a0d437af0f4cc1392a469c44baa20e812261.tar.gz gsoc2013-evolution-3835a0d437af0f4cc1392a469c44baa20e812261.tar.zst gsoc2013-evolution-3835a0d437af0f4cc1392a469c44baa20e812261.zip |
add caluri field data
2001-09-18 JP Rosevear <jpr@ximian.com>
* backend/ebook/e-card-simple.c (field_data): add caluri field data
* backend/ebook/e-card.c (e_card_get_vobject): add the caluri
property when appropriate
(parse_caluri): handle read caluri
(e_card_class_init): add caluri arg
(e_card_destroy): free the caluri
(e_card_get_arg): return caluri arg
(e_card_set_arg): set caluri from arg
(e_card_init): init caluri to null
* backend/ebook/e-card-simple.h: new simple field
* backend/ebook/e-card.h: new member
* gui/contact-editor/e-contact-editor.c (field_changed): util
callback to change the command state
(set_entry_changed_signal_field): hook up a change signal to above
(set_entry_changed_signals): use above function
* gui/contact-editor/e-contact-editor.glade: Add collaboration
page and fields
svn path=/trunk/; revision=12945
Diffstat (limited to 'addressbook/gui/contact-editor/e-contact-editor.c')
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 86386f4cdd..d34d1589b3 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -513,6 +513,15 @@ company_entry_changed (GtkWidget *widget, EContactEditor *editor) } static void +field_changed (GtkWidget *widget, EContactEditor *editor) +{ + if (!editor->changed) { + editor->changed = TRUE; + command_state_changed (editor); + } +} + +static void set_entry_changed_signal_phone(EContactEditor *editor, char *id) { GtkWidget *widget = glade_xml_get_widget(editor->gui, id); @@ -536,6 +545,15 @@ widget_changed (GtkWidget *widget, EContactEditor *editor) } static void +set_entry_changed_signal_field(EContactEditor *editor, char *id) +{ + GtkWidget *widget = glade_xml_get_widget(editor->gui, id); + if (widget && GTK_IS_ENTRY(widget)) + gtk_signal_connect(GTK_OBJECT(widget), "changed", + field_changed, editor); +} + +static void set_entry_changed_signals(EContactEditor *editor) { GtkWidget *widget; @@ -769,6 +787,9 @@ ensure_select_names_contact (EContactEditor *editor) "contacts", "Related Contacts"); } + + set_entry_changed_signal_field(editor, "entry-caluri"); + set_entry_changed_signal_field(editor, "entry-fburl"); } static void @@ -1955,6 +1976,8 @@ add_field_callback(GtkWidget *widget, EContactEditor *editor) "text-address", "checkbutton-mailingaddress", "checkbutton-htmlmail", + "entry-caluri", + "entry-fburl", NULL }; name = glade_get_widget_name(widget); @@ -1986,6 +2009,8 @@ static struct { { "entry-spouse", "spouse" }, { "text-comments", "note" }, { "entry-categories", "categories" }, + { "entry-caluri", "caluri" }, + { "entry-fburl", "fburl" }, }; static void @@ -2092,7 +2117,10 @@ static struct { { "entry-fullname", E_CARD_SIMPLE_FIELD_FULL_NAME, TRUE }, { "button-categories", E_CARD_SIMPLE_FIELD_CATEGORIES, TRUE }, - { "entry-categories", E_CARD_SIMPLE_FIELD_CATEGORIES, TRUE } + { "entry-categories", E_CARD_SIMPLE_FIELD_CATEGORIES, TRUE }, + + { "entry-caluri", E_CARD_SIMPLE_FIELD_CALURI, TRUE }, + { "entry-fburl", E_CARD_SIMPLE_FIELD_FBURL, TRUE } }; static int num_widget_field_mappings = sizeof(widget_field_mappings) / sizeof (widget_field_mappings[0]); |