static void on_add_new_playlist1_activate (GtkMenuItem *menuitem, gpointer user_data) { int playlist = gtkui_add_new_playlist (); if (playlist != -1) { gtkui_playlist_set_curr (playlist); } }
static void clipboard_activate_dest_playlist (const char *pdata, ddb_playlist_t *plt, int ctx) { if (plt == NULL) { // no playlist set, use current one deadbeef->plt_set_curr (plt); return; } clipboard_data_context_t *clip_ctx = (clipboard_data_context_t *)pdata; if (ctx == DDB_ACTION_CTX_PLAYLIST) { int playlist = -1; if (clip_ctx && clip_ctx->plt_title) { int cnt = deadbeef->plt_get_count (); playlist = deadbeef->plt_add (cnt, clip_ctx->plt_title); } else { playlist = gtkui_add_new_playlist (); } if (playlist != -1) { gtkui_playlist_set_curr (playlist); } } }