Mercurial > mplayer.hg
changeset 35349:60930e7347c6
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.
author | ib |
---|---|
date | Thu, 22 Nov 2012 13:13:29 +0000 |
parents | 3aba69339390 |
children | ee265b18d653 |
files | gui/ui/gtk/url.c gui/ui/main.c |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/ui/gtk/url.c Thu Nov 22 13:12:15 2012 +0000 +++ b/gui/ui/gtk/url.c Thu Nov 22 13:13:29 2012 +0000 @@ -103,6 +103,7 @@ listMgr( URLLIST_ITEM_ADD,item ); uiSetFileName( NULL,str,STREAMTYPE_STREAM ); guiInfo.NewPlay=GUI_FILE_NEW; + import_file_into_gui(str, 0); uiEventHandling( evPlay,0 ); } }
--- a/gui/ui/main.c Thu Nov 22 13:12:15 2012 +0000 +++ b/gui/ui/main.c Thu Nov 22 13:13:29 2012 +0000 @@ -141,6 +141,7 @@ break; case evLoadURL: + listMgr( PLAYLIST_DELETE,0 ); gtkShow( evLoadURL,NULL ); break; @@ -208,7 +209,7 @@ 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 );