Reformat alignment enum
This commit is contained in:
parent
bbbddad3a7
commit
2a5fe938f6
2
config.h
2
config.h
@ -32,7 +32,7 @@ struct settings defaults = {
|
||||
.indicate_hidden = true, /* show count of hidden messages */
|
||||
.idle_threshold = 0, /* don't timeout notifications when idle for x seconds */
|
||||
.show_age_threshold = -1, /* show age of notification, when notification is older than x seconds */
|
||||
.align = left, /* text alignment [left/center/right] */
|
||||
.align = ALIGN_LEFT, /* text alignment ALIGN_[LEFT|CENTER|RIGHT] */
|
||||
.sticky_history = true,
|
||||
.history_length = 20, /* max amount of notifications kept in history */
|
||||
.show_indicators = true,
|
||||
|
@ -120,14 +120,14 @@ static void layout_setup_pango(PangoLayout *layout, int width)
|
||||
|
||||
PangoAlignment align;
|
||||
switch (settings.align) {
|
||||
case left:
|
||||
case ALIGN_LEFT:
|
||||
default:
|
||||
align = PANGO_ALIGN_LEFT;
|
||||
break;
|
||||
case center:
|
||||
case ALIGN_CENTER:
|
||||
align = PANGO_ALIGN_CENTER;
|
||||
break;
|
||||
case right:
|
||||
case ALIGN_RIGHT:
|
||||
align = PANGO_ALIGN_RIGHT;
|
||||
break;
|
||||
}
|
||||
|
@ -320,11 +320,11 @@ void load_settings(char *cmdline_config_path)
|
||||
|
||||
if (strlen(c) > 0) {
|
||||
if (strcmp(c, "left") == 0)
|
||||
settings.align = left;
|
||||
settings.align = ALIGN_LEFT;
|
||||
else if (strcmp(c, "center") == 0)
|
||||
settings.align = center;
|
||||
settings.align = ALIGN_CENTER;
|
||||
else if (strcmp(c, "right") == 0)
|
||||
settings.align = right;
|
||||
settings.align = ALIGN_RIGHT;
|
||||
else
|
||||
LOG_W("Unknown alignment value: '%s'", c);
|
||||
g_free(c);
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include "x11/x.h"
|
||||
|
||||
enum alignment { left, center, right };
|
||||
enum alignment { ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT };
|
||||
enum ellipsize { start, middle, end };
|
||||
enum icon_position_t { icons_left, icons_right, icons_off };
|
||||
enum separator_color { SEP_FOREGROUND, SEP_AUTO, SEP_FRAME, SEP_CUSTOM };
|
||||
|
Loading…
x
Reference in New Issue
Block a user