summaryrefslogtreecommitdiffstats
path: root/Gui/interface.c
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-26 22:20:58 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-26 22:20:58 +0000
commit452e7bdc03546c71d2d9ebffbcd254b5842e052d (patch)
tree47cae3fbb2656e04c14894d1bea04b7add05fdee /Gui/interface.c
parentc39611bbe90b79a9e17ffe4ff95a4c1a058eba92 (diff)
downloadmpv-452e7bdc03546c71d2d9ebffbcd254b5842e052d.tar.bz2
mpv-452e7bdc03546c71d2d9ebffbcd254b5842e052d.tar.xz
- 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 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7093 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/interface.c')
-rw-r--r--Gui/interface.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/Gui/interface.c b/Gui/interface.c
index 64a4139bc1..9caf1a245a 100644
--- a/Gui/interface.c
+++ b/Gui/interface.c
@@ -555,6 +555,8 @@ plItem * plCurrent = NULL;
plItem * plList = NULL;
plItem * plLastPlayed = NULL;
+URLItem *URLList = NULL;
+
#if defined( MP_DEBUG ) && 0
void list( void )
{
@@ -577,6 +579,9 @@ void * gtkSet( int cmd,float fparam, void * vparam )
equalizer_t * eq = (equalizer_t *)vparam;
plItem * item = (plItem *)vparam;
+ URLItem * url_item = (URLItem *)vparam;
+ int is_added = True;
+
switch ( cmd )
{
// --- handle playlist
@@ -586,8 +591,7 @@ void * gtkSet( int cmd,float fparam, void * vparam )
plItem * next = plList;
while ( next->next ) { /*printf( "%s\n",next->name );*/ next=next->next; }
next->next=item; item->prev=next;
- }
- else { item->prev=item->next=NULL; plCurrent=plList=item; }
+ } else { item->prev=item->next=NULL; plCurrent=plList=item; }
list();
return NULL;
case gtkGetNextPlItem: // get current item from playlist
@@ -638,6 +642,24 @@ void * gtkSet( int cmd,float fparam, void * vparam )
plList=NULL; plCurrent=NULL;
}
return NULL;
+ // ----- Handle url
+ case gtkAddURLItem:
+ if ( URLList )
+ {
+ URLItem * next_url = URLList;
+ is_added = False;
+ while ( next_url->next )
+ {
+ if ( !gstrcmp( next_url->url,url_item->url ) )
+ {
+ is_added=True;
+ break;
+ }
+ next_url=next_url->next;
+ }
+ if ( ( !is_added )&&( gstrcmp( next_url->url,url_item->url ) ) ) next_url->next=url_item;
+ } else { url_item->next=NULL; URLList=url_item; }
+ return NULL;
// --- subtitle
case gtkSetSubAuto:
sub_auto=(int)fparam;