Add an attribute for directories

Completely overrides row colors though.
This commit is contained in:
Přemysl Eric Janouch 2017-06-04 02:51:49 +02:00
parent 57b4a9688d
commit e8a0864ead
Signed by: p
GPG Key ID: B715679E3A361BE6
1 changed files with 3 additions and 1 deletions

View File

@ -33,6 +33,7 @@
/* Listview */ \ /* Listview */ \
XX( EVEN, "even", -1, -1, 0 ) \ XX( EVEN, "even", -1, -1, 0 ) \
XX( ODD, "odd", -1, -1, 0 ) \ XX( ODD, "odd", -1, -1, 0 ) \
XX( DIRECTORY, "directory", -1, -1, 0 ) \
XX( SELECTION, "selection", -1, -1, A_REVERSE ) \ XX( SELECTION, "selection", -1, -1, A_REVERSE ) \
XX( SCROLLBAR, "scrollbar", -1, -1, 0 ) \ XX( SCROLLBAR, "scrollbar", -1, -1, 0 ) \
/* These are for debugging only */ \ /* These are for debugging only */ \
@ -1919,7 +1920,8 @@ library_tab_on_item_draw (size_t item_index, struct row_buffer *buffer,
case LIBRARY_FILE: prefix = " "; name = x.name; break; case LIBRARY_FILE: prefix = " "; name = x.name; break;
default: hard_assert (!"invalid item type"); default: hard_assert (!"invalid item type");
} }
row_buffer_append_args (buffer, prefix, 0, name, 0, NULL); chtype attrs = x.type != LIBRARY_FILE ? APP_ATTR (DIRECTORY) : 0;
row_buffer_append_args (buffer, prefix, attrs, name, attrs, NULL);
} }
static char static char