diff --git a/src/EditPlaylistPage.cxx b/src/EditPlaylistPage.cxx index 3bae7b79..703b049d 100644 --- a/src/EditPlaylistPage.cxx +++ b/src/EditPlaylistPage.cxx @@ -273,7 +273,7 @@ EditPlaylistPage::OnCommand(struct mpdclient &c, Command cmd) return HandleDelete(c); case Command::SAVE_PLAYLIST: - //playlist_save(&c, nullptr, nullptr); + //playlist_save(screen, c, nullptr); // TODO return true; diff --git a/src/FileBrowserPage.cxx b/src/FileBrowserPage.cxx index 97f19c85..57b69b90 100644 --- a/src/FileBrowserPage.cxx +++ b/src/FileBrowserPage.cxx @@ -210,10 +210,9 @@ FileBrowserPage::HandleSave(struct mpdclient &c) noexcept } if(defaultname) - playlist_save(screen, c, nullptr, - Utf8ToLocaleZ{defaultname}.c_str()); + playlist_save(screen, c, Utf8ToLocaleZ{defaultname}.c_str()); else - playlist_save(screen, c, nullptr, nullptr); + playlist_save(screen, c, nullptr); } void diff --git a/src/QueuePage.cxx b/src/QueuePage.cxx index 81c55c15..de5bd08a 100644 --- a/src/QueuePage.cxx +++ b/src/QueuePage.cxx @@ -624,7 +624,7 @@ QueuePage::OnCommand(struct mpdclient &c, Command cmd) } case Command::SAVE_PLAYLIST: - playlist_save(screen, c, nullptr, nullptr); + playlist_save(screen, c, nullptr); return true; case Command::ADD: diff --git a/src/save_playlist.cxx b/src/save_playlist.cxx index 13c167dc..81755716 100644 --- a/src/save_playlist.cxx +++ b/src/save_playlist.cxx @@ -54,8 +54,7 @@ PlaylistNameCompletion::Post([[maybe_unused]] std::string_view value, int playlist_save(ScreenManager &screen, struct mpdclient &c, - const char *name, - const char *defaultname) noexcept + const char *name) noexcept { std::string filename; @@ -70,7 +69,7 @@ playlist_save(ScreenManager &screen, struct mpdclient &c, /* query the user for a filename */ filename = screen_readln(screen, _("Save queue as"), - defaultname, + nullptr, nullptr, completion); if (filename.empty()) diff --git a/src/save_playlist.hxx b/src/save_playlist.hxx index dbac0d92..ab60bd9b 100644 --- a/src/save_playlist.hxx +++ b/src/save_playlist.hxx @@ -1,15 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later // Copyright The Music Player Daemon Project -#ifndef SAVE_PLAYLIST_H -#define SAVE_PLAYLIST_H +#pragma once class ScreenManager; struct mpdclient; int playlist_save(ScreenManager &screen, struct mpdclient &c, - const char *name, - const char *defaultname) noexcept; - -#endif + const char *name) noexcept;