update folderitem icon whenever its view is filtered
authorColin Leroy <colin@colino.net>
Sat, 17 Jul 2004 16:51:31 +0000 (16:51 +0000)
committerColin Leroy <colin@colino.net>
Sat, 17 Jul 2004 16:51:31 +0000 (16:51 +0000)
ChangeLog.claws
PATCHSETS
configure.ac
src/folder.h
src/folderview.c
src/summaryview.c

index db038de..7a37403 100644 (file)
@@ -1,3 +1,11 @@
+2004-07-17 [colin]     0.9.12cvs29
+
+       * src/folder.h
+       * src/folderview.c
+       * src/summaryview.c
+               Update FolderItem icon whenever its summaryview is 
+               filtered
+
 2004-07-16 [christoph] 0.9.12cvs28
 
        * src/mimeview.c
index 923874e..be7e32f 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
@@ -15,3 +15,4 @@
 ( cvs diff -u -r 1.7 -r 1.8 src/gtk/quicksearch.c; cvs diff -u -r 1.429 -r 1.430 src/compose.c; cvs diff -u -r 1.6 -r 1.7 src/customheader.c; cvs diff -u -r 1.119 -r 1.120 src/messageview.c; cvs diff -u -r 1.115 -r 1.116 src/news.c; cvs diff -u -r 1.113 -r 1.114 src/prefs_account.c; cvs diff -u -r 1.17 -r 1.18 src/prefs_display_header.c; cvs diff -u -r 1.57 -r 1.58 src/procheader.c; ) > 0.9.12cvs26.patchset
 ( cvs diff -u -r 1.120 -r 1.121 src/mimeview.c; ) > 0.9.12cvs27.patchset
 ( cvs diff -u -r 1.121 -r 1.123 src/mimeview.c; ) > 0.9.12cvs28.patchset
+( cvs diff -u -r 1.105 -r 1.106 src/folder.h; cvs diff -u -r 1.242 -r 1.243 src/folderview.c; cvs diff -u -r 1.438 -r 1.439 src/summaryview.c; ) > 0.9.12cvs29.patchset
index 4a752b9..69a1664 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=28
+EXTRA_VERSION=29
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index 04a7cff..b52bdf6 100644 (file)
@@ -114,6 +114,7 @@ typedef enum
        F_ITEM_UPDATE_ADDMSG = 1 << 2,
        F_ITEM_UPDATE_REMOVEMSG = 1 << 3,
        F_ITEM_UPDATE_NAME = 1 << 4,
+       F_ITEM_UPDATE_ICON = 1 << 5
 } FolderItemUpdateFlags;
 
 typedef void (*FolderUIFunc)           (Folder         *folder,
index 6c8b240..aa4cdff 100644 (file)
@@ -62,6 +62,7 @@
 #include "statusbar.h"
 #include "hooks.h"
 #include "folderutils.h"
+#include "quicksearch.h"
 
 typedef enum
 {
@@ -965,10 +966,13 @@ static void folderview_update_node(FolderView *folderview, GtkCTreeNode *node)
        gchar *str;
        gboolean add_unread_mark;
        gboolean use_bold, use_color;
-
+       gboolean hide_read_msgs = item->hide_read_msgs;
+       
        item = gtk_ctree_node_get_row_data(ctree, node);
        g_return_if_fail(item != NULL);
 
+       item->hide_read_msgs |= quicksearch_is_active(folderview->summaryview->quicksearch);
+       
        switch (item->stype) {
        case F_INBOX:
                if (item->hide_read_msgs) {
@@ -1041,6 +1045,9 @@ static void folderview_update_node(FolderView *folderview, GtkCTreeNode *node)
                        openmask = folderopenxpmmask;
                }
        }
+       
+       item->hide_read_msgs = hide_read_msgs;
+       
        name = folder_item_get_name(item);
 
        if (!GTK_CTREE_ROW(node)->expanded &&
@@ -1187,7 +1194,7 @@ gboolean folderview_update_item_claws(gpointer source, gpointer data)
 
        node = gtk_ctree_find_by_row_data(ctree, NULL, update_info->item);
        if (node) {
-               if (update_info->update_flags & (F_ITEM_UPDATE_MSGCNT | F_ITEM_UPDATE_NAME))
+               if (update_info->update_flags & (F_ITEM_UPDATE_MSGCNT | F_ITEM_UPDATE_NAME | F_ITEM_UPDATE_ICON))
                        folderview_update_node(folderview, node);
                if ((update_info->update_flags & F_ITEM_UPDATE_CONTENT) && (folderview->opened == node))
                        summary_show(folderview->summaryview, update_info->item);
index 3c689f3..998580c 100644 (file)
@@ -4375,8 +4375,14 @@ static gint summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
 static void quicksearch_execute_cb(QuickSearch *quicksearch, gpointer data)
 {
        SummaryView *summaryview = data;
+       FolderItemUpdateData source;
 
        summary_show(summaryview, summaryview->folder_item);
+                   
+       source.item = summaryview->folder_item;
+       source.update_flags = F_ITEM_UPDATE_ICON;
+       hooks_invoke(FOLDER_ITEM_UPDATE_HOOKLIST, &source);                             
+
 }
 
 static void tog_searchbar_cb(GtkWidget *w, gpointer data)