Reformat ellipsize enum
This commit is contained in:
parent
c5d552856f
commit
c712f57ace
2
config.h
2
config.h
@ -37,7 +37,7 @@ struct settings defaults = {
|
||||
.history_length = 20, /* max amount of notifications kept in history */
|
||||
.show_indicators = true,
|
||||
.word_wrap = false,
|
||||
.ellipsize = middle,
|
||||
.ellipsize = ELLIPSE_MIDDLE,
|
||||
.ignore_newline = false,
|
||||
.line_height = 0, /* if line height < font height, it will be raised to font height */
|
||||
.notification_height = 0, /* if notification height < font height and padding, it will be raised */
|
||||
|
@ -254,13 +254,13 @@ static struct colored_layout *layout_init_shared(cairo_t *c, const struct notifi
|
||||
if (!settings.word_wrap) {
|
||||
PangoEllipsizeMode ellipsize;
|
||||
switch (settings.ellipsize) {
|
||||
case start:
|
||||
case ELLIPSE_START:
|
||||
ellipsize = PANGO_ELLIPSIZE_START;
|
||||
break;
|
||||
case middle:
|
||||
case ELLIPSE_MIDDLE:
|
||||
ellipsize = PANGO_ELLIPSIZE_MIDDLE;
|
||||
break;
|
||||
case end:
|
||||
case ELLIPSE_END:
|
||||
ellipsize = PANGO_ELLIPSIZE_END;
|
||||
break;
|
||||
default:
|
||||
|
@ -219,11 +219,11 @@ void load_settings(char *cmdline_config_path)
|
||||
if (strlen(c) == 0) {
|
||||
settings.ellipsize = defaults.ellipsize;
|
||||
} else if (strcmp(c, "start") == 0) {
|
||||
settings.ellipsize = start;
|
||||
settings.ellipsize = ELLIPSE_START;
|
||||
} else if (strcmp(c, "middle") == 0) {
|
||||
settings.ellipsize = middle;
|
||||
settings.ellipsize = ELLIPSE_MIDDLE;
|
||||
} else if (strcmp(c, "end") == 0) {
|
||||
settings.ellipsize = end;
|
||||
settings.ellipsize = ELLIPSE_END;
|
||||
} else {
|
||||
LOG_W("Unknown ellipsize value: '%s'", c);
|
||||
settings.ellipsize = defaults.ellipsize;
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "x11/x.h"
|
||||
|
||||
enum alignment { ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT };
|
||||
enum ellipsize { start, middle, end };
|
||||
enum ellipsize { ELLIPSE_START, ELLIPSE_MIDDLE, ELLIPSE_END };
|
||||
enum icon_position { ICON_LEFT, ICON_RIGHT, ICON_OFF };
|
||||
enum separator_color { SEP_FOREGROUND, SEP_AUTO, SEP_FRAME, SEP_CUSTOM };
|
||||
enum follow_mode { FOLLOW_NONE, FOLLOW_MOUSE, FOLLOW_KEYBOARD };
|
||||
|
Loading…
x
Reference in New Issue
Block a user