change warn() message and use simply , as strtok delimiter
This commit is contained in:
parent
bb06e80199
commit
c4b4a1fded
|
@ -111,7 +111,7 @@ progressbar_tell(Widget *widget, char *command)
|
||||||
if(!command || !d->bars)
|
if(!command || !d->bars)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (tok = strtok(command, ", "); tok && i < d->bars; tok = strtok(NULL, ", "), i++)
|
for (tok = strtok(command, ","); tok && i < d->bars; tok = strtok(NULL, ","), i++)
|
||||||
{
|
{
|
||||||
percent = atoi(tok);
|
percent = atoi(tok);
|
||||||
if(percent <= 100 && percent >= 0)
|
if(percent <= 100 && percent >= 0)
|
||||||
|
@ -138,7 +138,7 @@ progressbar_new(Statusbar *statusbar, cfg_t *config)
|
||||||
|
|
||||||
if(!(d->bars = cfg_size(config, "bar")))
|
if(!(d->bars = cfg_size(config, "bar")))
|
||||||
{
|
{
|
||||||
warn("A progressbar-widget needs a: bar {} in the .awesomerc\n");
|
warn("progressbar widget needs at least one bar section\n");
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue