Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: VDR Plugin System - First Step
On 09 May 2002 Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote:
> I suggest that the authors of VDR patches try to implement the "command line",
> "menu", "setup" and "i18n" parts of their patches, using the new plugin features, and
> let me know which remaining functions they would still need to patch VDR
> source files for. What I already am planning to implement are generalized
Just had a quick view at the documentation. Sounds goods. I
haven't created any code until now, but I see something missing
for me: you cannot insert a listobject in the middle of a list. I
would suggest:
void cListObject::Insert(cListObject *Object)
{
if(next) { // Allow inserting an object in the middle of the list
next->prev = Object;
Object->next = next;
}
Append(Object);
}
void cListBase::Add(cListObject *Object, cListObject *AfterThis)
{
if (lastObject) {
if(AfterThis) { AfterThis->Insert(Object); return; }
lastObject->Append(Object);
}
else
objects = Object;
lastObject = Object;
}
with the declaration (for default behaviour):
void Add(cListObject *Object, cListObject *AfterThis=NULL);
And for the MenuItem handling (to add an item below the current):
void cOsdMenu::Insert(cOsdItem *Item, bool Current)
{
cList<cOsdItem>::Add(Item,Get(current));
if (Current)
current = Item->Index();
}
--
Stefan Huelswitt
huels@iname.com | http://home.pages.de/~nathan
Home |
Main Index |
Thread Index