Mercurial > mplayer.hg
comparison Gui/interface.c @ 7092:8e9607c5897e
- warning fixes from Dominik Mierzejewski <dominik@rangers.eu.org>
- wsXDNDProcessSelection return Truae fix
- add url list saving support from Morten Volden <mvolden@tdcadsl.dk>
- fix bug's in this patches
- fix some memleak and bug
author | pontscho |
---|---|
date | Mon, 26 Aug 2002 22:20:58 +0000 |
parents | e37a67d5e117 |
children | b65b78640d49 |
comparison
equal
deleted
inserted
replaced
7091:2459fcc7baaf | 7092:8e9607c5897e |
---|---|
553 | 553 |
554 plItem * plCurrent = NULL; | 554 plItem * plCurrent = NULL; |
555 plItem * plList = NULL; | 555 plItem * plList = NULL; |
556 plItem * plLastPlayed = NULL; | 556 plItem * plLastPlayed = NULL; |
557 | 557 |
558 URLItem *URLList = NULL; | |
559 | |
558 #if defined( MP_DEBUG ) && 0 | 560 #if defined( MP_DEBUG ) && 0 |
559 void list( void ) | 561 void list( void ) |
560 { | 562 { |
561 plItem * next = plList; | 563 plItem * next = plList; |
562 printf( "--- list ---\n" ); | 564 printf( "--- list ---\n" ); |
575 { | 577 { |
576 mp_cmd_t * mp_cmd; | 578 mp_cmd_t * mp_cmd; |
577 equalizer_t * eq = (equalizer_t *)vparam; | 579 equalizer_t * eq = (equalizer_t *)vparam; |
578 plItem * item = (plItem *)vparam; | 580 plItem * item = (plItem *)vparam; |
579 | 581 |
582 URLItem * url_item = (URLItem *)vparam; | |
583 int is_added = True; | |
584 | |
580 switch ( cmd ) | 585 switch ( cmd ) |
581 { | 586 { |
582 // --- handle playlist | 587 // --- handle playlist |
583 case gtkAddPlItem: // add item to playlist | 588 case gtkAddPlItem: // add item to playlist |
584 if ( plList ) | 589 if ( plList ) |
585 { | 590 { |
586 plItem * next = plList; | 591 plItem * next = plList; |
587 while ( next->next ) { /*printf( "%s\n",next->name );*/ next=next->next; } | 592 while ( next->next ) { /*printf( "%s\n",next->name );*/ next=next->next; } |
588 next->next=item; item->prev=next; | 593 next->next=item; item->prev=next; |
589 } | 594 } else { item->prev=item->next=NULL; plCurrent=plList=item; } |
590 else { item->prev=item->next=NULL; plCurrent=plList=item; } | |
591 list(); | 595 list(); |
592 return NULL; | 596 return NULL; |
593 case gtkGetNextPlItem: // get current item from playlist | 597 case gtkGetNextPlItem: // get current item from playlist |
594 if ( plCurrent ) | 598 if ( plCurrent ) |
595 { | 599 { |
636 } | 640 } |
637 } | 641 } |
638 plList=NULL; plCurrent=NULL; | 642 plList=NULL; plCurrent=NULL; |
639 } | 643 } |
640 return NULL; | 644 return NULL; |
645 // ----- Handle url | |
646 case gtkAddURLItem: | |
647 if ( URLList ) | |
648 { | |
649 URLItem * next_url = URLList; | |
650 is_added = False; | |
651 while ( next_url->next ) | |
652 { | |
653 if ( !gstrcmp( next_url->url,url_item->url ) ) | |
654 { | |
655 is_added=True; | |
656 break; | |
657 } | |
658 next_url=next_url->next; | |
659 } | |
660 if ( ( !is_added )&&( gstrcmp( next_url->url,url_item->url ) ) ) next_url->next=url_item; | |
661 } else { url_item->next=NULL; URLList=url_item; } | |
662 return NULL; | |
641 // --- subtitle | 663 // --- subtitle |
642 case gtkSetSubAuto: | 664 case gtkSetSubAuto: |
643 sub_auto=(int)fparam; | 665 sub_auto=(int)fparam; |
644 return NULL; | 666 return NULL; |
645 case gtkSetSubDelay: | 667 case gtkSetSubDelay: |