aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog13
-rw-r--r--camel/camel-mime-message.c6
-rw-r--r--camel/camel-mime-message.h3
-rw-r--r--camel/providers/MH/camel-mh-folder.c4
-rw-r--r--camel/providers/maildir/camel-maildir-folder.c3
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c2
-rw-r--r--camel/providers/mbox/camel-mbox-utils.c2
-rw-r--r--camel/providers/nntp/camel-nntp-folder.c2
-rw-r--r--camel/providers/pop3/camel-pop3-folder.c2
-rw-r--r--composer/ChangeLog5
-rw-r--r--composer/e-msg-composer.c2
-rw-r--r--tests/test1.c2
-rw-r--r--tests/test10.c2
-rw-r--r--tests/test2.c2
-rw-r--r--tests/ui-tests/message-browser.c3
15 files changed, 32 insertions, 21 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index e2d1bfe6d6..f8f5f0a594 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,18 @@
2000-04-17 Dan Winship <danw@helixcode.com>
+ * camel-mime-message.[ch]: Remove the "session" field from
+ CamelMimeMessage. Nothing uses it, about half of the existing
+ calls to camel_mime_message_new_with_session pass NULL, and
+ there's no obvious reason for it to be there.
+
+ * providers/MH/camel-mh-folder.c:
+ * providers/maildir/camel-maildir-folder.c:
+ * providers/mbox/camel-mbox-folder.c:
+ * providers/mbox/camel-mbox-utils.c:
+ * providers/nntp/camel-nntp-folder.c:
+ * providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new
+ instead of camel_mime_message_new_with_session.
+
* camel-session.c (get_store_for_protocol_with_url): Set the
exception if no provider is found.
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index 4a36806a5d..5445a48905 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -157,7 +157,6 @@ camel_mime_message_init (gpointer object, gpointer klass)
camel_mime_message->reply_to = NULL;
camel_mime_message->from = NULL;
camel_mime_message->folder = NULL;
- camel_mime_message->session = NULL;
}
GtkType
@@ -199,7 +198,6 @@ _finalize (GtkObject *object)
if (message->recipients) camel_recipient_table_unref (message->recipients);
if (message->folder) gtk_object_unref (GTK_OBJECT (message->folder));
- if (message->session) gtk_object_unref (GTK_OBJECT (message->session));
if (message->flags)
g_hash_table_foreach (message->flags, g_hash_table_generic_free, NULL);
@@ -212,12 +210,10 @@ _finalize (GtkObject *object)
CamelMimeMessage *
-camel_mime_message_new_with_session (CamelSession *session)
+camel_mime_message_new (void)
{
CamelMimeMessage *mime_message;
mime_message = gtk_type_new (CAMEL_MIME_MESSAGE_TYPE);
- mime_message->session = session;
- if (session) gtk_object_ref (GTK_OBJECT (session));
return mime_message;
}
diff --git a/camel/camel-mime-message.h b/camel/camel-mime-message.h
index 9fa54c29c7..691f2e0059 100644
--- a/camel/camel-mime-message.h
+++ b/camel/camel-mime-message.h
@@ -74,7 +74,6 @@ struct _CamelMimeMessage
gchar *message_uid;
CamelFolder *folder;
- CamelSession *session;
};
@@ -124,7 +123,7 @@ GtkType camel_mime_message_get_type (void);
/* public methods */
-CamelMimeMessage * camel_mime_message_new_with_session (CamelSession *session);
+CamelMimeMessage * camel_mime_message_new (void);
void camel_mime_message_set_received_date (CamelMimeMessage *mime_message,
diff --git a/camel/providers/MH/camel-mh-folder.c b/camel/providers/MH/camel-mh-folder.c
index 86bbab46ba..f4ff8f305a 100644
--- a/camel/providers/MH/camel-mh-folder.c
+++ b/camel/providers/MH/camel-mh-folder.c
@@ -508,7 +508,7 @@ _get_message (CamelFolder *folder, gint number, CamelException *ex)
if (input_stream != NULL) {
#warning use session field here
- message = camel_mime_message_new_with_session ( (CamelSession *)NULL);
+ message = camel_mime_message_new ();
camel_data_wrapper_construct_from_stream ( CAMEL_DATA_WRAPPER (message), input_stream);
gtk_object_unref (GTK_OBJECT (input_stream));
message->message_number = number;
@@ -785,7 +785,7 @@ _get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
if (input_stream != NULL) {
#warning use session field here
- message = camel_mime_message_new_with_session ( (CamelSession *)NULL);
+ message = camel_mime_message_new ();
camel_data_wrapper_construct_from_stream ( CAMEL_DATA_WRAPPER (message), input_stream);
gtk_object_unref (GTK_OBJECT (input_stream));
diff --git a/camel/providers/maildir/camel-maildir-folder.c b/camel/providers/maildir/camel-maildir-folder.c
index 4ad5409658..2cb81f3e81 100644
--- a/camel/providers/maildir/camel-maildir-folder.c
+++ b/camel/providers/maildir/camel-maildir-folder.c
@@ -462,8 +462,7 @@ _get_message (CamelFolder *folder, gint number, CamelException *ex)
if (!file) return NULL;
/* Create the message object */
-#warning use session field here
- message = camel_mime_message_new_with_session ((CamelSession *) NULL);
+ message = camel_mime_message_new ();
stream = camel_stream_fs_new_with_name (file, CAMEL_STREAM_FS_READ);
if (!message || !stream) {
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index a31ade5ec4..3b48895dbf 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -1083,7 +1083,7 @@ _get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
}
- message = camel_mime_message_new_with_session (camel_service_get_session (CAMEL_SERVICE (parent_store)));
+ message = camel_mime_message_new ();
camel_data_wrapper_set_input_stream (CAMEL_DATA_WRAPPER (message), message_stream);
diff --git a/camel/providers/mbox/camel-mbox-utils.c b/camel/providers/mbox/camel-mbox-utils.c
index f341210f71..cd7da089e9 100644
--- a/camel/providers/mbox/camel-mbox-utils.c
+++ b/camel/providers/mbox/camel-mbox-utils.c
@@ -365,7 +365,7 @@ index_message(ibex *index, int fd, CamelMboxParserMessageInfo *mi)
/* the stream will close the fd we have */
newfd = dup(fd);
stream = camel_stream_fs_new_with_fd_and_bounds(newfd, mi->message_position, mi->message_position + mi->size);
- message = camel_mime_message_new_with_session( (CamelSession *)NULL);
+ message = camel_mime_message_new();
camel_data_wrapper_set_input_stream (
CAMEL_DATA_WRAPPER (message), stream);
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
index 00d0bcc902..11faa4b561 100644
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ b/camel/providers/nntp/camel-nntp-folder.c
@@ -711,7 +711,7 @@ _get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
buf_len,
CAMEL_STREAM_MEM_READ);
- message = camel_mime_message_new_with_session (camel_service_get_session (CAMEL_SERVICE (parent_store)));
+ message = camel_mime_message_new ();
camel_data_wrapper_set_input_stream (CAMEL_DATA_WRAPPER (message), message_stream);
CAMEL_LOG_FULL_DEBUG ("Leaving CamelNNTPFolder::get_message_by_uid\n");
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index 0b2ccb030b..cf0d1763d3 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -207,7 +207,7 @@ get_message_by_number (CamelFolder *folder, gint number, CamelException *ex)
msgstream = camel_stream_mem_new_with_buffer (body, strlen (body),
CAMEL_STREAM_MEM_READ);
- msg = camel_mime_message_new_with_session (camel_service_get_session (CAMEL_SERVICE (folder->parent_store)));
+ msg = camel_mime_message_new ();
camel_data_wrapper_set_input_stream (CAMEL_DATA_WRAPPER (msg),
msgstream);
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 9526622354..d483512e3d 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-17 Dan Winship <danw@helixcode.com>
+
+ * e-msg-composer.c (build_message): Change
+ camel_mime_message_new_with_session to camel_mime_message_new
+
2000-03-17 bertrand <bertrand@helixcode.com>
* e-msg-composer.c (create_menubar): Pass the composer as the data
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 3b822863dc..c07a70b25a 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -105,7 +105,7 @@ build_message (EMsgComposer *composer)
CamelMimeBodyPart *body_part;
CamelMultipart *multipart;
- new = camel_mime_message_new_with_session (NULL);
+ new = camel_mime_message_new ();
e_msg_composer_hdrs_to_message (E_MSG_COMPOSER_HDRS (composer->hdrs),
new);
diff --git a/tests/test1.c b/tests/test1.c
index d967bb3566..c2f5bc87c0 100644
--- a/tests/test1.c
+++ b/tests/test1.c
@@ -44,7 +44,7 @@ main (int argc, char**argv)
}
}
- message = camel_mime_message_new_with_session ((CamelSession *)NULL);
+ message = camel_mime_message_new ();
camel_mime_part_set_description (CAMEL_MIME_PART (message), "a test");
diff --git a/tests/test10.c b/tests/test10.c
index 1d1d2904b9..fe976d4808 100644
--- a/tests/test10.c
+++ b/tests/test10.c
@@ -26,7 +26,7 @@ create_sample_mime_message ()
CamelMultipart *multipart;
- message = camel_mime_message_new_with_session ((CamelSession *)NULL);
+ message = camel_mime_message_new ();
camel_mime_part_set_description (CAMEL_MIME_PART (message), "a test");
diff --git a/tests/test2.c b/tests/test2.c
index 17fd4ffc9a..6e93a731a9 100644
--- a/tests/test2.c
+++ b/tests/test2.c
@@ -20,7 +20,7 @@ main (int argc, char**argv)
camel_init ();
camel_debug_level = CAMEL_LOG_LEVEL_FULL_DEBUG;
- message = camel_mime_message_new_with_session( (CamelSession *)NULL);
+ message = camel_mime_message_new ();
input_stream = camel_stream_fs_new_with_name ("mail.test", CAMEL_STREAM_FS_READ);
diff --git a/tests/ui-tests/message-browser.c b/tests/ui-tests/message-browser.c
index 35c71580e7..8f7127905c 100644
--- a/tests/ui-tests/message-browser.c
+++ b/tests/ui-tests/message-browser.c
@@ -210,8 +210,7 @@ filename_to_camel_msg (gchar* filename)
if (!input_stream)
return NULL;
- message = camel_mime_message_new_with_session (
- (CamelSession *)NULL);
+ message = camel_mime_message_new ();
camel_data_wrapper_set_input_stream (
CAMEL_DATA_WRAPPER (message), input_stream);