summaryrefslogtreecommitdiffstats
path: root/src/dirn.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-09-17 07:50:44 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2014-09-17 07:50:44 +0200
commita6a55345bcd7ad75a2a204c7500aceb53817da7b (patch)
tree25de5c82deb2611b800d856985604fc48e3f03c5 /src/dirn.c
parentd05ac1304b9d42d169b6af2f65e7cae997ad218b (diff)
When selecting multiple files, deleted ot not, display them in green
Diffstat (limited to 'src/dirn.c')
-rw-r--r--src/dirn.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/dirn.c b/src/dirn.c
index 2ba20b9..96f5f2f 100644
--- a/src/dirn.c
+++ b/src/dirn.c
@@ -135,12 +135,17 @@ static long int dir_aff_ncurses(disk_t *disk, const partition_t *partition, dir_
wattrset(window, A_REVERSE);
waddstr(window, ">");
}
+ else if((current_file->status&FILE_STATUS_MARKED)!=0)
+ waddstr(window, "*");
else
waddstr(window, " ");
- if((current_file->status&FILE_STATUS_DELETED)!=0 && has_colors())
- wbkgdset(window,' ' | COLOR_PAIR(1));
- else if((current_file->status&FILE_STATUS_MARKED)!=0 && has_colors())
- wbkgdset(window,' ' | COLOR_PAIR(2));
+ if(has_colors())
+ {
+ if((current_file->status&FILE_STATUS_MARKED)!=0)
+ wbkgdset(window,' ' | COLOR_PAIR(2));
+ else if((current_file->status&FILE_STATUS_DELETED)!=0)
+ wbkgdset(window,' ' | COLOR_PAIR(1));
+ }
{
const struct tm *tm_p;
if(current_file->td_mtime!=0 && (tm_p = localtime(&current_file->td_mtime))!=NULL)
@@ -160,8 +165,8 @@ static long int dir_aff_ncurses(disk_t *disk, const partition_t *partition, dir_
wprintw(window, "%9llu", (long long unsigned int)current_file->st_size);
/* screen may overlap due to long filename */
wprintw(window, " %s %s", datestr, current_file->name);
- if(((current_file->status&FILE_STATUS_DELETED)!=0 ||
- (current_file->status&FILE_STATUS_MARKED)!=0) && has_colors())
+ if((current_file->status&(FILE_STATUS_DELETED|FILE_STATUS_MARKED))!=0 &&
+ has_colors())
wbkgdset(window,' ' | COLOR_PAIR(0));
if(&current_file->list==pos)
wattroff(window, A_REVERSE);