[anjal] Added X-Mailer support.



commit 3c08210ebd63f4a0cebdb5416711bd420eca73ed
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Tue Apr 28 12:48:55 2009 +0530

    Added X-Mailer support.
---
 evo-anjal.patch      |   88 +++++++++++++++++++++++++++++++++++++++++++-------
 src/mail-component.c |    2 +
 2 files changed, 78 insertions(+), 12 deletions(-)

diff --git a/evo-anjal.patch b/evo-anjal.patch
index 23a9cb1..23e25db 100755
--- a/evo-anjal.patch
+++ b/evo-anjal.patch
@@ -232,7 +232,7 @@ index 8cbcf64..1ed21b6 100644
  		g_param_spec_string (
  			"label",
 diff --git a/composer/e-composer-header.h b/composer/e-composer-header.h
-index d1edd11..8542d01 100644
+index d1edd11..2b8f802 100644
 --- a/composer/e-composer-header.h
 +++ b/composer/e-composer-header.h
 @@ -49,6 +49,7 @@ struct _EComposerHeader {
@@ -243,15 +243,15 @@ index d1edd11..8542d01 100644
  	EComposerHeaderPrivate *priv;
  };
  
-@@ -62,6 +63,8 @@ gboolean	e_composer_header_get_sensitive	(EComposerHeader *header);
- void		e_composer_header_set_sensitive (EComposerHeader *header,
- 						 gboolean sensitive);
+@@ -64,6 +65,8 @@ void		e_composer_header_set_sensitive (EComposerHeader *header,
  gboolean	e_composer_header_get_visible	(EComposerHeader *header);
-+void		e_composer_header_set_property 	(GObject *object, guint property_id, 
-+						const GValue *value, GParamSpec *pspec);
  void		e_composer_header_set_visible	(EComposerHeader *header,
  						 gboolean visible);
++void		e_composer_header_set_property 	(GObject *object, guint property_id, 
++						const GValue *value, GParamSpec *pspec);
  void		e_composer_header_set_title_tooltip
+ 						(EComposerHeader *header,
+ 						 const gchar *tooltip);
 diff --git a/composer/e-composer-name-header.c b/composer/e-composer-name-header.c
 index 70a126b..ed96312 100644
 --- a/composer/e-composer-name-header.c
@@ -722,9 +722,18 @@ index e286a47..1b78525 100644
  server_in_files = GNOME_Evolution_Mail.server.in.in
  server_DATA = $(server_in_files:.server.in.in=.server)
 diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
-index 8822566..59bfea1 100644
+index 8822566..12b4c48 100644
 --- a/mail/em-composer-utils.c
 +++ b/mail/em-composer-utils.c
+@@ -1711,7 +1711,7 @@ generate_account_hash (void)
+ 	return account_hash;
+ }
+ 
+-static EDestination **
++EDestination **
+ em_utils_camel_address_to_destination (CamelInternetAddress *iaddr)
+ {
+ 	EDestination *dest, **destv;
 @@ -1913,6 +1913,12 @@ get_reply_sender (CamelMimeMessage *message, CamelInternetAddress *to, CamelNNTP
  	}
  }
@@ -752,7 +761,7 @@ index 8822566..59bfea1 100644
  enum {
  	ATTRIB_UNKNOWN,
  	ATTRIB_CUSTOM,
-@@ -2283,6 +2296,20 @@ struct _reply_data {
+@@ -2283,6 +2296,21 @@ struct _reply_data {
  	int mode;
  };
  
@@ -770,14 +779,15 @@ index 8822566..59bfea1 100644
 +	return text;
 +}
 +
++
  static void
  reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage *message, void *user_data)
  {
 diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h
-index d17a98c..6b75c1a 100644
+index d17a98c..8b5d279 100644
 --- a/mail/em-composer-utils.h
 +++ b/mail/em-composer-utils.h
-@@ -34,6 +34,8 @@ extern "C" {
+@@ -34,9 +34,12 @@ extern "C" {
  struct _CamelFolder;
  struct _CamelMimeMessage;
  struct _CamelException;
@@ -786,7 +796,11 @@ index d17a98c..6b75c1a 100644
  struct _EMsgComposer;
  struct _EMFormat;
  struct _EAccount;
-@@ -77,6 +79,10 @@ enum {
++struct _EDestination;
+ 
+ void em_composer_utils_setup_callbacks (struct _EMsgComposer *composer, struct _CamelFolder *folder, const char *uid,
+ 					guint32 flags, guint32 set, struct _CamelFolder *drafts, const char *drafts_uid);
+@@ -77,9 +80,15 @@ enum {
  	REPLY_MODE_LIST
  };
  
@@ -794,11 +808,16 @@ index d17a98c..6b75c1a 100644
 +void em_utils_get_reply_sender (struct _CamelMimeMessage *message, struct _CamelInternetAddress *to, struct _CamelNNTPAddress *postto);
 +void em_utils_get_reply_all (struct _CamelMimeMessage *message, struct _CamelInternetAddress *to, struct _CamelInternetAddress *cc, struct _CamelNNTPAddress *postto);
 +
++
  void em_utils_reply_to_message (struct _CamelFolder *, const char *uid, struct _CamelMimeMessage *message, int mode, struct _EMFormat *source);
  
  void em_utils_post_reply_to_message_by_uid (struct _CamelFolder *folder, const char *uid);
++struct _EDestination ** em_utils_camel_address_to_destination (struct _CamelInternetAddress *iaddr);
+ 
+ #ifdef __cplusplus
+ }
 diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
-index 6b3e792..e96c016 100644
+index 54173a5..c871578 100644
 --- a/mail/em-folder-tree.c
 +++ b/mail/em-folder-tree.c
 @@ -110,6 +110,7 @@ struct _EMFolderTreePrivate {
@@ -856,6 +875,51 @@ index e89be47..b02a4d8 100644
  
  #ifdef __cplusplus
  }
+diff --git a/mail/mail-component.c b/mail/mail-component.c
+index 12b4019..22b786f 100644
+--- a/mail/mail-component.c
++++ b/mail/mail-component.c
+@@ -104,7 +104,7 @@ static void view_changed_timeout_remove (EComponentView *component_view);
+ 
+ #define PARENT_TYPE evolution_component_get_type ()
+ static BonoboObjectClass *parent_class = NULL;
+-
++const char *x_mailer = "Evolution " VERSION SUB_VERSION " " VERSION_COMMENT;
+ #define OFFLINE 0
+ #define ONLINE 1
+ 
+diff --git a/mail/mail-ops.c b/mail/mail-ops.c
+index 7c5f033..d280daa 100644
+--- a/mail/mail-ops.c
++++ b/mail/mail-ops.c
+@@ -73,6 +73,8 @@
+ #define w(x)
+ #define d(x)
+ 
++extern const char *x_mailer;
++
+ /* used for both just filtering a folder + uid's, and for filtering a whole folder */
+ /* used both for fetching mail, and for filtering mail */
+ struct _filter_mail_msg {
+@@ -462,7 +464,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
+ 	if (!message)
+ 		return;
+ 
+-	camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer", "Evolution " VERSION SUB_VERSION " " VERSION_COMMENT);
++	camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer", x_mailer);
+ 
+ 	err = g_string_new("");
+ 	xev = mail_tool_remove_xevolution_headers (message);
+@@ -913,8 +915,7 @@ mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageIn
+ 	g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
+ 
+ 	if (!camel_medium_get_header (CAMEL_MEDIUM (message), "X-Mailer"))
+-		camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer",
+-					 "Evolution " VERSION SUB_VERSION " " VERSION_COMMENT);
++		camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer", x_mailer);
+ 
+ 	m = mail_msg_new (&append_mail_info);
+ 	m->folder = folder;
 diff --git a/widgets/misc/Makefile.am b/widgets/misc/Makefile.am
 index 95acd8b..2d92b1e 100644
 --- a/widgets/misc/Makefile.am
diff --git a/src/mail-component.c b/src/mail-component.c
index 31e8373..5a34944 100644
--- a/src/mail-component.c
+++ b/src/mail-component.c
@@ -72,6 +72,8 @@
 
 //static void create_local_item_cb(EUserCreatableItemsHandler *handler, const char *item_type_name, void *data);
 
+const char *x_mailer = "Evolution/Anjal 0.1 Preview";
+
 #define MAIL_COMPONENT_DEFAULT(mc) if (mc == NULL) mc = mail_component_peek();
 
 #define PARENT_TYPE evolution_component_get_type ()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]