[emptybox] Add alignment option

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-04-01 08:20:59 +02:00
parent 841ce84ed9
commit c4eaec5b82
2 changed files with 3 additions and 0 deletions

View File

@ -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. */

View File

@ -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);