aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-01-18 01:29:14 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-01-18 01:29:14 +0800
commit3a51f7793e0a7df908768056da6e60a8e0ae9e51 (patch)
tree06a30d5852ccccbb75a53f1fa7361978cae48db1 /mail
parent2e8306e07bc705f7e927574d4ef03bb03f9e5e1e (diff)
downloadgsoc2013-evolution-3a51f7793e0a7df908768056da6e60a8e0ae9e51.tar
gsoc2013-evolution-3a51f7793e0a7df908768056da6e60a8e0ae9e51.tar.gz
gsoc2013-evolution-3a51f7793e0a7df908768056da6e60a8e0ae9e51.tar.bz2
gsoc2013-evolution-3a51f7793e0a7df908768056da6e60a8e0ae9e51.tar.lz
gsoc2013-evolution-3a51f7793e0a7df908768056da6e60a8e0ae9e51.tar.xz
gsoc2013-evolution-3a51f7793e0a7df908768056da6e60a8e0ae9e51.tar.zst
gsoc2013-evolution-3a51f7793e0a7df908768056da6e60a8e0ae9e51.zip
Replace `--with-x-mailer' with a more generic `--with-sub-version'.
The value you provide is now also displayed in the shell title bar. And while I was at it, I changed the title bar so that it displays the name of the folder first (instead of "Evolution - Inbox" it says "Inbox - Evolution 0.8 [yaddayadda]"). svn path=/trunk/; revision=7585
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-ops.c30
2 files changed, 30 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 73771aa63b..5b0943376e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2001-01-17 Ettore Perazzoli <ettore@ximian.com>
+
+ * mail-ops.c (set_x_mailer): New function.
+ (send_mail_send): Use it.
+ (do_send_queue): Use it.
+
2001-01-17 Martin Norbäck <d95mback@dtek.chalmers.se>
* openpgp-utils.c (pgp_get_passphrase): Changed the word entry
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 26202e3cfd..dd14c320f1 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -47,6 +47,23 @@ int mail_operation_run(const mail_operation_spec *op, void *in, int free);
#define mail_tool_camel_lock_down()
#define mail_tool_camel_lock_up()
+
+/* Utility functions. */
+
+static void
+set_x_mailer (CamelMimeMessage *message)
+{
+ const char *xmailer_version;
+
+ if (SUB_VERSION[0] == '\0')
+ xmailer_version = "Evolution (" VERSION " - Preview Release)";
+ else
+ xmailer_version = "Evolution (" VERSION "/" SUB_VERSION " - Preview Release)";
+
+ camel_medium_add_header(CAMEL_MEDIUM (message), "X-Mailer", xmailer_version);
+}
+
+
/* ** FETCH MAIL ********************************************************** */
typedef struct fetch_mail_input_s
@@ -551,14 +568,15 @@ static char *send_mail_desc(struct _mail_msg *mm, int done)
static void send_mail_send(struct _mail_msg *mm)
{
struct _send_mail_msg *m = (struct _send_mail_msg *)mm;
- extern CamelFolder *sent_folder;
+ extern CamelFolder *sent_folder; /* FIXME */
CamelMessageInfo *info;
CamelTransport *xport;
FilterContext *context;
- camel_medium_add_header(CAMEL_MEDIUM (m->message), "X-Mailer", "Evolution (" XMAILER_VERSION " - Preview Release)");
+ set_x_mailer (m->message);
+
camel_mime_message_set_date(m->message, CAMEL_MESSAGE_DATE_CURRENT, 0);
-
+
xport = camel_session_get_transport(session, m->uri, &mm->ex);
if (camel_exception_is_set(&mm->ex))
return;
@@ -696,9 +714,9 @@ do_send_queue (gpointer in_data, gpointer op_data, CamelException *ex)
message = camel_folder_get_message (input->folder_queue, uids->pdata[i], ex);
if (camel_exception_is_set (ex))
break;
-
- camel_medium_add_header (CAMEL_MEDIUM (message), "X-Mailer", "Evolution (" XMAILER_VERSION " - Preview Release)");
-
+
+ set_x_mailer (message);
+
camel_mime_message_set_date (message, CAMEL_MESSAGE_DATE_CURRENT, 0);
/* Get the preferred transport URI */