/*
* ion/ioncore/infowin.h
*
- * Copyright (c) Tuomo Valkonen 1999-2008.
+ * Copyright (c) Tuomo Valkonen 1999-2009.
*
* See the included file LICENSE for details.
*/
{
bool set=FALSE;
- if(maxw>0 && p->brush!=NULL){
- char *tmp=grbrush_make_label(p->brush, str, maxw);
- if(tmp!=NULL){
- infowin_do_set_text(p, tmp);
- free(tmp);
- set=TRUE;
+ if(str==NULL){
+ INFOWIN_BUFFER(p)[0]='\0';
+ }else{
+ if(maxw>0 && p->brush!=NULL){
+ char *tmp=grbrush_make_label(p->brush, str, maxw);
+ if(tmp!=NULL){
+ infowin_do_set_text(p, tmp);
+ free(tmp);
+ set=TRUE;
+ }
}
+
+ if(!set)
+ infowin_do_set_text(p, str);
}
- if(!set)
- infowin_do_set_text(p, str);
-
infowin_resize(p);
/* sometimes unnecessary */