[MPlayer-cvslog] r35443 - in trunk/gui/ui: gtk/url.c main.c

ib subversion at mplayerhq.hu
Thu Nov 22 14:13:29 CET 2012


Author: ib
Date: Thu Nov 22 14:13:29 2012
New Revision: 35443

Log:
Add an URL loaded by the GUI to its playlist.

Additionally, allow URLs to be in the playlist.

The GUI operates on its playlist, so the URL may not be missing there.

For further information see r35442.

Modified:
   trunk/gui/ui/gtk/url.c
   trunk/gui/ui/main.c

Modified: trunk/gui/ui/gtk/url.c
==============================================================================
--- trunk/gui/ui/gtk/url.c	Thu Nov 22 14:12:15 2012	(r35442)
+++ trunk/gui/ui/gtk/url.c	Thu Nov 22 14:13:29 2012	(r35443)
@@ -103,6 +103,7 @@ static void on_Button_pressed( GtkButton
      listMgr( URLLIST_ITEM_ADD,item );
 
      uiSetFileName( NULL,str,STREAMTYPE_STREAM ); guiInfo.NewPlay=GUI_FILE_NEW;
+     import_file_into_gui(str, 0);
      uiEventHandling( evPlay,0 );
     }
   }

Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c	Thu Nov 22 14:12:15 2012	(r35442)
+++ trunk/gui/ui/main.c	Thu Nov 22 14:13:29 2012	(r35443)
@@ -141,6 +141,7 @@ void uiEventHandling( int msg,float para
         break;
 
    case evLoadURL:
+        listMgr( PLAYLIST_DELETE,0 );
         gtkShow( evLoadURL,NULL );
 	break;
 
@@ -208,7 +209,7 @@ play:
 
         if ( ( msg == evPlaySwitchToPause )&&( guiInfo.Playing == GUI_PAUSE ) ) goto NoPause;
 
-	if ( listMgr( PLAYLIST_ITEM_GET_CURR,0 ) &&( guiInfo.StreamType == STREAMTYPE_FILE ) )
+	if ( listMgr( PLAYLIST_ITEM_GET_CURR,0 ) &&( guiInfo.StreamType == STREAMTYPE_FILE || guiInfo.StreamType == STREAMTYPE_STREAM ) )
 	 {
 	  plItem * next = listMgr( PLAYLIST_ITEM_GET_CURR,0 );
 	  uiSetFileName( next->path,next->name,SAME_STREAMTYPE );


More information about the MPlayer-cvslog mailing list