aboutsummaryrefslogtreecommitdiffstats
path: root/CheckItem.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:01:07 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:01:07 +0200
commitff9409b1737627857eb47f64f536a3f66b6a09a4 (patch)
tree61b631ba551e68a4f656b8b76ff7bd0d9955fc64 /CheckItem.c
parentf75ab6d2c11e8a8e18191b087564aedebbeb96c5 (diff)
downloaddebian_htop-ff9409b1737627857eb47f64f536a3f66b6a09a4.tar.gz
debian_htop-ff9409b1737627857eb47f64f536a3f66b6a09a4.tar.bz2
debian_htop-ff9409b1737627857eb47f64f536a3f66b6a09a4.zip
Imported Upstream version 2.0.0upstream/2.0.0
Diffstat (limited to 'CheckItem.c')
-rw-r--r--CheckItem.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/CheckItem.c b/CheckItem.c
index ea83e6f..b7ba6fe 100644
--- a/CheckItem.c
+++ b/CheckItem.c
@@ -49,14 +49,22 @@ ObjectClass CheckItem_class = {
.delete = CheckItem_delete
};
-CheckItem* CheckItem_new(char* text, bool* ref, bool value) {
+CheckItem* CheckItem_newByRef(char* text, bool* ref) {
CheckItem* this = AllocThis(CheckItem);
this->text = text;
- this->value = value;
+ this->value = false;
this->ref = ref;
return this;
}
+CheckItem* CheckItem_newByVal(char* text, bool value) {
+ CheckItem* this = AllocThis(CheckItem);
+ this->text = text;
+ this->value = value;
+ this->ref = NULL;
+ return this;
+}
+
void CheckItem_set(CheckItem* this, bool value) {
if (this->ref)
*(this->ref) = value;

© 2014-2024 Faster IT GmbH | imprint | privacy policy