diff options
author | 2013-01-16 09:57:31 +0100 | |
---|---|---|
committer | 2013-01-16 09:57:31 +0100 | |
commit | 10f0d42fa883ece4b2afc6be2eafb29f7cdf9a62 (patch) | |
tree | 3c2ba9f5f76d35f48c35a522d20ad542f749a34c /ufed-curses.c | |
parent | Added filtering of now transported masked flags. These are not shown, yet, (diff) | |
download | ufed-10f0d42fa883ece4b2afc6be2eafb29f7cdf9a62.tar.gz ufed-10f0d42fa883ece4b2afc6be2eafb29f7cdf9a62.tar.bz2 ufed-10f0d42fa883ece4b2afc6be2eafb29f7cdf9a62.zip |
Added checks to disallow breaking the masked/unmasked flag filtering
using PGUP, PGDN, HOME, END or the flag search by keywords.
This is a preparation to finally add a masked flag display toggle.
Diffstat (limited to 'ufed-curses.c')
-rw-r--r-- | ufed-curses.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/ufed-curses.c b/ufed-curses.c index 65c4ba8..edaef38 100644 --- a/ufed-curses.c +++ b/ufed-curses.c @@ -497,9 +497,12 @@ int maineventloop( if(currentitem!=items) { struct item *olditem = currentitem; (*drawitem)(currentitem, FALSE); - do currentitem = currentitem->prev; - while(currentitem!=items - && olditem->top - currentitem->prev->top <= wHeight(List)); + while( (currentitem != items) + && ( (olditem->top - currentitem->prev->top) <= wHeight(List)) + && ( ( !currentitem->prev->isMasked + || (show_unmasked != showMasked)) ) ) { + currentitem = currentitem->prev; + } scrollcurrent(); (*drawitem)(currentitem, TRUE); } @@ -509,10 +512,13 @@ int maineventloop( if(currentitem->next!=items) { struct item *olditem = currentitem; (*drawitem)(currentitem, FALSE); - do currentitem = currentitem->next; - while(currentitem->next!=items - && (currentitem->next->top + currentitem->next->height) - - (olditem->top + olditem->height) <= wHeight(List)); + while( (currentitem->next != items) + && (((currentitem->next->top + currentitem->next->height) + -(olditem->top + olditem->height) ) <= wHeight(List)) + && ( ( currentitem->next->isMasked + || (show_masked != showMasked)) ) ) { + currentitem = currentitem->next; + } scrollcurrent(); (*drawitem)(currentitem, TRUE); } @@ -522,6 +528,10 @@ int maineventloop( if(currentitem!=items) { (*drawitem)(currentitem, FALSE); currentitem = items; + if (show_unmasked == showMasked) { + while (currentitem->isMasked) + currentitem = currentitem->next; + } scrollcurrent(); (*drawitem)(currentitem, TRUE); } @@ -531,6 +541,10 @@ int maineventloop( if(currentitem->next!=items) { (*drawitem)(currentitem, FALSE); currentitem = items->prev; + if (show_masked == showMasked) { + while (!currentitem->isMasked) + currentitem = currentitem->prev; + } scrollcurrent(); (*drawitem)(currentitem, TRUE); } |