aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-05-01 03:31:37 +0800
committerChris Lahey <clahey@src.gnome.org>2002-05-01 03:31:37 +0800
commitbb1d2316f024efb5c232da21aff2c6b2ddcf711c (patch)
tree2bebb559a71da940506af9f6e8fc8b0b7dd29eb1 /addressbook/backend
parentbcd5801922ecefd90b911273dbf06f58b9d0f4c6 (diff)
downloadgsoc2013-evolution-bb1d2316f024efb5c232da21aff2c6b2ddcf711c.tar
gsoc2013-evolution-bb1d2316f024efb5c232da21aff2c6b2ddcf711c.tar.gz
gsoc2013-evolution-bb1d2316f024efb5c232da21aff2c6b2ddcf711c.tar.bz2
gsoc2013-evolution-bb1d2316f024efb5c232da21aff2c6b2ddcf711c.tar.lz
gsoc2013-evolution-bb1d2316f024efb5c232da21aff2c6b2ddcf711c.tar.xz
gsoc2013-evolution-bb1d2316f024efb5c232da21aff2c6b2ddcf711c.tar.zst
gsoc2013-evolution-bb1d2316f024efb5c232da21aff2c6b2ddcf711c.zip
Changed this to set a subject when sending a contact. This makes the
2002-04-30 Christopher James Lahey <clahey@ximian.com> * backend/ebook/e-card.c (e_card_list_send): Changed this to set a subject when sending a contact. This makes the signature be set properly also. svn path=/trunk/; revision=16648
Diffstat (limited to 'addressbook/backend')
-rw-r--r--addressbook/backend/ebook/e-card.c59
1 files changed, 58 insertions, 1 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c
index b3beecbc7e..4fd0bb623d 100644
--- a/addressbook/backend/ebook/e-card.c
+++ b/addressbook/backend/ebook/e-card.c
@@ -2648,7 +2648,6 @@ e_card_list_send (GList *cards, ECardDisposition disposition)
cards = g_list_next (cards);
}
-
subject = CORBA_string_dup ("");
GNOME_Evolution_Composer_setHeaders (composer_server, to_list, cc_list, bcc_list, subject, &ev);
@@ -2669,6 +2668,9 @@ e_card_list_send (GList *cards, ECardDisposition disposition)
GNOME_Evolution_Composer_AttachmentData *attach_data;
CORBA_boolean show_inline;
char *tempstr;
+
+ GNOME_Evolution_Composer_RecipientList *to_list, *cc_list, *bcc_list;
+ CORBA_char *subject;
content_type = CORBA_string_dup ("text/x-vcard");
filename = CORBA_string_dup ("");
@@ -2711,6 +2713,61 @@ e_card_list_send (GList *cards, ECardDisposition disposition)
CORBA_free (filename);
CORBA_free (description);
CORBA_free (attach_data);
+
+ to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
+ to_list->_maximum = to_list->_length = 0;
+
+ cc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
+ cc_list->_maximum = cc_list->_length = 0;
+
+ bcc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
+ bcc_list->_maximum = bcc_list->_length = 0;
+
+ if (!cards || cards->next) {
+ subject = CORBA_string_dup ("Contact information");
+ } else {
+ ECard *card = cards->data;
+ const gchar *tempstr2;
+
+ tempstr2 = NULL;
+ gtk_object_get(GTK_OBJECT(card),
+ "file_as", &tempstr2,
+ NULL);
+ if (!tempstr2 || !*tempstr2)
+ gtk_object_get(GTK_OBJECT(card),
+ "full_name", &tempstr2,
+ NULL);
+ if (!tempstr2 || !*tempstr2)
+ gtk_object_get(GTK_OBJECT(card),
+ "org", &tempstr2,
+ NULL);
+ if (!tempstr2 || !*tempstr2) {
+ EList *list;
+ EIterator *iterator;
+ gtk_object_get(GTK_OBJECT(card),
+ "email", &list,
+ NULL);
+ iterator = e_list_get_iterator (list);
+ if (e_iterator_is_valid (iterator)) {
+ tempstr2 = e_iterator_get (iterator);
+ }
+ gtk_object_unref (GTK_OBJECT (iterator));
+ }
+
+ if (!tempstr2 || !*tempstr2)
+ tempstr = g_strdup_printf ("Contact information");
+ else
+ tempstr = g_strdup_printf ("Contact information for %s", tempstr2);
+ subject = CORBA_string_dup (tempstr);
+ g_free (tempstr);
+ }
+
+ GNOME_Evolution_Composer_setHeaders (composer_server, to_list, cc_list, bcc_list, subject, &ev);
+
+ CORBA_free (to_list);
+ CORBA_free (cc_list);
+ CORBA_free (bcc_list);
+ CORBA_free (subject);
}
GNOME_Evolution_Composer_show (composer_server, &ev);