diff options
author | okan <okan> | 2013-01-04 16:23:04 +0000 |
---|---|---|
committer | okan <okan> | 2013-01-04 16:23:04 +0000 |
commit | 698530155d0e76265fa85c24159d58eaaea9ef31 (patch) | |
tree | 78534e8ed354c052508a4c58c2b62405daa5b353 /conf.c | |
parent | c139df129c45eab966836e622c71deec821ba370 (diff) | |
download | cwm-698530155d0e76265fa85c24159d58eaaea9ef31.tar.gz cwm-698530155d0e76265fa85c24159d58eaaea9ef31.tar.xz cwm-698530155d0e76265fa85c24159d58eaaea9ef31.zip |
get rid of struct color
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/conf.c b/conf.c index f583f78..b9f5bce 100644 --- a/conf.c +++ b/conf.c @@ -71,11 +71,11 @@ static char *menu_color_binds[CWM_COLOR_MENU_MAX] = { "", /* CWM_COLOR_MENU_FONT_SEL */ }; -static struct color color_binds[CWM_COLOR_MAX] = { - { "#CCCCCC", 0 }, /* CWM_COLOR_BORDER_ACTIVE */ - { "#666666", 0 }, /* CWM_COLOR_BORDER_INACTIVE */ - { "blue", 0 }, /* CWM_COLOR_BORDER_GROUP */ - { "red", 0 }, /* CWM_COLOR_BORDER_UNGROUP */ +static char *color_binds[CWM_COLOR_MAX] = { + "#CCCCCC", /* CWM_COLOR_BORDER_ACTIVE */ + "#666666", /* CWM_COLOR_BORDER_INACTIVE */ + "blue", /* CWM_COLOR_BORDER_GROUP */ + "red", /* CWM_COLOR_BORDER_UNGROUP */ }; void @@ -84,7 +84,7 @@ conf_color(struct conf *c, struct screen_ctx *sc) int i; for (i = 0; i < CWM_COLOR_MAX; i++) - sc->color[i].pixel = xu_getcolor(sc, c->color[i].name); + sc->color[i] = xu_getcolor(sc, c->color[i]); } static struct { @@ -184,7 +184,7 @@ conf_init(struct conf *c) conf_mousebind(c, m_binds[i].key, m_binds[i].func); for (i = 0; i < nitems(color_binds); i++) - c->color[i].name = xstrdup(color_binds[i].name); + c->color[i] = xstrdup(color_binds[i]); for (i = 0; i < nitems(menu_color_binds); i++) c->menucolor[i] = xstrdup(menu_color_binds[i]); @@ -237,7 +237,7 @@ conf_clear(struct conf *c) } for (i = 0; i < CWM_COLOR_MAX; i++) - free(c->color[i].name); + free(c->color[i]); free(c->font); } |