|
From: CORE C. L. <cor...@li...> - 2000-11-23 03:28:14
|
Core CVS committal
Author : smugg
Project : core
Module : src
Modified Files:
callbacks.c
Log Message:
checked your changes... trye type improve some but it failed..... try look what im doing wrong =) gotta go to bed
===================================================================
RCS file: /cvsroot/corem/core/src/callbacks.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- callbacks.c 2000/11/23 02:23:03 1.24
+++ callbacks.c 2000/11/23 03:28:13 1.25
@@ -8,6 +8,7 @@
extern GtkWidget *main_win;
extern ConfigData config;
extern gchar *title;
+extern gchar *theme;
GtkWidget *ctree;
GtkWidget *folder_name, *full_name, *email_address, *type, *username,
@@ -330,6 +331,9 @@
int folder_selected(GtkWidget * list, GList * node, gint col,
gpointer data)
{
+ GdkBitmap *bitmap;
+ GdkColormap *colormap;
+ GdkPixmap *pixmap;
Message *message = NULL;
Account *mbox = NULL;
gchar *text[7] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
@@ -416,25 +420,7 @@
}
if (config.ml_read == 1) {
- found = find_header(head, "Status:");
- if (found) {
- text[col] = header_get_value(found);
- if (strchr(text[col], 'R')) {
- free(text[col]);
- text[col] = g_strdup("Read");
- }
- else if (strchr(text[col], 'O')) {
- free(text[col]);
- text[col] = g_strdup("Unread");
- }
- else {
- free(text[col]);
- text[col] = g_strdup("New");
- }
- }
- else
- text[col] = g_strdup("New");
- col++;
+ text[col] = g_strdup("");
}
temp = header_get_value(find_header(head, "References:"));
@@ -454,6 +440,21 @@
gtk_ctree_insert_node(GTK_CTREE(mail_ctree), top,
NULL, text, 0, NULL, NULL, NULL,
NULL, FALSE, TRUE);
+
+ if (config.ml_read == 1) {
+ found = find_header(head, "Status:");
+ if (found) {
+ text[col] = header_get_value(found);
+ if (strchr(text[col], 'O')) {
+ g_free(text[col]);
+ colormap = gtk_widget_get_colormap(mail_ctree);
+ pixmap = gdk_pixmap_colormap_create_from_xpm(NULL, colormap, &bitmap, NULL, g_strconcat(theme, "read.xpm", NULL));
+ gtk_ctree_node_set_pixmap(GTK_CTREE(mail_ctree), item, col, pixmap, bitmap);
+ gdk_bitmap_unref(bitmap);
+ gdk_pixmap_unref(pixmap);
+ }
+ }
+ }
temp = header_get_value(find_header(head, "Message-Id:"));
if (temp)
|