mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
[widgets] allow NULL for 'command' (FS#175)
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
62e3eb758b
commit
ce17b1457e
4 changed files with 9 additions and 3 deletions
2
widget.c
2
widget.c
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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, " ");
|
||||
|
|
|
@ -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"))
|
||||
{
|
||||
|
|
|
@ -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, " ");
|
||||
|
|
Loading…
Reference in a new issue