aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-01-16 10:13:32 +0800
committerChris Lahey <clahey@src.gnome.org>2001-01-16 10:13:32 +0800
commitfa62a2652854d3b0d80d6f28fac1df490a391a83 (patch)
treef081898ceeb2f8286493b800f18b8b9c6a71e9fc /mail
parentf914742fe75e1c14f6879a96561d076ed6b0effc (diff)
downloadgsoc2013-evolution-fa62a2652854d3b0d80d6f28fac1df490a391a83.tar
gsoc2013-evolution-fa62a2652854d3b0d80d6f28fac1df490a391a83.tar.gz
gsoc2013-evolution-fa62a2652854d3b0d80d6f28fac1df490a391a83.tar.bz2
gsoc2013-evolution-fa62a2652854d3b0d80d6f28fac1df490a391a83.tar.lz
gsoc2013-evolution-fa62a2652854d3b0d80d6f28fac1df490a391a83.tar.xz
gsoc2013-evolution-fa62a2652854d3b0d80d6f28fac1df490a391a83.tar.zst
gsoc2013-evolution-fa62a2652854d3b0d80d6f28fac1df490a391a83.zip
Change from using filters for date and size to using e_cell_date and
2001-01-15 Christopher James Lahey <clahey@ximian.com> * message-list.c, message-list.h: Change from using filters for date and size to using e_cell_date and e_cell_size. Moved a bunch of includes from the message-list.h to the message-list.c. svn path=/trunk/; revision=7524
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/message-list.c26
-rw-r--r--mail/message-list.h4
3 files changed, 20 insertions, 16 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index cdeb4052bb..048d90ce25 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2001-01-15 Christopher James Lahey <clahey@ximian.com>
+
+ * message-list.c, message-list.h: Change from using filters for
+ date and size to using e_cell_date and e_cell_size. Moved a bunch
+ of includes from the message-list.h to the message-list.c.
+
2001-01-15 Miguel de Icaza <miguel@ximian.com>
* mail-callbacks.c (configure_mail): Set the default button to
diff --git a/mail/message-list.c b/mail/message-list.c
index ff1bc995df..025d87c18d 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -32,6 +32,12 @@
#include <gal/widgets/e-gui-utils.h>
#include <gal/e-table/e-table-header-item.h>
#include <gal/e-table/e-table-item.h>
+#include <gal/e-table/e-cell-text.h>
+#include <gal/e-table/e-cell-toggle.h>
+#include <gal/e-table/e-cell-checkbox.h>
+#include <gal/e-table/e-cell-tree.h>
+#include <gal/e-table/e-cell-date.h>
+#include <gal/e-table/e-cell-size.h>
#include "art/mail-new.xpm"
#include "art/mail-read.xpm"
@@ -92,8 +98,8 @@ static ETableScrolledClass *message_list_parent_class;
static void on_cursor_change_cmd (ETableScrolled *table, int row, gpointer user_data);
static gint on_click (ETableScrolled *table, gint row, gint col, GdkEvent *event, MessageList *list);
-static char *filter_date (void *reserved, const void *data, void *closure);
-static char *filter_size (void *reserved, const void *data, void *closure);
+static char *filter_date (time_t date);
+static char *filter_size (int size);
static void save_tree_state(MessageList *ml);
@@ -288,9 +294,8 @@ subject_compare (gconstpointer subject1, gconstpointer subject2)
}
static gchar *
-filter_size (void *reserved, const void *data, void *closure)
+filter_size (gint size)
{
- gint size = GPOINTER_TO_INT(data);
gfloat fsize;
if (size < 1024) {
@@ -639,10 +644,10 @@ ml_value_to_string (ETableModel *etm, int col, const void *value, void *data)
case COL_SENT:
case COL_RECEIVED:
- return filter_date (NULL, value, NULL);
+ return filter_date (GPOINTER_TO_INT(value));
case COL_SIZE:
- return filter_size (NULL, value, NULL);
+ return filter_size (GPOINTER_TO_INT(value));
case COL_FROM:
case COL_SUBJECT:
@@ -956,9 +961,8 @@ message_list_init_images (void)
}
static char *
-filter_date (void *reserved, const void *data, void *closure)
+filter_date (time_t date)
{
- time_t date = GPOINTER_TO_INT (data);
time_t nowdate = time(NULL);
time_t yesdate;
struct tm then, now, yesterday;
@@ -1054,9 +1058,8 @@ message_list_create_extras (void)
e_table_extras_add_cell(extras, "render_score", e_cell_toggle_new (0, 7, images));
/* date cell */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
+ cell = e_cell_date_new (NULL, GTK_JUSTIFY_LEFT);
gtk_object_set (GTK_OBJECT (cell),
- "text_filter_func", filter_date,
"strikeout_column", COL_DELETED,
"bold_column", COL_UNREAD,
"color_column", COL_COLOUR,
@@ -1077,9 +1080,8 @@ message_list_create_extras (void)
TRUE, cell));
/* size cell */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_RIGHT);
+ cell = e_cell_size_new (NULL, GTK_JUSTIFY_RIGHT);
gtk_object_set (GTK_OBJECT (cell),
- "text_filter_func", filter_size,
"strikeout_column", COL_DELETED,
"bold_column", COL_UNREAD,
"color_column", COL_COLOUR,
diff --git a/mail/message-list.h b/mail/message-list.h
index 468f8cc3dc..55971eb664 100644
--- a/mail/message-list.h
+++ b/mail/message-list.h
@@ -9,10 +9,6 @@
#include <gal/e-table/e-table-scrolled.h>
#include <gal/e-table/e-table-simple.h>
#include <gal/e-table/e-tree-simple.h>
-#include <gal/e-table/e-cell-text.h>
-#include <gal/e-table/e-cell-toggle.h>
-#include <gal/e-table/e-cell-checkbox.h>
-#include <gal/e-table/e-cell-tree.h>
#define MESSAGE_LIST_TYPE (message_list_get_type ())
#define MESSAGE_LIST(o) (GTK_CHECK_CAST ((o), MESSAGE_LIST_TYPE, MessageList))