Clipping instead of ignoring for progressbar widget

FS#25
This commit is contained in:
Nikos Ntarmos 2008-01-07 09:29:11 +01:00 committed by Julien Danjou
parent 348440bc8e
commit 32163d80e1
1 changed files with 1 additions and 2 deletions

View File

@ -118,8 +118,7 @@ progressbar_tell(Widget *widget, char *command)
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) d->percent[i] = (percent < 0 ? 0 : (percent > 100 ? 100 : percent));
d->percent[i] = percent;
} }
} }