[widgets] allow NULL for 'command' (FS#175)
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
62e3eb758b
commit
ce17b1457e
2
widget.c
2
widget.c
|
@ -222,7 +222,7 @@ uicb_widget_tell(int screen, char *arg)
|
||||||
p_delete(&command);
|
p_delete(&command);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
status = WIDGET_ERROR_NOVALUE;
|
status = widget->tell(widget, property, NULL);
|
||||||
|
|
||||||
switch(status)
|
switch(status)
|
||||||
{
|
{
|
||||||
|
|
|
@ -285,6 +285,9 @@ graph_tell(Widget *widget, char *property, char *command)
|
||||||
if(!d->data_items)
|
if(!d->data_items)
|
||||||
return WIDGET_ERROR_CUSTOM; /* error already printed on _new */
|
return WIDGET_ERROR_CUSTOM; /* error already printed on _new */
|
||||||
|
|
||||||
|
if(command == NULL)
|
||||||
|
return WIDGET_ERROR_NOVALUE;
|
||||||
|
|
||||||
if(!a_strcmp(property, "data"))
|
if(!a_strcmp(property, "data"))
|
||||||
{
|
{
|
||||||
title = strtok(command, " ");
|
title = strtok(command, " ");
|
||||||
|
|
|
@ -70,8 +70,8 @@ iconbox_tell(Widget *widget, char *property, char *command)
|
||||||
Bool b;
|
Bool b;
|
||||||
Data *d = widget->data;
|
Data *d = widget->data;
|
||||||
|
|
||||||
if(!property || !command)
|
if(command == NULL)
|
||||||
return WIDGET_ERROR;
|
return WIDGET_ERROR_NOVALUE;
|
||||||
|
|
||||||
if(!a_strcmp(property, "image"))
|
if(!a_strcmp(property, "image"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -393,6 +393,9 @@ progressbar_tell(Widget *widget, char *property, char *command)
|
||||||
if(!d->data_items)
|
if(!d->data_items)
|
||||||
return WIDGET_ERROR_CUSTOM; /* error already printed on _new */
|
return WIDGET_ERROR_CUSTOM; /* error already printed on _new */
|
||||||
|
|
||||||
|
if(command == NULL)
|
||||||
|
return WIDGET_ERROR_NOVALUE;
|
||||||
|
|
||||||
if(!a_strcmp(property, "data"))
|
if(!a_strcmp(property, "data"))
|
||||||
{
|
{
|
||||||
title = strtok(command, " ");
|
title = strtok(command, " ");
|
||||||
|
|
Loading…
Reference in New Issue