0.8.8claws120
authorChristoph Hohmann <reboot@gmx.ch>
Sun, 19 Jan 2003 12:21:21 +0000 (12:21 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Sun, 19 Jan 2003 12:21:21 +0000 (12:21 +0000)
* 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
configure.ac
src/procmsg.c
src/procmsg.h
src/summaryview.c

index a384928..79df573 100644 (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
index 88dc6da..b32d24d 100644 (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
index 2a05588..a471bc2 100644 (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;
index 536c0e5..cd9823e 100644 (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__ */
index 20d7bf3..4667338 100644 (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);