Mercurial > mplayer.hg
changeset 35352:96cda43fe250
Don't unconditionally delete the old playlist.
On loading a new file or URL, only delete the old playlist if a new
file or URL has been selected. If the dialog has been cancelled, the
old playlist shall remain.
author | ib |
---|---|
date | Thu, 22 Nov 2012 14:13:43 +0000 |
parents | 92f6fc87ddc8 |
children | d59cf5c869f4 |
files | gui/ui/gtk/fileselect.c gui/ui/gtk/url.c gui/ui/main.c |
diffstat | 3 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/ui/gtk/fileselect.c Thu Nov 22 14:01:41 2012 +0000 +++ b/gui/ui/gtk/fileselect.c Thu Nov 22 14:13:43 2012 +0000 @@ -511,6 +511,7 @@ selected = g_strconcat(fsSelectedDirectory, "/", fsSelectedFile, NULL); if (selected) { + listMgr(PLAYLIST_DELETE, 0); add_to_gui_playlist(selected, PLAYLIST_ITEM_APPEND); g_free(selected); }
--- a/gui/ui/gtk/url.c Thu Nov 22 14:01:41 2012 +0000 +++ b/gui/ui/gtk/url.c Thu Nov 22 14:13:43 2012 +0000 @@ -103,6 +103,7 @@ listMgr( URLLIST_ITEM_ADD,item ); uiSetFileName( NULL,str,STREAMTYPE_STREAM ); guiInfo.NewPlay=GUI_FILE_NEW; + listMgr(PLAYLIST_DELETE, 0); add_to_gui_playlist(str, PLAYLIST_ITEM_APPEND); uiEventHandling( evPlay,0 ); }
--- a/gui/ui/main.c Thu Nov 22 14:01:41 2012 +0000 +++ b/gui/ui/main.c Thu Nov 22 14:13:43 2012 +0000 @@ -141,7 +141,6 @@ break; case evLoadURL: - listMgr( PLAYLIST_DELETE,0 ); gtkShow( evLoadURL,NULL ); break; @@ -272,7 +271,6 @@ uiMainAutoPlay=1; // guiInfo.StreamType=STREAMTYPE_FILE; case evLoad: - listMgr( PLAYLIST_DELETE,0 ); gtkShow( evLoad,NULL ); break; case evLoadSubtitle: gtkShow( evLoadSubtitle,NULL ); break;