[awesome-menu] Add support for empty prompt
This commit is contained in:
parent
1fb61f54df
commit
a5f0df0c95
|
@ -144,7 +144,7 @@ config_parse(const char *confpatharg, const char *menu_title, Area *geometry)
|
|||
if(ret)
|
||||
return ret;
|
||||
|
||||
if(!(cfg_menu = cfg_gettsec(cfg, "menu", menu_title)))
|
||||
if(menu_title && !(cfg_menu = cfg_gettsec(cfg, "menu", menu_title)))
|
||||
warn("no definition for menu %s in configuration file: using default\n", menu_title);
|
||||
|
||||
/* get global screen section */
|
||||
|
@ -353,6 +353,8 @@ redraw(void)
|
|||
geometry.width = globalconf.sw->geometry.width;
|
||||
geometry.height = globalconf.sw->geometry.height;
|
||||
|
||||
if(a_strlen(globalconf.prompt))
|
||||
{
|
||||
draw_text(globalconf.ctx, geometry, AlignLeft,
|
||||
MARGIN, globalconf.font, globalconf.prompt,
|
||||
globalconf.shadow_offset,
|
||||
|
@ -361,6 +363,7 @@ redraw(void)
|
|||
len = MARGIN * 2 + draw_textwidth(globalconf.display, globalconf.font, globalconf.prompt);
|
||||
geometry.x += len;
|
||||
geometry.width -= len;
|
||||
}
|
||||
|
||||
draw_text(globalconf.ctx, geometry, AlignLeft,
|
||||
MARGIN, globalconf.font, globalconf.text,
|
||||
|
|
Loading…
Reference in New Issue