Changeset 5695

Show
Ignore:
Timestamp:
02/28/10 18:44:28 (3 years ago)
Author:
blogic
Message:

make widget instances register as references to the widget. this will later on allow do dorp and reload widgets

Location:
luci2/cbi2
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • luci2/cbi2/cbi.c

    r5694 r5695  
    166166    if(!(e->w)) 
    167167        return 1; 
     168    list_add_tail(&e->widget_ref, &e->w->refs); 
    168169    if(widget_find_prop(e->w, "id")) 
    169170        cbi_gen_default_id(e, count); 
     
    567568        } 
    568569    } 
    569 /*  printf("\nglobals:\n"); 
    570     cbi_dump_list(&ctx->globals); 
    571     printf("\npagess:\n"); 
    572     cbi_dump_list(&ctx->pages);*/ 
    573570} 
    574571 
  • luci2/cbi2/cbi.h

    r5694 r5695  
    8181{ 
    8282    struct list_head list; 
     83    struct list_head refs; 
    8384    char *name; 
    8485    uint64_t caps; 
     
    101102    struct list_head properties; 
    102103    struct list_head index; 
     104    struct list_head widget_ref; 
    103105 
    104106    int broken; 
     
    146148    { \ 
    147149        if(!widget.name) widget.name = strdup(#widget); \ 
     150        INIT_LIST_HEAD(&widget.refs); \ 
    148151        cbi_widget_register(#widget, & widget); \ 
    149152    }