use list function for Widget

This commit is contained in:
Julien Danjou 2008-01-12 21:35:44 +01:00
parent 19887a3201
commit a823470fd0
2 changed files with 5 additions and 8 deletions

View File

@ -271,13 +271,8 @@ create_widgets(cfg_t* cfg_statusbar, Statusbar *statusbar)
widget_new = name_func_lookup(cfg_name(wptr), WidgetList);
if(widget_new)
{
if(!widget)
statusbar->widgets = widget = widget_new(statusbar, wptr);
else
{
widget->next = widget_new(statusbar, wptr);
widget = widget->next;
}
widget = widget_new(statusbar, wptr);
widget_list_append(&statusbar->widgets, widget);
widget->buttons = parse_mouse_bindings(wptr, "mouse", a_strcmp(cfg_name(wptr), "taglist"));
}
else

View File

@ -132,6 +132,8 @@ struct Widget
Widget *next;
};
DO_SLIST(Widget, widget, p_delete);
/** Status bar */
struct Statusbar
{