From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1706D1388A7 for ; Wed, 6 Feb 2013 09:09:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F25A7E04C1; Wed, 6 Feb 2013 09:09:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6FC05E0384 for ; Wed, 6 Feb 2013 09:09:32 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4575233DF39 for ; Wed, 6 Feb 2013 09:09:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id B8A07E4083 for ; Wed, 6 Feb 2013 09:09:29 +0000 (UTC) From: "Sven Eden" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Eden" Message-ID: <1360141826.21b5b97ff2605459439fe017641b7d7e9e622db1.yamakuzure@gentoo> Subject: [gentoo-commits] proj/ufed:master commit in: / X-VCS-Repository: proj/ufed X-VCS-Files: ufed-curses-checklist.c X-VCS-Directories: / X-VCS-Committer: yamakuzure X-VCS-Committer-Name: Sven Eden X-VCS-Revision: 21b5b97ff2605459439fe017641b7d7e9e622db1 X-VCS-Branch: master Date: Wed, 6 Feb 2013 09:09:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: cfdfd6af-4a31-464b-938f-19d6bac40505 X-Archives-Hash: dbdebab44d3bb75a323c9a1ceb907769 commit: 21b5b97ff2605459439fe017641b7d7e9e622db1 Author: Sven Eden gmx de> AuthorDate: Wed Feb 6 09:10:26 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Wed Feb 6 09:10:26 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=21b5b97f If a flag is not set in make.conf, its default settings are now displayed in the round selection settings. --- ufed-curses-checklist.c | 26 ++++++++++++++++++-------- 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; }