[widgets] allow NULL for 'command' (FS#175)

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
marco candrian 2008-04-23 05:35:55 +02:00 committed by Julien Danjou
parent 62e3eb758b
commit ce17b1457e
4 changed files with 9 additions and 3 deletions

View file

@ -222,7 +222,7 @@ uicb_widget_tell(int screen, char *arg)
p_delete(&command);
}
else
status = WIDGET_ERROR_NOVALUE;
status = widget->tell(widget, property, NULL);
switch(status)
{

View file

@ -285,6 +285,9 @@ graph_tell(Widget *widget, char *property, char *command)
if(!d->data_items)
return WIDGET_ERROR_CUSTOM; /* error already printed on _new */
if(command == NULL)
return WIDGET_ERROR_NOVALUE;
if(!a_strcmp(property, "data"))
{
title = strtok(command, " ");

View file

@ -70,8 +70,8 @@ iconbox_tell(Widget *widget, char *property, char *command)
Bool b;
Data *d = widget->data;
if(!property || !command)
return WIDGET_ERROR;
if(command == NULL)
return WIDGET_ERROR_NOVALUE;
if(!a_strcmp(property, "image"))
{

View file

@ -393,6 +393,9 @@ progressbar_tell(Widget *widget, char *property, char *command)
if(!d->data_items)
return WIDGET_ERROR_CUSTOM; /* error already printed on _new */
if(command == NULL)
return WIDGET_ERROR_NOVALUE;
if(!a_strcmp(property, "data"))
{
title = strtok(command, " ");