aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbertrand <bertrand@helixcode.com>2000-03-21 23:28:36 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>2000-03-21 23:28:36 +0800
commitd433fb48d2667a93063fd8d92426c12bb31d3353 (patch)
treef56ed89c007f9696c008bfa42c718389d4f50bb9
parent35e6f51eee1ac44714c14baefeaa7e1d4aa443eb (diff)
downloadgsoc2013-evolution-d433fb48d2667a93063fd8d92426c12bb31d3353.tar.gz
gsoc2013-evolution-d433fb48d2667a93063fd8d92426c12bb31d3353.tar.zst
gsoc2013-evolution-d433fb48d2667a93063fd8d92426c12bb31d3353.zip
display message size
2000-03-21 bertrand <bertrand@helixcode.com> * message-list.c (ml_value_at): display message size 2000-03-21 bertrand <bertrand@helixcode.com> * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_append_internal_to_external): copy the size field * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize message_info to NULL * camel-folder-summary.h: added the size field. * providers/mbox/camel-mbox-summary.h: added the received_date field. svn path=/trunk/; revision=2133
-rw-r--r--camel/ChangeLog11
-rw-r--r--camel/camel-folder-summary.h1
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c5
-rw-r--r--camel/providers/mbox/camel-mbox-summary.c1
-rw-r--r--camel/providers/mbox/camel-mbox-summary.h4
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/Makefile.am9
-rw-r--r--mail/message-list.c2
8 files changed, 31 insertions, 6 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 22249c483a..ff5d534bb0 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,16 @@
2000-03-21 bertrand <bertrand@helixcode.com>
+ * providers/mbox/camel-mbox-summary.c
+ (camel_mbox_summary_append_internal_to_external): copy the size field
+
+ * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize
+ message_info to NULL
+
+ * camel-folder-summary.h: added the size field.
+
+ * providers/mbox/camel-mbox-summary.h:
+ added the received_date field.
+
* providers/mbox/camel-mbox-summary.c:
documented all functions.
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index 84facc41d5..88fe86bd9f 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -69,6 +69,7 @@ typedef struct {
gchar *sent_date;
gchar *received_date;
+ guint32 size;
gchar *uid;
GHashTable *extended_fields;
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index 34d3a5783a..fdba8279b3 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -179,7 +179,6 @@ _init (CamelFolder *folder, CamelStore *parent_store,
CamelFolder *parent_folder, const gchar *name, gchar separator,
CamelException *ex)
{
- CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (folder);
CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxFolder::init_with_store\n");
@@ -463,7 +462,6 @@ _create (CamelFolder *folder, CamelException *ex)
gint mkdir_error;
gboolean folder_already_exists;
int creat_fd;
- mode_t old_umask;
g_assert(folder != NULL);
@@ -647,7 +645,6 @@ _delete_messages (CamelFolder *folder, CamelException *ex)
const gchar *folder_file_path;
gboolean folder_already_exists;
int creat_fd;
- mode_t old_umask;
g_assert(folder!=NULL);
@@ -1014,7 +1011,7 @@ _get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER(folder);
GArray *message_info_array;
- CamelMboxSummaryInformation *message_info;
+ CamelMboxSummaryInformation *message_info = NULL;
guint32 searched_uid;
int i;
gboolean uid_found;
diff --git a/camel/providers/mbox/camel-mbox-summary.c b/camel/providers/mbox/camel-mbox-summary.c
index 403355859a..9216f89e97 100644
--- a/camel/providers/mbox/camel-mbox-summary.c
+++ b/camel/providers/mbox/camel-mbox-summary.c
@@ -361,6 +361,7 @@ camel_mbox_summary_append_internal_to_external (CamelMboxSummary *internal,
external_entry.uid = g_strdup_printf ("%u", internal_entry->uid);
external_entry.sent_date = internal_entry->date ? strdup (internal_entry->date) : NULL;
external_entry.sender = internal_entry->sender ? strdup (internal_entry->sender) : NULL;
+ external_entry.size = internal_entry->size;
g_array_append_vals (external_array, &external_entry, 1);
diff --git a/camel/providers/mbox/camel-mbox-summary.h b/camel/providers/mbox/camel-mbox-summary.h
index af64ff7cf5..4ee4770a03 100644
--- a/camel/providers/mbox/camel-mbox-summary.h
+++ b/camel/providers/mbox/camel-mbox-summary.h
@@ -29,6 +29,8 @@
+/* This contains information about one message inside
+ * the mbox file. This is used in the intenal summary */
typedef struct {
guint32 position;
@@ -40,10 +42,12 @@ typedef struct {
gchar *sender;
gchar *to;
gchar *date;
+ gchar *received_date;
} CamelMboxSummaryInformation;
+/* this contains informations about the whole mbox file */
typedef struct {
guint nb_message; /* number of messages in the summary */
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 48ecad7976..e4a54da483 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,7 @@
+2000-03-21 bertrand <bertrand@helixcode.com>
+
+ * message-list.c (ml_value_at): display message size
+
2000-03-20 Christopher James Lahey <clahey@helixcode.com>
* message-list.c: Properly ref & sink the table and header models.
diff --git a/mail/Makefile.am b/mail/Makefile.am
index d9b015c897..936312eecd 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -1,4 +1,4 @@
-bin_PROGRAMS = evolution-mail test-mail
+bin_PROGRAMS = evolution-mail test-mail test-sources
providerdir = $(libdir)/evolution/camel-providers/$(VERSION)
@@ -59,6 +59,13 @@ test_mail_SOURCES = \
test_mail_LDADD = \
$(BONOBO_HTML_GNOME_LIBS)
+
+test_sources_SOURCES = \
+ mail-sources.c
+
+test_sources_LDADD = \
+ $(BONOBO_HTML_GNOME_LIBS)
+
gnorbadir = $(sysconfdir)/CORBA/servers
gnorba_DATA = evolution-mail.gnorba
diff --git a/mail/message-list.c b/mail/message-list.c
index 09d268ec61..4ca27fb165 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -191,7 +191,7 @@ ml_value_at (ETableModel *etm, int col, int row, void *data)
return "dudes@server";
case COL_SIZE:
- sprintf (buffer, "%d", 20);
+ sprintf (buffer, "%d", msg_info.size);
return buffer;
default: