[vlc-devel] [PATCH] playlist: swipe away the category / onelevel mess -> singular item storage

Jakob Leben jakob.leben at gmail.com
Mon Feb 1 16:01:30 CET 2010


On Mon, Feb 1, 2010 at 3:47 PM, Jakob Leben <jakob.leben at gmail.com> wrote:

> On Mon, Feb 1, 2010 at 12:36 PM, Laurent Aimar <fenrir at via.ecp.fr> wrote:
>
>> Hi,
>>
>> On Mon, Feb 01, 2010, Jakob Leben wrote:
>> >    Hi all!
>> >
>> > +void input_item_BeginAddSubItems( input_item_t *p_item )
>> > +{
>> > +  vlc_event_t event;
>> > +  event.type = vlc_InputItemBeginAddSubItems;
>> > +  vlc_event_send( &p_item->event_manager, &event );
>> > +}
>> > +
>> > +void input_item_EndAddSubItems( input_item_t *p_item )
>> > +{
>> > +  vlc_event_t event;
>> > +  event.type = vlc_InputItemEndAddSubItems;
>> > +  vlc_event_send( &p_item->event_manager, &event );
>> > +}
>>
>>  They are a call to future bugs (way too easy to forget them
>> or to break when moving arround code).
>>
>
> Another idea was to have an event that reports for all the new children
> together, so modules should create an array and pass that in the event.
>

 in Qt, when you subclass QAbstractItemModel, you notify the view about new
items with beginInsert( ) and endInsert( ) calls, between which you actually
insert new items into the model. That is where I got the idea from. But ok,
copying is also not the best argument :)

So, do you propose to go the other way and have one event for all the
children grouped in an array?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100201/ca7254ee/attachment.html>


More information about the vlc-devel mailing list