mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-26 21:30:17 +00:00
on, true and yes are now synonymous in messages
This commit is contained in:
parent
70d9b7a983
commit
0b3291d5f0
2 changed files with 5 additions and 2 deletions
|
@ -252,7 +252,6 @@ this currently works for the properties:
|
|||
* *icon_highlight_color*
|
||||
* *icon_padding_left*
|
||||
* *icon_padding_right*
|
||||
* *background_color*
|
||||
* *draws_background*
|
||||
* *background_color*
|
||||
* *background_border_color*
|
||||
|
|
|
@ -96,7 +96,11 @@ extern bool g_verbose;
|
|||
|
||||
|
||||
#define ARGUMENT_COMMON_VAL_ON "on"
|
||||
#define ARGUMENT_COMMON_VAL_TRUE "true"
|
||||
#define ARGUMENT_COMMON_VAL_YES "yes"
|
||||
#define ARGUMENT_COMMON_VAL_OFF "off"
|
||||
#define ARGUMENT_COMMON_VAL_FALSE "false"
|
||||
#define ARGUMENT_COMMON_VAL_NO "no"
|
||||
#define ARGUMENT_COMMON_VAL_TOGGLE "toggle"
|
||||
#define ARGUMENT_COMMON_NO_SPACE "nospace"
|
||||
|
||||
|
@ -198,7 +202,7 @@ static void pack_key_value_pair(char* cursor, char* key, char* value) {
|
|||
|
||||
|
||||
static bool evaluate_boolean_state(struct token state, bool previous_state) {
|
||||
if (token_equals(state, ARGUMENT_COMMON_VAL_ON)) return true;
|
||||
if (token_equals(state, ARGUMENT_COMMON_VAL_ON) || token_equals(state, ARGUMENT_COMMON_VAL_YES) || token_equals(state, ARGUMENT_COMMON_VAL_TRUE)) return true;
|
||||
else if (token_equals(state, ARGUMENT_COMMON_VAL_TOGGLE)) return !previous_state;
|
||||
else return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue