# HG changeset patch # User ib # Date 1353593623 0 # Node ID 96cda43fe250c4a1aff406943110c5257868e3f1 # Parent 92f6fc87ddc81eb60da035b02181c87087f91019 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. diff -r 92f6fc87ddc8 -r 96cda43fe250 gui/ui/gtk/fileselect.c --- 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); } diff -r 92f6fc87ddc8 -r 96cda43fe250 gui/ui/gtk/url.c --- 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 ); } diff -r 92f6fc87ddc8 -r 96cda43fe250 gui/ui/main.c --- 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;