diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-09-21 07:38:53 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-09-21 07:38:53 +0800 |
commit | ad7e6820081d32774e1a4226899fdbf6c1a8e728 (patch) | |
tree | eb8d77f379932557954a178e6940076235e135ac /addressbook/backend/ebook | |
parent | 86b7449d9e76afd9f136e0b0dbce52b6d97fb5b8 (diff) | |
download | gsoc2013-evolution-ad7e6820081d32774e1a4226899fdbf6c1a8e728.tar gsoc2013-evolution-ad7e6820081d32774e1a4226899fdbf6c1a8e728.tar.gz gsoc2013-evolution-ad7e6820081d32774e1a4226899fdbf6c1a8e728.tar.bz2 gsoc2013-evolution-ad7e6820081d32774e1a4226899fdbf6c1a8e728.tar.lz gsoc2013-evolution-ad7e6820081d32774e1a4226899fdbf6c1a8e728.tar.xz gsoc2013-evolution-ad7e6820081d32774e1a4226899fdbf6c1a8e728.tar.zst gsoc2013-evolution-ad7e6820081d32774e1a4226899fdbf6c1a8e728.zip |
Added a wants_html field to cards. Uses "x-mozilla-html".
2000-09-20 Christopher James Lahey <clahey@helixcode.com>
* backend/ebook/e-card.c, backend/ebook/e-card.h: Added a
wants_html field to cards. Uses "x-mozilla-html".
* contact-editor/Makefile.am: Added definition of
EVOLUTION_DATADIR.
* contact-editor/contact-editor.glade: Make Wants HTML check
button visible.
* contact-editor/e-contact-editor.c,
contact-editor/e-contact-editor.h: Make Wants HTML check button
active. Fix UI stuff to use XML. Set parent window of
confirm_delete dialog.
* gui/widgets/e-addressbook-view.c, gui/widgets/e-minicard.c: Set
the parent window of the confirm_delete dialog.
svn path=/trunk/; revision=5530
Diffstat (limited to 'addressbook/backend/ebook')
-rw-r--r-- | addressbook/backend/ebook/e-card.c | 42 | ||||
-rw-r--r-- | addressbook/backend/ebook/e-card.h | 3 |
2 files changed, 45 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c index c2ab80a734..e18dc681ec 100644 --- a/addressbook/backend/ebook/e-card.c +++ b/addressbook/backend/ebook/e-card.c @@ -28,6 +28,7 @@ #define XEV_PILOT_ID "X-EVOLUTION-PILOTID" #define XEV_PILOT_STATUS "X-EVOLUTION-PILOTSTATUS" +#define XEV_WANTS_HTML "X-MOZILLA-HTML" #define XEV_ARBITRARY "X-EVOLUTION-ARBITRARY" /* Object argument IDs */ @@ -57,6 +58,8 @@ enum { ARG_NOTE, ARG_CATEGORIES, ARG_CATEGORY_LIST, + ARG_WANTS_HTML, + ARG_WANTS_HTML_SET, ARG_PILOTID, ARG_PILOTSTATUS, ARG_ARBITRARY, @@ -101,6 +104,7 @@ static void parse_mailer(ECard *card, VObject *object); static void parse_fburl(ECard *card, VObject *object); static void parse_note(ECard *card, VObject *object); static void parse_categories(ECard *card, VObject *object); +static void parse_wants_html(ECard *card, VObject *object); static void parse_pilot_id(ECard *card, VObject *object); static void parse_pilot_status(ECard *card, VObject *object); static void parse_arbitrary(ECard *card, VObject *object); @@ -140,6 +144,7 @@ struct { { "FBURL", parse_fburl }, { VCNoteProp, parse_note }, { "CATEGORIES", parse_categories }, + { XEV_WANTS_HTML, parse_wants_html }, { XEV_PILOT_ID, parse_pilot_id }, { XEV_PILOT_STATUS, parse_pilot_status }, { XEV_ARBITRARY, parse_arbitrary }, @@ -435,6 +440,10 @@ char g_free(string); } + if (card->wants_html_set) { + addPropValue (vobj, XEV_WANTS_HTML, card->wants_html ? "TRUE" : "FALSE"); + } + if (card->pilot_id) { gchar *pilotid_str; pilotid_str = g_strdup_printf ("%d", card->pilot_id); @@ -840,6 +849,23 @@ parse_categories(ECard *card, VObject *vobj) } static void +parse_wants_html(ECard *card, VObject *vobj) +{ + if ( vObjectValueType (vobj) ) { + char *str = fakeCString (vObjectUStringZValue (vobj)); + if (!strcasecmp(str, "true")) { + card->wants_html = TRUE; + card->wants_html_set = TRUE; + } + if (!strcasecmp(str, "false")) { + card->wants_html = FALSE; + card->wants_html_set = TRUE; + } + free(str); + } +} + +static void parse_pilot_id(ECard *card, VObject *vobj) { if ( vObjectValueType (vobj) ) { @@ -1012,6 +1038,10 @@ e_card_class_init (ECardClass *klass) GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_CATEGORIES); gtk_object_add_arg_type ("ECard::category_list", GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_CATEGORY_LIST); + gtk_object_add_arg_type ("ECard::wants_html", + GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_WANTS_HTML); + gtk_object_add_arg_type ("ECard::wants_html_set", + GTK_TYPE_BOOL, GTK_ARG_READABLE, ARG_WANTS_HTML); gtk_object_add_arg_type ("ECard::pilot_id", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_PILOTID); gtk_object_add_arg_type ("ECard::pilot_status", @@ -1474,6 +1504,10 @@ e_card_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) g_free (card->note); card->note = g_strdup(GTK_VALUE_STRING(*arg)); break; + case ARG_WANTS_HTML: + card->wants_html = GTK_VALUE_BOOL(*arg); + card->wants_html_set = TRUE; + break; case ARG_PILOTID: card->pilot_id = GTK_VALUE_INT(*arg); break; @@ -1614,6 +1648,12 @@ e_card_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) case ARG_NOTE: GTK_VALUE_STRING(*arg) = card->note; break; + case ARG_WANTS_HTML: + GTK_VALUE_BOOL(*arg) = card->wants_html; + break; + case ARG_WANTS_HTML_SET: + GTK_VALUE_BOOL(*arg) = card->wants_html_set; + break; case ARG_PILOTID: GTK_VALUE_INT(*arg) = card->pilot_id; break; @@ -1669,6 +1709,8 @@ e_card_init (ECard *card) card->fburl = NULL; card->note = NULL; card->categories = NULL; + card->wants_html = FALSE; + card->wants_html_set = FALSE; card->pilot_id = 0; card->pilot_status = 0; card->arbitrary = NULL; diff --git a/addressbook/backend/ebook/e-card.h b/addressbook/backend/ebook/e-card.h index 4a6935419d..42c77a0911 100644 --- a/addressbook/backend/ebook/e-card.h +++ b/addressbook/backend/ebook/e-card.h @@ -71,6 +71,9 @@ struct _ECard { EList *arbitrary; /* Arbitrary fields. */ + guint32 wants_html : 1; /* Wants html mail. */ + guint32 wants_html_set : 1; /* Wants html mail. */ + guint32 pilot_id; /* id of the corresponding pilot */ guint32 pilot_status; /* status information */ #if 0 |