Check against MARKUP_NULL when checking if markup is set
Setting markup_mode to -1 might not work since in some implementations enum might not be signed. For convenience, add a new enum value `MARKUP_NULL` to serve the same purpose.
This commit is contained in:
parent
51d5e57967
commit
4d55ccb0ee
@ -15,7 +15,7 @@ void rule_apply(rule_t * r, notification * n)
|
||||
n->timeout = r->timeout;
|
||||
if (r->urgency != -1)
|
||||
n->urgency = r->urgency;
|
||||
if (r->markup != -1)
|
||||
if (r->markup != MARKUP_NULL)
|
||||
n->markup = r->markup;
|
||||
if (r->new_icon) {
|
||||
if(n->icon)
|
||||
@ -59,7 +59,7 @@ void rule_init(rule_t * r)
|
||||
r->msg_urgency = -1;
|
||||
r->timeout = -1;
|
||||
r->urgency = -1;
|
||||
r->markup = -1;
|
||||
r->markup = MARKUP_NULL;
|
||||
r->new_icon = NULL;
|
||||
r->fg = NULL;
|
||||
r->bg = NULL;
|
||||
|
@ -6,7 +6,7 @@ enum alignment { left, center, right };
|
||||
enum icon_position_t { icons_left, icons_right, icons_off };
|
||||
enum separator_color { FOREGROUND, AUTO, FRAME, CUSTOM };
|
||||
enum follow_mode { FOLLOW_NONE, FOLLOW_MOUSE, FOLLOW_KEYBOARD };
|
||||
enum markup_mode { MARKUP_NO, MARKUP_STRIP, MARKUP_FULL };
|
||||
enum markup_mode { MARKUP_NULL, MARKUP_NO, MARKUP_STRIP, MARKUP_FULL };
|
||||
|
||||
typedef struct _settings {
|
||||
bool print_notifications;
|
||||
|
Loading…
x
Reference in New Issue
Block a user