diff options
author | Daniel Lange <DLange@git.local> | 2020-08-27 07:48:10 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2020-08-27 07:48:10 +0200 |
commit | f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4 (patch) | |
tree | 3ee82b2af2ab3d38b6e4b07f3994516aac72f742 /CheckItem.c | |
parent | df568a576f7b44ac5a2b9b7222c7f39d9932f626 (diff) | |
download | debian_htop-f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4.tar.gz debian_htop-f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4.tar.bz2 debian_htop-f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4.zip |
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'CheckItem.c')
-rw-r--r-- | CheckItem.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/CheckItem.c b/CheckItem.c index b7ba6fe..a045d2f 100644 --- a/CheckItem.c +++ b/CheckItem.c @@ -35,12 +35,11 @@ static void CheckItem_delete(Object* cast) { static void CheckItem_display(Object* cast, RichString* out) { CheckItem* this = (CheckItem*)cast; assert (this != NULL); - RichString_write(out, CRT_colors[CHECK_BOX], "["); if (CheckItem_get(this)) - RichString_append(out, CRT_colors[CHECK_MARK], "x"); + RichString_append(out, CRT_colors[CHECK_MARK], CRT_checkStr[CHECK_STR_FULL]); else - RichString_append(out, CRT_colors[CHECK_MARK], " "); - RichString_append(out, CRT_colors[CHECK_BOX], "] "); + RichString_append(out, CRT_colors[CHECK_MARK], CRT_checkStr[CHECK_STR_NONE]); + RichString_append(out, CRT_colors[CHECK_TEXT], " "); RichString_append(out, CRT_colors[CHECK_TEXT], this->text); } @@ -66,14 +65,14 @@ CheckItem* CheckItem_newByVal(char* text, bool value) { } void CheckItem_set(CheckItem* this, bool value) { - if (this->ref) + if (this->ref) *(this->ref) = value; else this->value = value; } bool CheckItem_get(CheckItem* this) { - if (this->ref) + if (this->ref) return *(this->ref); else return this->value; |