mothra: add USERFL

front
cinap_lenrek 2011-11-06 15:33:59 +01:00
parent b4fb5e2384
commit 4da9e8aa4f
3 changed files with 5 additions and 3 deletions

View File

@ -344,7 +344,7 @@ void mkfieldpanel(Rtext *t){
f->p=plentry(0, 0, f->size*chrwidth, f->value, h_submittype);
break;
case PASSWD:
f->p=plentry(0, 1, f->size*chrwidth, f->value, h_submittype);
f->p=plentry(0, USERFL, f->size*chrwidth, f->value, h_submittype);
break;
case CHECK:
f->p=plcheckbutton(0, 0, "", h_checkinput);
@ -441,7 +441,7 @@ void h_resetinput(Panel *p, int){
plinitentry(f->p, 0, f->size*chrwidth, f->value, 0);
break;
case PASSWD:
plinitentry(f->p, 1, f->size*chrwidth, f->value, 0);
plinitentry(f->p, USERFL, f->size*chrwidth, f->value, 0);
break;
case CHECK:
case RADIO:

View File

@ -23,7 +23,7 @@ void pl_drawentry(Panel *p){
ep=p->data;
r=pl_box(p->b, p->r, p->state);
s=ep->entry;
if(p->flags & 1){
if(p->flags & USERFL){
char *p;
s=strdup(s);
for(p=s; *p; p++)

View File

@ -85,6 +85,8 @@ struct Panel{
#define MAXX 0x1000 /* make x size as big as biggest sibling's */
#define MAXY 0x2000 /* make y size as big as biggest sibling's */
#define BITMAP 0x4000 /* text argument is a bitmap, not a string */
#define USERFL 0x100000 /* user flag */
/*
* An extra bit in Mouse.buttons
*/