From 086a5b8092544d68933d851af83c14c8dcbd834d Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Sat, 4 Jun 2016 11:32:03 -0700 Subject: Sidebar clean up: building and drawing logic. Fix the autoconf/makefile.am changes to be consistent. Create a global SidebarNeedsRedraw to indicate a redraw is needed, instead of putting sb_draw() everywhere in the code. Create a menu_redraw_sidebar() function and use the REDRAW_SIDEBAR flag instead of piggy-backing it inside the index loop. Fix curs_main.c and pager.c to be a bit cleaner by using the global and REDRAW_SIDEBAR. Start to clean up some of the buffy code, but this needs to refactored and fixed. --- flags.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'flags.c') diff --git a/flags.c b/flags.c index 2d404f60..82e48647 100644 --- a/flags.c +++ b/flags.c @@ -25,10 +25,6 @@ #include "sort.h" #include "mx.h" -#ifdef USE_SIDEBAR -#include "sidebar.h" -#endif - void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx) { int changed = h->changed; @@ -259,7 +255,12 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx) } if (update) + { mutt_set_header_color(ctx, h); +#ifdef USE_SIDEBAR + SidebarNeedsRedraw = 1; +#endif + } /* if the message status has changed, we need to invalidate the cached * search results so that any future search will match the current status @@ -267,9 +268,6 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx) */ if (h->searched && (changed != h->changed || deleted != ctx->deleted || tagged != ctx->tagged || flagged != ctx->flagged)) h->searched = 0; -#ifdef USE_SIDEBAR - sb_draw(); -#endif } void mutt_tag_set_flag (int flag, int bf) -- cgit v1.2.3