static void tog_searchbar_cb (GtkWidget *w,
gpointer data);
+static void summary_update_msg (MsgInfo *info, gpointer data);
GtkTargetEntry summary_drag_types[1] =
{
summaryview->search_type_opt = search_type_opt;
summaryview->search_type = search_type;
summaryview->search_string = search_string;
+ summaryview->msginfo_update_callback_id =
+ msginfo_update_callback_register(summary_update_msg, (gpointer) summaryview);
/* CLAWS: need this to get the SummaryView * from
* the CList */
{
GtkCTreeNode *found;
MsgInfo *msginfo = GTK_CTREE_ROW(node)->row.data;
-
+ MsgInfo *dup_msginfo;
+
if (!msginfo->msgid || !*msginfo->msgid) return;
found = g_hash_table_lookup(summaryview->msgid_table, msginfo->msgid);
-
- if (found && found != node)
- summary_delete_row(summaryview, node);
+
+ if (found && found != node) {
+ dup_msginfo = gtk_ctree_node_get_row_data(ctree, found);
+ /* prefer to delete the unread one */
+ if ((MSG_IS_UNREAD(msginfo->flags) && !MSG_IS_UNREAD(dup_msginfo->flags))
+ || (MSG_IS_UNREAD(msginfo->flags) == MSG_IS_UNREAD(dup_msginfo->flags)))
+ summary_delete_row(summaryview, node);
+ }
}
static void summary_unmark_row(SummaryView *summaryview, GtkCTreeNode *row)
item->threaded = summaryview->threaded;
}
+static void summary_update_msg(MsgInfo *msginfo, gpointer data) {
+ GtkCTreeNode *node;
+ SummaryView *summaryview = (SummaryView *)data;
+ node = gtk_ctree_find_by_row_data(GTK_CTREE(summaryview->ctree), NULL, msginfo);
+
+ if (node)
+ summary_set_row_marks(summaryview, node);
+}
+
/*
* End of Source.
*/