From c4eaec5b82a358d1b4f2d50e09bfa0021aa4733f Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 1 Apr 2008 08:20:59 +0200 Subject: [PATCH] [emptybox] Add alignment option Signed-off-by: Julien Danjou --- common/configopts.c | 2 ++ widgets/emptybox.c | 1 + 2 files changed, 3 insertions(+) diff --git a/common/configopts.c b/common/configopts.c index 2af53c43b..33982abef 100644 --- a/common/configopts.c +++ b/common/configopts.c @@ -324,6 +324,8 @@ cfg_opt_t widget_emptybox_opts[] = CFG_INT((char *) "x", 0xffffffff, CFGF_NONE), /** Y coordinate, do not set for auto. */ CFG_INT((char *) "y", 0xffffffff, CFGF_NONE), + /** Widget alignment. */ + CFG_ALIGNMENT((char *) "align", (char *) "auto", CFGF_NONE), /** Mouse bindings. */ CFG_SEC((char *) "mouse", mouse_generic_opts, CFGF_MULTI), /** Widget width. Set to 0 for auto. */ diff --git a/widgets/emptybox.c b/widgets/emptybox.c index d0f596352..6bfb290fa 100644 --- a/widgets/emptybox.c +++ b/widgets/emptybox.c @@ -57,6 +57,7 @@ emptybox_new(Statusbar *statusbar, cfg_t *config) w = p_new(Widget, 1); widget_common_new(w, statusbar, config); w->draw = emptybox_draw; + w->alignment = cfg_getalignment(config, "align"); w->data = d = p_new(Data, 1);