diff options
author | Kostyantyn Ovechko <fastinetserver@gmail.com> | 2010-08-04 16:58:13 +0300 |
---|---|---|
committer | Kostyantyn Ovechko <fastinetserver@gmail.com> | 2010-08-04 16:58:13 +0300 |
commit | faeddf5152825c77492bebaab2a9fd8f20292dc1 (patch) | |
tree | bcd362de675c9f75e8133878e9505a7285c1e205 /tuiclient/colors.cpp | |
parent | Provide more info on distfiles to tuiclients. (diff) | |
download | idfetch-faeddf5152825c77492bebaab2a9fd8f20292dc1.tar.gz idfetch-faeddf5152825c77492bebaab2a9fd8f20292dc1.tar.bz2 idfetch-faeddf5152825c77492bebaab2a9fd8f20292dc1.zip |
Add --wait-distfile=distfile_name option to cli of tuiclient
tuiclient checks distfile status, and returns when distfile is downloaded or not in the queue.
Diffstat (limited to 'tuiclient/colors.cpp')
-rw-r--r-- | tuiclient/colors.cpp | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/tuiclient/colors.cpp b/tuiclient/colors.cpp index 0b1959d..a8b380c 100644 --- a/tuiclient/colors.cpp +++ b/tuiclient/colors.cpp @@ -26,10 +26,44 @@ #include "colors.h" -void color_default_window(WINDOW * window){ +void color_distfile_added(WINDOW * window){ + if(has_colors()){ + start_color(); /* Start color */ + wattron(window, COLOR_PAIR(4)); + } +} + +void color_distfile_waiting(WINDOW * window){ + if(has_colors()){ + start_color(); /* Start color */ + wattron(window, COLOR_PAIR(8)); + } +} + +void color_distfile_downloading(WINDOW * window){ + if(has_colors()){ + start_color(); /* Start color */ + wattron(window, COLOR_PAIR(6)); + } +} + +void color_distfile_downloaded(WINDOW * window){ + if(has_colors()){ + start_color(); /* Start color */ + wattron(window, COLOR_PAIR(5)); + } +} + +void color_distfile_failed(WINDOW * window){ + if(has_colors()){ + start_color(); /* Start color */ + wattron(window, COLOR_PAIR(7)); + } +} + +void color_distfiles_window(WINDOW * window){ if(has_colors()){ start_color(); /* Start color */ - wbkgd(window, COLOR_PAIR(4)); wattron(window, COLOR_PAIR(4)); } } @@ -73,8 +107,11 @@ void colors_connected(){ init_pair(1, COLOR_WHITE, COLOR_BLUE); init_pair(2, COLOR_BLACK, COLOR_CYAN); init_pair(3, COLOR_GREEN, COLOR_BLUE); - init_pair(4, COLOR_BLACK, COLOR_GREEN); + init_pair(4, COLOR_WHITE, COLOR_BLACK); init_pair(5, COLOR_GREEN, COLOR_BLACK); + init_pair(6, COLOR_BLUE, COLOR_BLACK); + init_pair(7, COLOR_RED, COLOR_BLACK); + init_pair(8, COLOR_YELLOW, COLOR_BLACK); // init_pair(4, COLOR_BLACK, COLOR_WHITE); // attrset(A_REVERSE); attrset(A_DIM); @@ -89,7 +126,10 @@ void colors_disconnected(){ init_pair(2, COLOR_WHITE, COLOR_BLACK); init_pair(3, COLOR_BLACK, COLOR_RED); init_pair(4, COLOR_WHITE, COLOR_BLACK); - init_pair(5, COLOR_RED, COLOR_BLACK); + init_pair(5, COLOR_WHITE, COLOR_BLACK); + init_pair(6, COLOR_WHITE, COLOR_BLACK); + init_pair(7, COLOR_WHITE, COLOR_BLACK); + init_pair(8, COLOR_WHITE, COLOR_BLACK); /// attrset(A_BOLD); // attrset(A_REVERSE); } |