diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-09-11 17:59:30 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-09-11 17:59:30 +0800 |
commit | d65fb37051402d1df0d125540546f63cc6b46ea6 (patch) | |
tree | 287b9cc05ed644eab851b234dc837c16d457d611 /addressbook/backend/ebook/e-card-simple.h | |
parent | e30911d7d0806677fbd6ee239d0c47284c05a228 (diff) | |
download | gsoc2013-evolution-d65fb37051402d1df0d125540546f63cc6b46ea6.tar.gz gsoc2013-evolution-d65fb37051402d1df0d125540546f63cc6b46ea6.tar.zst gsoc2013-evolution-d65fb37051402d1df0d125540546f63cc6b46ea6.zip |
Removed a bunch of redundant code. Made it so that when you set an address
2000-09-11 Christopher James Lahey <clahey@helixcode.com>
* backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h:
Removed a bunch of redundant code. Made it so that when you set
an address label, it sets the delivery address as well. Added
functions to set and get the delivery address.
* backend/ebook/e-card.c, backend/ebook/e-card.h: Added code to
convert and address label to a delivery address.
* contact-editor/Makefile.am: Added e-contact-editor-address.[ch],
fulladdr.glade, fulladdr.glade.h.
* contact-editor/contact-editor.glade,
contact-editor/e-contact-editor-strings.h: Switched from a label
to a button to show the parsed address.
* contact-editor/e-contact-editor-address.c,
contact-editor/e-contact-editor-address.h: New class to implement
the parsed address dialog.
* contact-editor/e-contact-editor-fullname.c,
contact-editor/e-contact-editor-fullname.h: Added const to the
_new function.
* contact-editor/e-contact-editor.c: Implemented clicking on the
address button.
* contact-editor/fulladdr.glade, contact-editor/fulladdr.glade.h:
New glade files for the parsed address dialog.
* contact-editor/fullname-strings.h, fullname.glade: Changed these
accellabels to labels.
* ename/Makefile.am: Added e-address-western.c.
* ename/e-address-western.c: Fixed some warnings.
svn path=/trunk/; revision=5317
Diffstat (limited to 'addressbook/backend/ebook/e-card-simple.h')
-rw-r--r-- | addressbook/backend/ebook/e-card-simple.h | 104 |
1 files changed, 53 insertions, 51 deletions
diff --git a/addressbook/backend/ebook/e-card-simple.h b/addressbook/backend/ebook/e-card-simple.h index 2d3b1cb4f4..6b9d7391fc 100644 --- a/addressbook/backend/ebook/e-card-simple.h +++ b/addressbook/backend/ebook/e-card-simple.h @@ -127,6 +127,7 @@ struct _ECardSimple { ECardPhone *phone[E_CARD_SIMPLE_PHONE_ID_LAST]; char *email[E_CARD_SIMPLE_EMAIL_ID_LAST]; ECardAddrLabel *address[E_CARD_SIMPLE_ADDRESS_ID_LAST]; + ECardDeliveryAddress *delivery[E_CARD_SIMPLE_ADDRESS_ID_LAST]; }; struct _ECardSimpleClass { @@ -134,65 +135,66 @@ struct _ECardSimpleClass { }; typedef void (*ECardSimpleArbitraryCallback) (const ECardArbitrary *arbitrary, gpointer closure); - -ECardSimple *e_card_simple_new (ECard *card); -char *e_card_simple_get_id (ECardSimple *simple); -void e_card_simple_set_id (ECardSimple *simple, - const gchar *character); -char *e_card_simple_get_vcard (ECardSimple *simple); - -ECardSimple *e_card_simple_duplicate (ECardSimple *simple); - -char *e_card_simple_get (ECardSimple *simple, - ECardSimpleField field); -const char *e_card_simple_get_const (ECardSimple *simple, - ECardSimpleField field); -void e_card_simple_set (ECardSimple *simple, - ECardSimpleField field, - const char *data); - -ECardSimpleType e_card_simple_type (ECardSimple *simple, - ECardSimpleField field); -const char *e_card_simple_get_name (ECardSimple *simple, - ECardSimpleField field); -const char *e_card_simple_get_short_name (ECardSimple *simple, - ECardSimpleField field); +ECardSimple *e_card_simple_new (ECard *card); +char *e_card_simple_get_id (ECardSimple *simple); +void e_card_simple_set_id (ECardSimple *simple, + const gchar *character); +char *e_card_simple_get_vcard (ECardSimple *simple); +ECardSimple *e_card_simple_duplicate (ECardSimple *simple); +char *e_card_simple_get (ECardSimple *simple, + ECardSimpleField field); +const char *e_card_simple_get_const (ECardSimple *simple, + ECardSimpleField field); +void e_card_simple_set (ECardSimple *simple, + ECardSimpleField field, + const char *data); +ECardSimpleType e_card_simple_type (ECardSimple *simple, + ECardSimpleField field); +const char *e_card_simple_get_name (ECardSimple *simple, + ECardSimpleField field); +const char *e_card_simple_get_short_name (ECardSimple *simple, + ECardSimpleField field); /* Use these only if building lists of specific types. It should be * easier to use the above if you consider a phone field to be the * same as any other field. */ -const ECardPhone *e_card_simple_get_phone (ECardSimple *simple, - ECardSimplePhoneId id); -const char *e_card_simple_get_email (ECardSimple *simple, - ECardSimpleEmailId id); -const ECardAddrLabel *e_card_simple_get_address (ECardSimple *simple, - ECardSimpleAddressId id); -void e_card_simple_set_phone (ECardSimple *simple, - ECardSimplePhoneId id, - const ECardPhone *phone); -void e_card_simple_set_email (ECardSimple *simple, - ECardSimpleEmailId id, - const char *email); -void e_card_simple_set_address (ECardSimple *simple, - ECardSimpleAddressId id, - const ECardAddrLabel *address); - -void e_card_simple_arbitrary_foreach (ECardSimple *simple, - ECardSimpleArbitraryCallback *callback, - gpointer closure); -const ECardArbitrary *e_card_simple_get_arbitrary (ECardSimple *simple, - const char *key); +const ECardPhone *e_card_simple_get_phone (ECardSimple *simple, + ECardSimplePhoneId id); +const char *e_card_simple_get_email (ECardSimple *simple, + ECardSimpleEmailId id); +const ECardAddrLabel *e_card_simple_get_address (ECardSimple *simple, + ECardSimpleAddressId id); +const ECardDeliveryAddress *e_card_simple_get_delivery_address (ECardSimple *simple, + ECardSimpleAddressId id); +void e_card_simple_set_phone (ECardSimple *simple, + ECardSimplePhoneId id, + const ECardPhone *phone); +void e_card_simple_set_email (ECardSimple *simple, + ECardSimpleEmailId id, + const char *email); +void e_card_simple_set_address (ECardSimple *simple, + ECardSimpleAddressId id, + const ECardAddrLabel *address); +void e_card_simple_set_delivery_address (ECardSimple *simple, + ECardSimpleAddressId id, + const ECardDeliveryAddress *delivery); +void e_card_simple_arbitrary_foreach (ECardSimple *simple, + ECardSimpleArbitraryCallback *callback, + gpointer closure); +const ECardArbitrary *e_card_simple_get_arbitrary (ECardSimple *simple, + const char *key); /* Any of these except key can be NULL */ -void e_card_simple_set_arbitrary (ECardSimple *simple, - const char *key, - const char *type, - const char *value); - -void e_card_simple_sync_card (ECardSimple *simple); +void e_card_simple_set_arbitrary (ECardSimple *simple, + const char *key, + const char *type, + const char *value); +void e_card_simple_sync_card (ECardSimple *simple); /* Standard Gtk function */ -GtkType e_card_simple_get_type (void); +GtkType e_card_simple_get_type (void); #endif /* ! __E_CARD_SIMPLE_H__ */ + + |