aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_play.c
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2005-02-13 22:04:03 +0000
committerKalle Wallin <kaw@linux.se>2005-02-13 22:04:03 +0000
commit86d464488b8fdaa9481401b056c5acee311fe1cb (patch)
tree9890b91d50af72c1710c71779436e80d8df3e40f /src/screen_play.c
parentb1a02a4b2223ae2e522c229983f5f54e4723ddc9 (diff)
downloadmpd-86d464488b8fdaa9481401b056c5acee311fe1cb.tar.gz
mpd-86d464488b8fdaa9481401b056c5acee311fe1cb.tar.xz
mpd-86d464488b8fdaa9481401b056c5acee311fe1cb.zip
Enable playlist saving on the browse screen
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2949 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/screen_play.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/screen_play.c b/src/screen_play.c
index cdb8320e8..b86c876de 100644
--- a/src/screen_play.c
+++ b/src/screen_play.c
@@ -114,8 +114,9 @@ center_playing_item(screen_t *screen, mpdclient_t *c)
return 0;
}
-static int
-handle_save_playlist(screen_t *screen, mpdclient_t *c, char *name)
+
+int
+playlist_save(screen_t *screen, mpdclient_t *c, char *name, char *defaultname)
{
gchar *filename;
gint error;
@@ -153,7 +154,7 @@ handle_save_playlist(screen_t *screen, mpdclient_t *c, char *name)
/* query the user for a filename */
filename = screen_readln(screen->status_window.w,
_("Save playlist as: "),
- NULL,
+ defaultname,
NULL,
gcmp);
@@ -192,7 +193,7 @@ handle_save_playlist(screen_t *screen, mpdclient_t *c, char *name)
g_free(filename);
return -1;
}
- error = handle_save_playlist(screen, c, filename);
+ error = playlist_save(screen, c, filename, NULL);
g_free(filename);
return error;
}
@@ -422,7 +423,7 @@ play_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
mpdclient_cmd_delete(c, lw->selected);
return 1;
case CMD_SAVE_PLAYLIST:
- handle_save_playlist(screen, c, NULL);
+ playlist_save(screen, c, NULL, NULL);
return 1;
case CMD_ADD:
handle_add_to_playlist(screen, c);