aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-03-23 17:39:37 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-03-23 17:39:37 +0800
commit4f26eac120fd30b1f8199a6aec29c436bfb558a4 (patch)
tree71ee7b80b87d7e47e5ead203ad7a8b63c2d33826 /mail
parente4affa9382419295eb9911d5528c1b9e38cb6283 (diff)
downloadgsoc2013-evolution-4f26eac120fd30b1f8199a6aec29c436bfb558a4.tar
gsoc2013-evolution-4f26eac120fd30b1f8199a6aec29c436bfb558a4.tar.gz
gsoc2013-evolution-4f26eac120fd30b1f8199a6aec29c436bfb558a4.tar.bz2
gsoc2013-evolution-4f26eac120fd30b1f8199a6aec29c436bfb558a4.tar.lz
gsoc2013-evolution-4f26eac120fd30b1f8199a6aec29c436bfb558a4.tar.xz
gsoc2013-evolution-4f26eac120fd30b1f8199a6aec29c436bfb558a4.tar.zst
gsoc2013-evolution-4f26eac120fd30b1f8199a6aec29c436bfb558a4.zip
Added. Call me old-fashioned, but I just prefer to have a real API rather
2001-03-23 Jon Trowbridge <trow@ximian.com> * gui/widgets/e-minicard-widget.c (e_minicard_widget_set_card): Added. Call me old-fashioned, but I just prefer to have a real API rather than doing everything via gtk_object_get/set-type calls. (e_minicard_widget_set_arg): Changed to call e_minicard_widget_set_card. * backend/ebook/e-book-util.c: Small changes to get rid of compiler warnings. (Casting out const, removed unused variables, etc.) Removed some debugging messages. * gui/component/addressbook-factory.c (main): Added call to e_address_popup_factory_init. * gui/component/e-address-popup.c: Added. A popup gadget that is invoked (as a bonobo control) when an address is left-clicked in the mailer. The addressbook is queries, and the address is either displayed as a minicard (if it already exists) or in a "generic format". A button is provided for editting/adding the contact. Some of the semantics of this widget are a bit... non-standard, because of bonobo issues. I can't really seem to replicate popup-menu behavior because of how bonobo propogates events, etc. so I've tried to produce something that I think is non-annoying. YMMV. 2001-03-23 Jon Trowbridge <trow@ximian.com> * mail-display.c (handle_embedded_address_object): #ifdef away some code I don't quite want to delete yet. (html_button_press_event): Remove some of Radek's placeholder code, replace it with code to create my AddressPopup bonobo control. * mail-format.c: Remove some obsolete code that if #ifdef-ed out a while ago. * mail-ops.c (send_queue_send): Strip out the X-Evolution-Identity header when sending. 2001-03-23 Jon Trowbridge <trow@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_message): Don't call camel_mime_message_set_identity. (The call is commented out, left over from some earlier experimentation that I want to be able to remember later...) * camel-mime-message.c (camel_mime_message_set_identity): Added. A function to set the X-Evolution-Identity header. svn path=/trunk/; revision=8916
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog14
-rw-r--r--mail/mail-display.c34
-rw-r--r--mail/mail-format.c28
-rw-r--r--mail/mail-ops.c8
-rw-r--r--mail/mail-send-recv.c2
5 files changed, 35 insertions, 51 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index a5a02daec5..ccde26d72c 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,17 @@
+2001-03-23 Jon Trowbridge <trow@ximian.com>
+
+ * mail-display.c (handle_embedded_address_object): #ifdef away
+ some code I don't quite want to delete yet.
+ (html_button_press_event): Remove some of Radek's placeholder
+ code, replace it with code to create my AddressPopup bonobo
+ control.
+
+ * mail-format.c: Remove some obsolete code that if #ifdef-ed out
+ a while ago.
+
+ * mail-ops.c (send_queue_send): Strip out the X-Evolution-Identity
+ header when sending.
+
2001-03-23 Christopher James Lahey <clahey@ximian.com>
* message-list.c: Turned on BROKEN_ETREE.
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 12f9711826..df3ead97db 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -1038,18 +1038,6 @@ mail_display_class_init (GtkObjectClass *object_class)
}
static void
-add_to_addressbook (GtkWidget *w, MailDisplay *mail_display)
-{
- g_print ("FIXME\n");
-}
-
-static void
-open_in_addressbook (GtkWidget *w, MailDisplay *mail_display)
-{
- g_print ("FIXME\n");
-}
-
-static void
link_open_in_browser (GtkWidget *w, MailDisplay *mail_display)
{
g_print ("FIXME\n");
@@ -1070,15 +1058,6 @@ link_copy_location (GtkWidget *w, MailDisplay *mail_display)
#define SEPARATOR { "", NULL, (NULL), NULL, 0 }
#define TERMINATOR { NULL, NULL, (NULL), NULL, 0 }
-static EPopupMenu address_menu [] = {
- { N_("Add to addressbook (FIXME)"), NULL,
- GTK_SIGNAL_FUNC (add_to_addressbook), NULL, 0 },
- { N_("Open in addressbook (FIXME)"), NULL,
- GTK_SIGNAL_FUNC (open_in_addressbook), NULL, 0 },
-
- TERMINATOR
-};
-
static EPopupMenu link_menu [] = {
{ N_("Open link in browser (FIXME)"), NULL,
GTK_SIGNAL_FUNC (link_open_in_browser), NULL, 0 },
@@ -1100,6 +1079,7 @@ html_button_press_event (GtkWidget *widget, GdkEventButton *event, MailDisplay *
if (event->button == 3) {
HTMLEngine *e;
HTMLPoint *point;
+ GtkWidget *popup_thing;
const gchar *email;
const gchar *name;
const gchar *link;
@@ -1110,8 +1090,16 @@ html_button_press_event (GtkWidget *widget, GdkEventButton *event, MailDisplay *
email = (const gchar *) html_object_get_data (point->object, "email");
if (email) {
name = (const gchar *) html_object_get_data (point->object, "name");
- g_print ("address: %s name: %s\n", email, name);
- e_popup_menu_run (address_menu, (GdkEvent *) event, 0, 0, mail_display);
+
+ popup_thing = bonobo_widget_new_control ("OAFIID:GNOME_Evolution_Addressbook_AddressPopup",
+ CORBA_OBJECT_NIL);
+
+ bonobo_widget_set_property (BONOBO_WIDGET (popup_thing),
+ "name", name,
+ "email", email,
+ NULL);
+ gtk_widget_show (popup_thing);
+
} else if ((link = html_object_get_url (point->object))) {
e_popup_menu_run (link_menu, (GdkEvent *) event, 0, 0, mail_display);
}
diff --git a/mail/mail-format.c b/mail/mail-format.c
index fc46526b9c..83c15ece17 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -623,32 +623,6 @@ write_subject (const char *subject, int flags, GtkHTML *html, GtkHTMLStream *str
g_free (encoded_subj);
}
-#ifdef USE_OBSOLETE_UNUSED_STUFF_AND_GET_COMPILER_WARNINGS
-static void
-write_field_to_stream(const char *description, const char *value, int flags, GtkHTML *html, GtkHTMLStream *stream)
-{
- char *encoded_desc, *encoded_value, *embedded_object;
- int bold = (flags&WRITE_BOLD) == WRITE_BOLD;
-
- /* The description comes from gettext... */
- encoded_desc = e_utf8_from_gtk_string (GTK_WIDGET (html), description);
-
- if (value)
- encoded_value = e_text_to_html (value, E_TEXT_TO_HTML_CONVERT_NL|E_TEXT_TO_HTML_CONVERT_URLS);
- else
- encoded_value = "";
-
- mail_html_write(html, stream,
- "<tr valign=top><%s align=right>%s</%s>"
- "<td> %s </td></tr>", bold ? "th" : "td",
- encoded_desc, bold ? "th" : "td", encoded_value);
- g_free (encoded_desc);
- g_free (embedded_object);
- if (value)
- g_free(encoded_value);
-}
-#endif
-
static void
write_address(MailDisplay *md, const CamelInternetAddress *addr, const char *field_name, int flags)
{
@@ -665,6 +639,7 @@ write_address(MailDisplay *md, const CamelInternetAddress *addr, const char *fie
while (camel_internet_address_get (addr, i, &name, &email)) {
if ((name && *name) || (email && *email)) {
+
/* we need these <B> </B> to separate HTMLText objects */
mail_html_write (md->html, md->stream, i ? ",<B> </B> " : "<td>");
mail_html_write (md->html, md->stream, " ");
@@ -682,6 +657,7 @@ write_address(MailDisplay *md, const CamelInternetAddress *addr, const char *fie
email);
mail_set = TRUE;
}
+
if (name && *name)
mail_html_write (md->html, md->stream, "%s ", name);
if (email && *email)
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 17314ceee8..0334ab564a 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -643,6 +643,12 @@ send_queue_send(struct _mail_msg *mm)
if (camel_exception_is_set (&mm->ex))
break;
+ /* Remove the X-Evolution header so we don't send our flags too ;-) */
+ camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution");
+
+ /* We also don't want to send our identity header. */
+ camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution-Identity");
+
/* Get the preferred transport URI */
destination = (char *)camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Transport");
if (destination) {
@@ -754,7 +760,7 @@ static char *append_mail_desc(struct _mail_msg *mm, int done)
static void append_mail_append(struct _mail_msg *mm)
{
struct _append_msg *m = (struct _append_msg *)mm;
-
+
camel_mime_message_set_date(m->message, CAMEL_MESSAGE_DATE_CURRENT, 0);
camel_folder_append_message(m->folder, m->message, m->info, &mm->ex);
}
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index b9f51b65ac..360198e141 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -601,7 +601,7 @@ void mail_send_receive(void)
gtk_signal_connect((GtkObject *)gd, "destroy", gtk_widget_destroyed, &gd);
while (scan) {
struct _send_info *info = scan->data;
-
+
switch(info->type) {
case SEND_RECEIVE:
mail_fetch_mail(info->uri, info->keep,