From 7dbbc483920ee0c2df06c6b280430b81b23d045b Mon Sep 17 00:00:00 2001 From: Christoph Hohmann Date: Sun, 19 Jan 2003 12:21:21 +0000 Subject: [PATCH] 0.8.8claws120 * src/summaryview.c * src/procmsg.[ch] fix wrong usage of procmsg_find_children in summaryview by using procmsg_update_unread_children instead of summaryview_update_unread_children --- ChangeLog.claws | 8 ++++++++ configure.ac | 2 +- src/procmsg.c | 3 +-- src/procmsg.h | 2 ++ src/summaryview.c | 52 ++++++++--------------------------------------- 5 files changed, 21 insertions(+), 46 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index a384928da..79df573df 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,11 @@ +2003-01-19 [christoph] 0.8.8claws120 + + * src/summaryview.c + * src/procmsg.[ch] + fix wrong usage of procmsg_find_children in summaryview + by using procmsg_update_unread_children instead of + summaryview_update_unread_children + 2003-01-19 [christoph] 0.8.8claws118 * src/procmsg.c diff --git a/configure.ac b/configure.ac index 88dc6da50..b32d24d36 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=8 MICRO_VERSION=8 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws118 +EXTRA_VERSION=claws120 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/procmsg.c b/src/procmsg.c index 2a05588f5..a471bc2f4 100644 --- a/src/procmsg.c +++ b/src/procmsg.c @@ -52,7 +52,6 @@ struct _FlagInfo static GHashTable *procmsg_read_mark_file (const gchar *folder); void procmsg_msginfo_write_flags (MsgInfo *msginfo); -static void procmsg_update_unread_children (MsgInfo *info, gboolean newly_marked); GHashTable *procmsg_msg_hash_table_create(GSList *mlist) { @@ -1735,7 +1734,7 @@ GSList *procmsg_find_children (MsgInfo *info) return children; } -static void procmsg_update_unread_children(MsgInfo *info, gboolean newly_marked) +void procmsg_update_unread_children(MsgInfo *info, gboolean newly_marked) { GSList *children = procmsg_find_children(info); GSList *cur; diff --git a/src/procmsg.h b/src/procmsg.h index 536c0e51f..cd9823ea4 100644 --- a/src/procmsg.h +++ b/src/procmsg.h @@ -294,6 +294,8 @@ gboolean procmsg_msg_has_flagged_parent (MsgInfo *info, MsgPermFlags perm_flags); gboolean procmsg_msg_has_marked_parent (MsgInfo *info); GSList *procmsg_find_children (MsgInfo *info); +void procmsg_update_unread_children (MsgInfo *info, + gboolean newly_marked); void procmsg_msginfo_set_to_folder (MsgInfo *msginfo, FolderItem *to_folder); #endif /* __PROCMSG_H__ */ diff --git a/src/summaryview.c b/src/summaryview.c index 20d7bf3ff..466733879 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -2753,43 +2753,19 @@ void summary_set_marks_selected(SummaryView *summaryview) summary_set_row_marks(summaryview, GTK_CTREE_NODE(cur->data)); } -static gboolean summary_update_unread_children (SummaryView *summaryview, MsgInfo *info, gboolean newly_marked) -{ - GSList *children = procmsg_find_children(info); - GSList *cur; - gboolean changed = FALSE; - for (cur = children; cur != NULL; cur = g_slist_next(cur)) { - MsgInfo *tmp = (MsgInfo *)cur->data; - if(MSG_IS_UNREAD(tmp->flags) && !MSG_IS_IGNORE_THREAD(tmp->flags)) { - if(newly_marked) - summaryview->unreadmarked++; - else - summaryview->unreadmarked--; - changed = TRUE; - } - procmsg_msginfo_free(tmp); - } - return changed; -} - static void summary_mark_row(SummaryView *summaryview, GtkCTreeNode *row) { - gboolean changed = FALSE; GtkCTree *ctree = GTK_CTREE(summaryview->ctree); MsgInfo *msginfo; msginfo = gtk_ctree_node_get_row_data(ctree, row); if (MSG_IS_DELETED(msginfo->flags)) summaryview->deleted--; - if (MSG_IS_MOVE(msginfo->flags)) { + if (MSG_IS_MOVE(msginfo->flags)) summaryview->moved--; - changed = TRUE; - } - if (MSG_IS_COPY(msginfo->flags)) { + if (MSG_IS_COPY(msginfo->flags)) summaryview->copied--; - changed = TRUE; - } - changed |= summary_update_unread_children (summaryview, msginfo, TRUE); + procmsg_update_unread_children (msginfo, TRUE); procmsg_msginfo_set_to_folder(msginfo, NULL); procmsg_msginfo_unset_flags(msginfo, MSG_DELETED, MSG_MOVE | MSG_COPY); @@ -2983,7 +2959,6 @@ static gboolean check_permission(SummaryView *summaryview, MsgInfo * msginfo) static void summary_delete_row(SummaryView *summaryview, GtkCTreeNode *row) { - gboolean changed = FALSE; GtkCTree *ctree = GTK_CTREE(summaryview->ctree); MsgInfo *msginfo; @@ -2996,15 +2971,11 @@ static void summary_delete_row(SummaryView *summaryview, GtkCTreeNode *row) if (MSG_IS_DELETED(msginfo->flags)) return; - if (MSG_IS_MOVE(msginfo->flags)) { + if (MSG_IS_MOVE(msginfo->flags)) summaryview->moved--; - changed = TRUE; - } - if (MSG_IS_COPY(msginfo->flags)) { + if (MSG_IS_COPY(msginfo->flags)) summaryview->copied--; - changed = TRUE; - } - changed |= summary_update_unread_children (summaryview, msginfo, FALSE); + procmsg_update_unread_children (msginfo, FALSE); procmsg_msginfo_set_to_folder(msginfo, NULL); procmsg_msginfo_unset_flags(msginfo, MSG_MARKED, MSG_MOVE | MSG_COPY); @@ -3153,22 +3124,17 @@ static void summary_delete_duplicated_func(GtkCTree *ctree, GtkCTreeNode *node, static void summary_unmark_row(SummaryView *summaryview, GtkCTreeNode *row) { - gboolean changed = FALSE; GtkCTree *ctree = GTK_CTREE(summaryview->ctree); MsgInfo *msginfo; msginfo = gtk_ctree_node_get_row_data(ctree, row); if (MSG_IS_DELETED(msginfo->flags)) summaryview->deleted--; - if (MSG_IS_MOVE(msginfo->flags)) { + if (MSG_IS_MOVE(msginfo->flags)) summaryview->moved--; - changed = TRUE; - } - if (MSG_IS_COPY(msginfo->flags)) { + if (MSG_IS_COPY(msginfo->flags)) summaryview->copied--; - changed = TRUE; - } - changed |= summary_update_unread_children (summaryview, msginfo, FALSE); + procmsg_update_unread_children (msginfo, FALSE); procmsg_msginfo_set_to_folder(msginfo, NULL); procmsg_msginfo_unset_flags(msginfo, MSG_MARKED | MSG_DELETED, MSG_MOVE | MSG_COPY); -- 2.25.1