--- src/folderview.c.orig 2005-02-26 11:36:22.000000000 +0100 +++ src/folderview.c 2005-02-26 13:15:54.000000000 +0100 @@ -67,13 +67,11 @@ typedef enum { COL_FOLDER = 0, - COL_NEW = 1, - COL_UNREAD = 2, - COL_TOTAL = 3 + COL_TOTAL = 1 } FolderColumnPos; -#define N_FOLDER_COLS 4 -#define COL_FOLDER_WIDTH 150 +#define N_FOLDER_COLS 2 +#define COL_FOLDER_WIDTH 158 #define COL_NUM_WIDTH 32 static GList *folderview_list = NULL; @@ -124,10 +122,6 @@ static GdkBitmap *queueopenxpmmask; static GdkPixmap *queueopenhrmxpm; static GdkBitmap *queueopenhrmxpmmask; -static GdkPixmap *newxpm; -static GdkBitmap *newxpmmask; -static GdkPixmap *unreadxpm; -static GdkBitmap *unreadxpmmask; static GdkPixmap *readxpm; static GdkBitmap *readxpmmask; static GdkPixmap *draftsxpm; @@ -324,8 +318,6 @@ folderview = g_new0(FolderView, 1); titles[COL_FOLDER] = _("Folder"); - titles[COL_NEW] = _("New"); - titles[COL_UNREAD] = _("Unread"); titles[COL_TOTAL] = _("#"); scrolledwin = gtk_scrolled_window_new(NULL, NULL); @@ -341,18 +333,10 @@ gtk_container_add(GTK_CONTAINER(scrolledwin), ctree); gtk_clist_set_selection_mode(GTK_CLIST(ctree), GTK_SELECTION_BROWSE); - gtk_clist_set_column_justification(GTK_CLIST(ctree), COL_NEW, - GTK_JUSTIFY_RIGHT); - gtk_clist_set_column_justification(GTK_CLIST(ctree), COL_UNREAD, - GTK_JUSTIFY_RIGHT); gtk_clist_set_column_justification(GTK_CLIST(ctree), COL_TOTAL, GTK_JUSTIFY_RIGHT); gtk_clist_set_column_width(GTK_CLIST(ctree), COL_FOLDER, prefs_common.folder_col_folder); - gtk_clist_set_column_width(GTK_CLIST(ctree), COL_NEW, - prefs_common.folder_col_new); - gtk_clist_set_column_width(GTK_CLIST(ctree), COL_UNREAD, - prefs_common.folder_col_unread); gtk_clist_set_column_width(GTK_CLIST(ctree), COL_TOTAL, prefs_common.folder_col_total); gtk_ctree_set_line_style(GTK_CTREE(ctree), GTK_CTREE_LINES_DOTTED); @@ -435,11 +419,7 @@ void folderview_init(FolderView *folderview) { GtkWidget *ctree = folderview->ctree; - GtkWidget *label_new; - GtkWidget *label_unread; GtkWidget *label_total; - GtkWidget *hbox_new; - GtkWidget *hbox_unread; GtkWidget *hbox_total; gtk_widget_realize(ctree); @@ -468,35 +448,19 @@ /* CLAWS: titles for "New" and "Unread" show new & unread pixmaps * instead text (text overflows making them unreadable and ugly) */ - stock_pixmap_gdk(ctree, STOCK_PIXMAP_NEW, - &newxpm, &newxpmmask); - stock_pixmap_gdk(ctree, STOCK_PIXMAP_UNREAD, - &unreadxpm, &unreadxpmmask); stock_pixmap_gdk(ctree, STOCK_PIXMAP_READ, &readxpm, &readxpmmask); - label_new = gtk_pixmap_new(newxpm, newxpmmask); - label_unread = gtk_pixmap_new(unreadxpm, unreadxpmmask); label_total = gtk_pixmap_new(readxpm, readxpmmask); - hbox_new = gtk_hbox_new(FALSE, 4); - hbox_unread = gtk_hbox_new(FALSE, 4); hbox_total = gtk_hbox_new(FALSE, 4); /* left justified */ - gtk_box_pack_start(GTK_BOX(hbox_new), label_new, TRUE, TRUE, 0); - gtk_misc_set_alignment (GTK_MISC (label_new), 1, 0.5); - gtk_box_pack_start(GTK_BOX(hbox_unread), label_unread, TRUE, TRUE, 0); - gtk_misc_set_alignment (GTK_MISC (label_unread), 1, 0.5); gtk_box_pack_start(GTK_BOX(hbox_total), label_total, TRUE, TRUE, 0); gtk_misc_set_alignment (GTK_MISC (label_total), 1, 0.5); - gtk_widget_show_all(hbox_new); - gtk_widget_show_all(hbox_unread); gtk_widget_show_all(hbox_total); - gtk_clist_set_column_widget(GTK_CLIST(ctree),COL_NEW,hbox_new); - gtk_clist_set_column_widget(GTK_CLIST(ctree),COL_UNREAD,hbox_unread); gtk_clist_set_column_widget(GTK_CLIST(ctree),COL_TOTAL,hbox_total); if (!normal_style) { @@ -681,11 +645,7 @@ item = gtk_ctree_node_get_row_data(ctree, row); if (!item) return; - gtk_ctree_node_get_text(ctree, row, COL_NEW, &new_str); - gtk_ctree_node_get_text(ctree, row, COL_UNREAD, &unread_str); gtk_ctree_node_get_text(ctree, row, COL_TOTAL, &total_str); - new = atoi(new_str); - unread = atoi(unread_str); total = atoi(total_str); prev_row = row; @@ -712,7 +672,7 @@ child = gtk_ctree_find_by_row_data(ctree, node, item); if (!child) { gchar *text[N_FOLDER_COLS] = - {NULL, "0", "0", "0"}; + {NULL, "0"}; gtk_clist_freeze(GTK_CLIST(ctree)); @@ -1185,12 +1145,8 @@ g_free(name); if (!folder_item_parent(item)) { - gtk_ctree_node_set_text(ctree, node, COL_NEW, "-"); - gtk_ctree_node_set_text(ctree, node, COL_UNREAD, "-"); gtk_ctree_node_set_text(ctree, node, COL_TOTAL, "-"); } else { - gtk_ctree_node_set_text(ctree, node, COL_NEW, itos(item->new_msgs)); - gtk_ctree_node_set_text(ctree, node, COL_UNREAD, itos(item->unread_msgs)); gtk_ctree_node_set_text(ctree, node, COL_TOTAL, itos(item->total_msgs)); } @@ -1725,12 +1681,6 @@ case COL_FOLDER: prefs_common.folder_col_folder = width; break; - case COL_NEW: - prefs_common.folder_col_new = width; - break; - case COL_UNREAD: - prefs_common.folder_col_unread = width; - break; case COL_TOTAL: prefs_common.folder_col_total = width; break; @@ -1760,7 +1710,7 @@ void folderview_create_folder_node(FolderView *folderview, FolderItem *item) { GtkCTree *ctree = GTK_CTREE(folderview->ctree); - gchar *text[N_FOLDER_COLS] = {NULL, "0", "0", "0"}; + gchar *text[N_FOLDER_COLS] = {NULL, "0"}; GtkCTreeNode *node, *parent_node; parent_node = gtk_ctree_find_by_row_data(ctree, NULL, folder_item_parent(item));