diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2011-07-21 06:40:21 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2011-07-21 06:40:21 +0000 |
commit | d1fd4f08f56f6dd46b26b1f41baff425ca71d498 (patch) | |
tree | 5b0c1a13cb85cc9e6e42b024877f719ec0f0d913 /apps/playlist_viewer.c | |
parent | a7c37ea2d04c35628fc1ca9d353df637612303d0 (diff) |
Fix FS#8656 - Error saving non-current playlist file
Use the plugin buffer to save the playlist copy if there isnt enough buffer already allocated to the inram copy of the playlist
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30184 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist_viewer.c')
-rw-r--r-- | apps/playlist_viewer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index f1ed0ac0fd..940a6d77dc 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c @@ -48,6 +48,7 @@ #include "list.h" #include "splash.h" #include "playlist_menu.h" +#include "yesno.h" /* Maximum number of tracks we can have loaded at one time */ #define MAX_PLAYLIST_ENTRIES 200 @@ -634,6 +635,7 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename) enum playlist_viewer_result ret = PLAYLIST_VIEWER_OK; bool exit = false; /* exit viewer */ int button; + bool dirty = false; struct gui_synclist playlist_lists; if (!playlist_viewer_init(&viewer, filename, false)) goto exit; @@ -729,6 +731,7 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename) update_playlist(true); viewer.moving_track = -1; viewer.moving_playlist_index = -1; + dirty = true; } else if (!viewer.playlist) { @@ -784,6 +787,7 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename) exit = true; if (viewer.selected_track >= viewer.num_tracks) viewer.selected_track = viewer.num_tracks-1; + dirty = true; } gui_synclist_draw(&playlist_lists); break; @@ -803,7 +807,11 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename) exit: if (viewer.playlist) + { + if(dirty && yesno_pop(ID2P(LANG_SAVE_CHANGES))) + save_playlist_screen(viewer.playlist); playlist_close(viewer.playlist); + } return ret; } |