summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@gmx.de>2013-02-06 10:10:26 +0100
committerSven Eden <sven.eden@gmx.de>2013-02-06 10:10:26 +0100
commit21b5b97ff2605459439fe017641b7d7e9e622db1 (patch)
treeaeab271c7e03637e22d837fde5ea154ccde2de72 /ufed-curses-checklist.c
parentAdded missing information that the IUSE line from installed packages influenc... (diff)
downloadufed-21b5b97ff2605459439fe017641b7d7e9e622db1.tar.gz
ufed-21b5b97ff2605459439fe017641b7d7e9e622db1.tar.bz2
ufed-21b5b97ff2605459439fe017641b7d7e9e622db1.zip
If a flag is not set in make.conf, its default settings are now displayed in the round selection settings.
Diffstat (limited to 'ufed-curses-checklist.c')
-rw-r--r--ufed-curses-checklist.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/ufed-curses-checklist.c b/ufed-curses-checklist.c
index a58d60c..0f60845 100644
--- a/ufed-curses-checklist.c
+++ b/ufed-curses-checklist.c
@@ -228,6 +228,7 @@ static int drawflag(sFlag* flag, bool highlight)
// print descriptions according to filters
if(idx < flag->ndesc) {
+ WINDOW* wLst = win(List);
int lHeight = wHeight(List);
int descLen = wWidth(List) - (minwidth + 9);
bool hasHead = false;
@@ -255,7 +256,7 @@ static int drawflag(sFlag* flag, bool highlight)
sprintf(buf, " %c%c%c %s%s%s%-*s ",
/* State of selection */
flag->stateConf == ' ' ? '(' : '[',
- flag->stateConf,
+ ' ', // Filled in later
flag->stateConf == ' ' ? ')' : ']',
/* name */
flag->globalForced ? "(+" : flag->globalMasked ? "(" : "",
@@ -266,7 +267,6 @@ static int drawflag(sFlag* flag, bool highlight)
- (flag->globalForced ? 2 : flag->globalMasked ? 3 : 5)
- strlen(flag->name)), " ");
// At this point buf is filled up to minwidth
- hasHead = true;
} // End of generating left side mask display
/* Display flag state
@@ -305,15 +305,25 @@ static int drawflag(sFlag* flag, bool highlight)
/* Set correct color set according to highlighting and status*/
if(highlight)
- wattrset(win(List), COLOR_PAIR(3) | A_BOLD | A_REVERSE);
+ wattrset(wLst, COLOR_PAIR(3) | A_BOLD | A_REVERSE);
else
- wattrset(win(List), COLOR_PAIR(3));
+ wattrset(wLst, COLOR_PAIR(3));
// Finally put the line on the screen
- mvwaddstr(win(List), line, 0, buf);
- mvwaddch(win(List), line, minwidth + 1, ACS_VLINE); // Before state
- mvwaddch(win(List), line, minwidth + 5, ACS_VLINE); // Between state and scope
- mvwaddch(win(List), line, minwidth + 8, ACS_VLINE); // After scope
+ mvwaddstr(wLst, line, 0, buf);
+ mvwaddch(wLst, line, minwidth + 1, ACS_VLINE); // Before state
+ mvwaddch(wLst, line, minwidth + 5, ACS_VLINE); // Between state and scope
+ mvwaddch(wLst, line, minwidth + 8, ACS_VLINE); // After scope
+
+ if (!hasHead) {
+ hasHead = true;
+ if (' ' == flag->stateConf) {
+ wattrset(wLst, COLOR_PAIR(3) | A_BOLD);
+ mvwaddch(wLst, line, 2, flag->stateDefault);
+ } else
+ mvwaddch(wLst, line, 2, flag->stateConf);
+ }
+
++line;
++usedY;
}