goto warn_err;
}
+ flag.perm_flags = MSG_NEW|MSG_UNREAD;
if (compose->targetinfo) {
target_locked = MSG_IS_LOCKED(compose->targetinfo->flags);
- flag.perm_flags = target_locked?MSG_LOCKED:0;
+ if (target_locked)
+ flag.perm_flags |= MSG_LOCKED;
}
flag.tmp_flags = MSG_DRAFT;
if (newmsginfo) {
procmsg_msginfo_unset_flags(newmsginfo, ~0, ~0);
if (target_locked)
- procmsg_msginfo_set_flags(newmsginfo, MSG_LOCKED, MSG_DRAFT);
+ procmsg_msginfo_set_flags(newmsginfo, MSG_NEW|MSG_UNREAD|MSG_LOCKED, MSG_DRAFT);
else
- procmsg_msginfo_set_flags(newmsginfo, 0, MSG_DRAFT);
+ procmsg_msginfo_set_flags(newmsginfo, MSG_NEW|MSG_UNREAD, MSG_DRAFT);
if (compose_use_attach(compose) && action != COMPOSE_AUTO_SAVE)
procmsg_msginfo_set_flags(newmsginfo, 0,
MSG_HAS_ATTACHMENT);
}
if ((folder_has_parent_of_type(item, F_OUTBOX) ||
folder_has_parent_of_type(item, F_QUEUE) ||
- folder_has_parent_of_type(item, F_DRAFT) ||
folder_has_parent_of_type(item, F_TRASH)) &&
(MSG_IS_NEW(msginfo->flags) || MSG_IS_UNREAD(msginfo->flags)))
procmsg_msginfo_unset_flags(msginfo, MSG_NEW | MSG_UNREAD, 0);
inc_unlock();
}
-static gboolean folderview_have_children_sub(FolderView *folderview,
- FolderItem *item,
- gboolean in_sub)
-{
- GNode *node = NULL;
-
- if (!item || !item->folder || !item->folder->node)
- return FALSE;
-
- node = item->folder->node;
-
- node = g_node_find(node, G_PRE_ORDER, G_TRAVERSE_ALL, item);
- node = node->children;
-
- if (in_sub && item->total_msgs > 0) {
- return TRUE;
- }
-
- while (node != NULL) {
- if (node && node->data) {
- FolderItem *next_item = (FolderItem*) node->data;
- node = node->next;
- if (folderview_have_children_sub(folderview,
- next_item, TRUE))
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-static gboolean folderview_have_children(FolderView *folderview,
- FolderItem *item)
-{
- return folderview_have_children_sub(folderview, item, FALSE);
-}
-
static gboolean folderview_have_new_children_sub(FolderView *folderview,
FolderItem *item,
gboolean in_sub)
break;
}
}
- } else if (folder_has_parent_of_type(item, F_DRAFT)) {
- use_bold = use_color = item->total_msgs > 0 ||
- (!GTK_CMCTREE_ROW(node)->expanded &&
- folderview_have_children(folderview, item));
} else {
/* if unread messages exist, print with bold font */
use_bold = (item->unread_msgs > 0|| item->new_msgs > 0)
g_return_val_if_fail(source != NULL, FALSE);
+ if (folder_has_parent_of_type(update_data->item, F_DRAFT))
+ return FALSE;
+
#if defined(NOTIFICATION_LCDPROC) || defined(NOTIFICATION_TRAYICON) || defined(NOTIFICATION_INDICATOR)
notification_update_msg_counts(NULL);
#else