summaryrefslogtreecommitdiffstats
path: root/flags.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2016-06-04 11:32:03 -0700
committerKevin McCarthy <kevin@8t8.us>2016-06-04 11:32:03 -0700
commit086a5b8092544d68933d851af83c14c8dcbd834d (patch)
treeb364c239b68decdf274b0c4560f084ba1989aeca /flags.c
parent389c74bb20b20ab31c14460962fbbb6bba82127d (diff)
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.
Diffstat (limited to 'flags.c')
-rw-r--r--flags.c12
1 files changed, 5 insertions, 7 deletions
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)