widget: add compatibility code for taglist and tasklist widgets

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-11-05 11:20:54 +01:00
parent de4ebf907e
commit 6b386def45
1 changed files with 10 additions and 1 deletions

View File

@ -377,7 +377,16 @@ luaA_widget_new(lua_State *L)
type = luaA_getopt_string(L, 2, "type", NULL);
if((wc = name_func_lookup(type, WidgetList)))
/* deprecated, compatibility code */
if(!a_strcmp(type, "tasklist")
|| !a_strcmp(type, "taglist"))
{
deprecate();
luaA_warn(L, "requesting old widgets, return a table to allow smooth execution\n");
lua_newtable(L);
return 1;
}
else if((wc = name_func_lookup(type, WidgetList)))
w = wc(align);
else
{