diff options
Diffstat (limited to 'src/plugins/fs/fs.c')
-rw-r--r-- | src/plugins/fs/fs.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/plugins/fs/fs.c b/src/plugins/fs/fs.c index 4514bb9a..f3d4d459 100644 --- a/src/plugins/fs/fs.c +++ b/src/plugins/fs/fs.c | |||
@@ -649,4 +649,26 @@ void done_fs() { | |||
649 | CO_done(); | 649 | CO_done(); |
650 | } | 650 | } |
651 | 651 | ||
652 | |||
653 | const char * getColorCode(enum URITRACK_STATE state) { | ||
654 | if (state & (URITRACK_DIRECTORY_ADDED)) | ||
655 | return "blue"; | ||
656 | if (state & (URITRACK_INSERTED || URITRACK_INDEXED)) | ||
657 | return "cyan"; | ||
658 | if ( (state & URITRACK_DOWNLOAD_STARTED) && | ||
659 | (0 == (state & | ||
660 | (URITRACK_DOWNLOAD_COMPLETED | | ||
661 | URITRACK_DOWNLOAD_ABORTED)) ) ) | ||
662 | return "yellow"; | ||
663 | if (state & URITRACK_DOWNLOAD_COMPLETED) | ||
664 | return "springgreen"; | ||
665 | if (state & URITRACK_DOWNLOAD_ABORTED) | ||
666 | return "red"; | ||
667 | if (state & (URITRACK_SEARCH_RESULT | | ||
668 | URITRACK_DIRECTORY_FOUND) ) | ||
669 | return "gray"; | ||
670 | return "white"; | ||
671 | } | ||
672 | |||
673 | |||
652 | /* end of fs.c */ | 674 | /* end of fs.c */ |