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
This commit is contained in:
Christoph Hohmann 2003-01-19 12:21:21 +00:00
parent d59e9ed250
commit 7dbbc48392
5 changed files with 21 additions and 46 deletions

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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__ */

View file

@ -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);