#include "folder.h"
#include "colorlabel.h"
#include "inc.h"
+#include "imap.h"
#include "addressbook.h"
#include "addr_compl.h"
#include "scoring.h"
summaryview->newmsgs--;
if (MSG_IS_UNREAD(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags))
summaryview->unread--;
+ if (MSG_IS_NEW(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags) ||
+ MSG_IS_UNREAD(msginfo->flags) && !MSG_IS_IGNORE_THREAD(msginfo->flags)) {
+ MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_NEW | MSG_UNREAD);
+ if (MSG_IS_IMAP(msginfo->flags))
+ imap_msg_unset_perm_flags(msginfo, MSG_NEW | MSG_UNREAD);
+ summary_set_row_marks(summaryview, row);
+ gtk_clist_thaw(GTK_CLIST(ctree));
+ summary_status_show(summaryview);
+ }
if (new_window) {
MessageView *msgview;
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_DELETED);
MSG_UNSET_TMP_FLAGS(msginfo->flags, MSG_MOVE | MSG_COPY);
MSG_SET_PERM_FLAGS(msginfo->flags, MSG_MARKED);
+ if (MSG_IS_IMAP(msginfo->flags))
+ imap_msg_set_perm_flags(msginfo, MSG_MARKED);
CHANGE_FLAGS(msginfo);
summary_set_row_marks(summaryview, row);
- imap_do_mark(msginfo);
debug_print(_("Message %s/%d is marked\n"), msginfo->folder->path, msginfo->msgnum);
}
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_DELETED);
MSG_UNSET_TMP_FLAGS(msginfo->flags, MSG_MOVE | MSG_COPY);
MSG_SET_PERM_FLAGS(msginfo->flags, MSG_LOCKED);
+ if (MSG_IS_IMAP(msginfo->flags))
+ imap_msg_set_perm_flags(msginfo, MSG_LOCKED);
CHANGE_FLAGS(msginfo);
summary_set_row_marks(summaryview, row);
debug_print(_("Message %d is locked\n"), msginfo->msgnum);
if (MSG_IS_NEW(msginfo->flags) ||
MSG_IS_UNREAD(msginfo->flags)) {
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_NEW | MSG_UNREAD);
+ if (MSG_IS_IMAP(msginfo->flags))
+ imap_msg_unset_perm_flags(msginfo, MSG_NEW | MSG_UNREAD);
CHANGE_FLAGS(msginfo);
summary_set_row_marks(summaryview, row);
debug_print(_("Message %d is marked as read\n"),
summaryview->deleted--;
}
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_REPLIED | MSG_FORWARDED);
+ if (MSG_IS_IMAP(msginfo->flags))
+ imap_msg_unset_perm_flags(msginfo, MSG_REPLIED);
if (!MSG_IS_UNREAD(msginfo->flags)) {
MSG_SET_PERM_FLAGS(msginfo->flags, MSG_UNREAD);
+ if (MSG_IS_IMAP(msginfo->flags))
+ imap_msg_set_perm_flags(msginfo, MSG_UNREAD);
summaryview->unread++;
debug_print(_("Message %d is marked as unread\n"),
msginfo->msgnum);
}
msginfo->to_folder = NULL;
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_MARKED);
+ if (MSG_IS_IMAP(msginfo->flags))
+ imap_msg_unset_perm_flags(msginfo, MSG_MARKED);
MSG_UNSET_TMP_FLAGS(msginfo->flags, MSG_MOVE | MSG_COPY);
MSG_SET_PERM_FLAGS(msginfo->flags, MSG_DELETED);
CHANGE_FLAGS(msginfo);
}
msginfo->to_folder = NULL;
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_MARKED | MSG_DELETED);
+ if (MSG_IS_IMAP(msginfo->flags))
+ imap_msg_unset_perm_flags(msginfo, MSG_MARKED);
MSG_UNSET_TMP_FLAGS(msginfo->flags, MSG_MOVE | MSG_COPY);
CHANGE_FLAGS(msginfo);
summary_set_row_marks(summaryview, row);
- imap_do_unmark(msginfo);
debug_print(_("Message %s/%d is unmarked\n"),
msginfo->folder->path, msginfo->msgnum);
}
GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
GList *cur;
- for (cur = GTK_CLIST(ctree)->selection; cur != NULL;
- cur = cur->next)
+ for (cur = GTK_CLIST(ctree)->selection; cur != NULL; cur = cur->next)
summary_unmark_row(summaryview, GTK_CTREE_NODE(cur->data));
summary_status_show(summaryview);
msginfo->to_folder->op_count--;
}
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_MARKED | MSG_DELETED);
+ if (MSG_IS_IMAP(msginfo->flags))
+ imap_msg_unset_perm_flags(msginfo, MSG_MARKED);
MSG_UNSET_TMP_FLAGS(msginfo->flags, MSG_COPY);
if (!MSG_IS_MOVE(msginfo->flags)) {
MSG_SET_TMP_FLAGS(msginfo->flags, MSG_MOVE);
msginfo->to_folder->op_count--;
}
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_MARKED | MSG_DELETED);
+ if (MSG_IS_IMAP(msginfo->flags))
+ imap_msg_unset_perm_flags(msginfo, MSG_MARKED);
MSG_UNSET_TMP_FLAGS(msginfo->flags, MSG_MOVE);
if (!MSG_IS_COPY(msginfo->flags)) {
MSG_SET_TMP_FLAGS(msginfo->flags, MSG_COPY);
GtkWidget *scrolledwin = summaryview->scrolledwin;
GtkWidget *pixmap;
FolderItem *item;
+ guint selected_msgnum = summary_get_msgnum(summaryview, summaryview->selected);
+ guint displayed_msgnum = summary_get_msgnum(summaryview, summaryview->displayed);
+
item = summaryview->folder_item;
+
+ summary_lock(summaryview);
+ summary_write_cache(summaryview);
+ summary_unlock(summaryview);
+
summary_clear_all(summaryview);
gtk_widget_destroy(summaryview->ctree);
gtk_widget_show(ctree);
summary_show(summaryview, item, FALSE);
+
+ summary_select_by_msgnum(summaryview, selected_msgnum);
+ summaryview->displayed = summary_find_msg_by_msgnum(summaryview, displayed_msgnum);
+ if (!summaryview->displayed)
+ messageview_clear(summaryview->messageview);
+ else
+ summary_redisplay_msg(summaryview);
}
case S_COL_MARK:
if (MSG_IS_MARKED(msginfo->flags)) {
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_MARKED);
+ if (MSG_IS_IMAP(msginfo->flags))
+ imap_msg_unset_perm_flags(msginfo, MSG_MARKED);
CHANGE_FLAGS(msginfo);
summary_set_row_marks(summaryview, row);
} else
list = gtk_target_list_new(summary_drag_types, 1);
context = gtk_drag_begin(widget, list,
- GDK_ACTION_MOVE, button, event);
+ GDK_ACTION_MOVE|GDK_ACTION_COPY|GDK_ACTION_DEFAULT, button, event);
gtk_drag_set_icon_default(context);
}