From 3835a0d437af0f4cc1392a469c44baa20e812261 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Tue, 18 Sep 2001 19:20:21 +0000 Subject: add caluri field data 2001-09-18 JP Rosevear * 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 --- .../gui/contact-editor/contact-editor.glade | 163 +++++++++++++++++++-- addressbook/gui/contact-editor/e-contact-editor.c | 30 +++- 2 files changed, 180 insertions(+), 13 deletions(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade index 88d74a2a77..575282b2d1 100644 --- a/addressbook/gui/contact-editor/contact-editor.glade +++ b/addressbook/gui/contact-editor/contact-editor.glade @@ -149,7 +149,6 @@ 2 True - GTK_RELIEF_NORMAL 0 False @@ -163,7 +162,6 @@ 2 True - GTK_RELIEF_NORMAL 0 False @@ -494,7 +492,6 @@ button-fullname True - GTK_RELIEF_NORMAL 1 3 @@ -536,7 +533,6 @@ GtkButton button-email1 - GTK_RELIEF_NORMAL Placeholder @@ -569,7 +565,6 @@ GtkButton button-phone4 - GTK_RELIEF_NORMAL Placeholder @@ -602,7 +597,6 @@ GtkButton button-phone2 - GTK_RELIEF_NORMAL Placeholder @@ -635,7 +629,6 @@ GtkButton button-phone1 - GTK_RELIEF_NORMAL Placeholder @@ -687,7 +680,6 @@ GtkButton button-phone3 - GTK_RELIEF_NORMAL Placeholder @@ -948,7 +940,6 @@ GtkButton button-address - GTK_RELIEF_NORMAL Placeholder @@ -1245,7 +1236,6 @@ button-contacts True - GTK_RELIEF_NORMAL @@ -1309,7 +1299,6 @@ button-categories True - GTK_RELIEF_NORMAL @@ -1552,7 +1541,6 @@ button-fulladdr True - GTK_RELIEF_NORMAL 5 7 @@ -2323,6 +2311,157 @@ 0 0 + + + GtkTable + table-contact-editor-collaboration + 7 + 2 + 3 + False + 4 + 4 + + + GtkLabel + label22 + + GTK_JUSTIFY_CENTER + False + 0 + 0.5 + 0 + 0 + entry-department + + 1 + 2 + 0 + 1 + 0 + 0 + False + False + False + False + True + True + + + + + GtkLabel + label23 + + GTK_JUSTIFY_CENTER + False + 0 + 0.5 + 0 + 0 + entry-office + + 1 + 2 + 1 + 2 + 0 + 0 + False + False + False + False + True + True + + + + + GtkEntry + entry-caluri + True + True + True + 0 + + + 2 + 3 + 0 + 1 + 0 + 0 + True + False + False + False + True + False + + + + + GtkEntry + entry-fburl + True + True + True + 0 + + + 2 + 3 + 1 + 2 + 0 + 0 + True + False + False + False + True + False + + + + + Custom + custom11 + e_create_image_widget + globe.png + + 0 + 0 + Thu, 18 May 2000 12:20:13 GMT + + 0 + 1 + 0 + 2 + 0 + 0 + False + False + False + False + True + True + + + + + + GtkLabel + Notebook:tab + label21 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + 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 @@ -512,6 +512,15 @@ company_entry_changed (GtkWidget *widget, EContactEditor *editor) widget_changed (widget, 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) { @@ -535,6 +544,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) { @@ -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]); -- cgit v1.2.3