use boost::bind instead of std::bind until boost placeholders are in separate namespace
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <cassert>
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/locale/conversion.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <algorithm>
|
||||
@@ -64,7 +65,6 @@
|
||||
# include "tag.h"
|
||||
#endif // HAVE_TAGLIB_H
|
||||
|
||||
using namespace std::placeholders;
|
||||
using Global::myScreen;
|
||||
|
||||
namespace {//
|
||||
@@ -625,14 +625,14 @@ void DeletePlaylistItems::run()
|
||||
if (myScreen == myPlaylist)
|
||||
{
|
||||
Statusbar::msg("Deleting items...");
|
||||
auto delete_fun = std::bind(&MPD::Connection::Delete, _1, _2);
|
||||
auto delete_fun = boost::bind(&MPD::Connection::Delete, _1, _2);
|
||||
deleteSelectedSongs(myPlaylist->main(), delete_fun);
|
||||
Statusbar::msg("Item(s) deleted");
|
||||
}
|
||||
else if (myScreen->isActiveWindow(myPlaylistEditor->Content))
|
||||
{
|
||||
std::string playlist = myPlaylistEditor->Playlists.current().value();
|
||||
auto delete_fun = std::bind(&MPD::Connection::PlaylistDelete, _1, playlist, _2);
|
||||
auto delete_fun = boost::bind(&MPD::Connection::PlaylistDelete, _1, playlist, _2);
|
||||
Statusbar::msg("Deleting items...");
|
||||
deleteSelectedSongs(myPlaylistEditor->Content, delete_fun);
|
||||
Statusbar::msg("Item(s) deleted");
|
||||
@@ -864,13 +864,13 @@ void MoveSelectedItemsUp::run()
|
||||
{
|
||||
if (myScreen == myPlaylist)
|
||||
{
|
||||
moveSelectedItemsUp(myPlaylist->main(), std::bind(&MPD::Connection::Move, _1, _2, _3));
|
||||
moveSelectedItemsUp(myPlaylist->main(), boost::bind(&MPD::Connection::Move, _1, _2, _3));
|
||||
}
|
||||
else if (myScreen == myPlaylistEditor)
|
||||
{
|
||||
assert(!myPlaylistEditor->Playlists.empty());
|
||||
std::string playlist = myPlaylistEditor->Playlists.current().value();
|
||||
auto move_fun = std::bind(&MPD::Connection::PlaylistMove, _1, playlist, _2, _3);
|
||||
auto move_fun = boost::bind(&MPD::Connection::PlaylistMove, _1, playlist, _2, _3);
|
||||
moveSelectedItemsUp(myPlaylistEditor->Content, move_fun);
|
||||
}
|
||||
}
|
||||
@@ -889,13 +889,13 @@ void MoveSelectedItemsDown::run()
|
||||
{
|
||||
if (myScreen == myPlaylist)
|
||||
{
|
||||
moveSelectedItemsDown(myPlaylist->main(), std::bind(&MPD::Connection::Move, _1, _2, _3));
|
||||
moveSelectedItemsDown(myPlaylist->main(), boost::bind(&MPD::Connection::Move, _1, _2, _3));
|
||||
}
|
||||
else if (myScreen == myPlaylistEditor)
|
||||
{
|
||||
assert(!myPlaylistEditor->Playlists.empty());
|
||||
std::string playlist = myPlaylistEditor->Playlists.current().value();
|
||||
auto move_fun = std::bind(&MPD::Connection::PlaylistMove, _1, playlist, _2, _3);
|
||||
auto move_fun = boost::bind(&MPD::Connection::PlaylistMove, _1, playlist, _2, _3);
|
||||
moveSelectedItemsDown(myPlaylistEditor->Content, move_fun);
|
||||
}
|
||||
}
|
||||
@@ -909,12 +909,12 @@ bool MoveSelectedItemsTo::canBeRun() const
|
||||
void MoveSelectedItemsTo::run()
|
||||
{
|
||||
if (myScreen == myPlaylist)
|
||||
moveSelectedItemsTo(myPlaylist->main(), std::bind(&MPD::Connection::Move, _1, _2, _3));
|
||||
moveSelectedItemsTo(myPlaylist->main(), boost::bind(&MPD::Connection::Move, _1, _2, _3));
|
||||
else
|
||||
{
|
||||
assert(!myPlaylistEditor->Playlists.empty());
|
||||
std::string playlist = myPlaylistEditor->Playlists.current().value();
|
||||
auto move_fun = std::bind(&MPD::Connection::PlaylistMove, _1, playlist, _2, _3);
|
||||
auto move_fun = boost::bind(&MPD::Connection::PlaylistMove, _1, playlist, _2, _3);
|
||||
moveSelectedItemsTo(myPlaylistEditor->Content, move_fun);
|
||||
}
|
||||
}
|
||||
@@ -992,7 +992,7 @@ void ToggleDisplayMode::run()
|
||||
|
||||
if (Config.columns_in_playlist)
|
||||
{
|
||||
myPlaylist->main().setItemDisplayer(std::bind(Display::SongsInColumns, _1, myPlaylist->proxySongList()));
|
||||
myPlaylist->main().setItemDisplayer(boost::bind(Display::SongsInColumns, _1, myPlaylist->proxySongList()));
|
||||
if (Config.titles_visibility)
|
||||
myPlaylist->main().setTitle(Display::Columns(myPlaylist->main().getWidth()));
|
||||
else
|
||||
@@ -1000,7 +1000,7 @@ void ToggleDisplayMode::run()
|
||||
}
|
||||
else
|
||||
{
|
||||
myPlaylist->main().setItemDisplayer(std::bind(Display::Songs, _1, myPlaylist->proxySongList(), Config.song_list_format));
|
||||
myPlaylist->main().setItemDisplayer(boost::bind(Display::Songs, _1, myPlaylist->proxySongList(), Config.song_list_format));
|
||||
myPlaylist->main().setTitle("");
|
||||
}
|
||||
}
|
||||
@@ -1022,9 +1022,9 @@ void ToggleDisplayMode::run()
|
||||
Config.columns_in_playlist_editor = !Config.columns_in_playlist_editor;
|
||||
Statusbar::msg("Playlist editor display mode: %s", Config.columns_in_playlist_editor ? "Columns" : "Classic");
|
||||
if (Config.columns_in_playlist_editor)
|
||||
myPlaylistEditor->Content.setItemDisplayer(std::bind(Display::SongsInColumns, _1, myPlaylistEditor->contentProxyList()));
|
||||
myPlaylistEditor->Content.setItemDisplayer(boost::bind(Display::SongsInColumns, _1, myPlaylistEditor->contentProxyList()));
|
||||
else
|
||||
myPlaylistEditor->Content.setItemDisplayer(std::bind(Display::Songs, _1, myPlaylistEditor->contentProxyList(), Config.song_list_format));
|
||||
myPlaylistEditor->Content.setItemDisplayer(boost::bind(Display::Songs, _1, myPlaylistEditor->contentProxyList(), Config.song_list_format));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1687,7 +1687,7 @@ void CropMainPlaylist::run()
|
||||
if (yes)
|
||||
{
|
||||
Statusbar::msg("Cropping playlist...");
|
||||
cropPlaylist(myPlaylist->main(), std::bind(&MPD::Connection::Delete, _1, _2));
|
||||
cropPlaylist(myPlaylist->main(), boost::bind(&MPD::Connection::Delete, _1, _2));
|
||||
Statusbar::msg("Cropping playlist...");
|
||||
}
|
||||
}
|
||||
@@ -1706,7 +1706,7 @@ void CropPlaylist::run()
|
||||
yes = askYesNoQuestion("Do you really want to crop playlist \"" + playlist + "\"?", Status::trace);
|
||||
if (yes)
|
||||
{
|
||||
auto delete_fun = std::bind(&MPD::Connection::PlaylistDelete, _1, playlist, _2);
|
||||
auto delete_fun = boost::bind(&MPD::Connection::PlaylistDelete, _1, playlist, _2);
|
||||
Statusbar::msg("Cropping playlist \"%s\"...", playlist.c_str());
|
||||
cropPlaylist(myPlaylistEditor->Content, delete_fun);
|
||||
Statusbar::msg("Playlist \"%s\" cropped", playlist.c_str());
|
||||
@@ -1720,8 +1720,8 @@ void ClearMainPlaylist::run()
|
||||
yes = askYesNoQuestion("Do you really want to clear main playlist?", Status::trace);
|
||||
if (yes)
|
||||
{
|
||||
auto delete_fun = std::bind(&MPD::Connection::Delete, _1, _2);
|
||||
auto clear_fun = std::bind(&MPD::Connection::ClearMainPlaylist, _1);
|
||||
auto delete_fun = boost::bind(&MPD::Connection::Delete, _1, _2);
|
||||
auto clear_fun = boost::bind(&MPD::Connection::ClearMainPlaylist, _1);
|
||||
Statusbar::msg("Deleting items...");
|
||||
clearPlaylist(myPlaylist->main(), delete_fun, clear_fun);
|
||||
Statusbar::msg("Items deleted");
|
||||
@@ -1742,8 +1742,8 @@ void ClearPlaylist::run()
|
||||
yes = askYesNoQuestion("Do you really want to clear playlist \"" + playlist + "\"?", Status::trace);
|
||||
if (yes)
|
||||
{
|
||||
auto delete_fun = std::bind(&MPD::Connection::PlaylistDelete, _1, playlist, _2);
|
||||
auto clear_fun = std::bind(&MPD::Connection::ClearPlaylist, _1, playlist);
|
||||
auto delete_fun = boost::bind(&MPD::Connection::PlaylistDelete, _1, playlist, _2);
|
||||
auto clear_fun = boost::bind(&MPD::Connection::ClearPlaylist, _1, playlist);
|
||||
Statusbar::msg("Deleting items from \"%s\"...", playlist.c_str());
|
||||
clearPlaylist(myPlaylistEditor->Content, delete_fun, clear_fun);
|
||||
Statusbar::msg("Items deleted from \"%s\"", playlist.c_str());
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/locale/conversion.hpp>
|
||||
#include <algorithm>
|
||||
@@ -40,8 +41,6 @@
|
||||
#include "utility/comparators.h"
|
||||
#include "utility/string.h"
|
||||
|
||||
using namespace std::placeholders;
|
||||
|
||||
using Global::MainHeight;
|
||||
using Global::MainStartY;
|
||||
using Global::myScreen;
|
||||
@@ -70,7 +69,7 @@ Browser::Browser() : itsBrowseLocally(0), itsScrollBeginning(0), itsBrowsedDir("
|
||||
w.centeredCursor(Config.centered_cursor);
|
||||
w.setSelectedPrefix(Config.selected_item_prefix);
|
||||
w.setSelectedSuffix(Config.selected_item_suffix);
|
||||
w.setItemDisplayer(std::bind(Display::Items, _1, proxySongList()));
|
||||
w.setItemDisplayer(boost::bind(Display::Items, _1, proxySongList()));
|
||||
}
|
||||
|
||||
void Browser::resize()
|
||||
@@ -254,7 +253,7 @@ void Browser::applyFilter(const std::string &filter)
|
||||
try
|
||||
{
|
||||
w.showAll();
|
||||
auto fun = std::bind(BrowserEntryMatcher, _1, _2, true);
|
||||
auto fun = boost::bind(BrowserEntryMatcher, _1, _2, true);
|
||||
auto rx = RegexFilter<MPD::Item>(
|
||||
boost::regex(filter, Config.regex_type), fun);
|
||||
w.filter(w.begin(), w.end(), rx);
|
||||
@@ -278,7 +277,7 @@ bool Browser::search(const std::string &constraint)
|
||||
}
|
||||
try
|
||||
{
|
||||
auto fun = std::bind(BrowserEntryMatcher, _1, _2, false);
|
||||
auto fun = boost::bind(BrowserEntryMatcher, _1, _2, false);
|
||||
auto rx = RegexFilter<MPD::Item>(
|
||||
boost::regex(constraint, Config.regex_type), fun);
|
||||
return w.search(w.begin(), w.end(), rx);
|
||||
|
||||
@@ -173,7 +173,7 @@ void moveSelectedItemsUp(NC::Menu<MPD::Song> &m, F swap_fun)
|
||||
{
|
||||
Mpd.StartCommandsList();
|
||||
for (auto it = list.begin(); it != list.end(); ++it)
|
||||
swap_fun(Mpd, *it - begin, *it - begin - 1);
|
||||
swap_fun(&Mpd, *it - begin, *it - begin - 1);
|
||||
Mpd.CommitCommandsList();
|
||||
if (list.size() > 1)
|
||||
{
|
||||
@@ -205,7 +205,7 @@ void moveSelectedItemsDown(NC::Menu<MPD::Song> &m, F swap_fun)
|
||||
{
|
||||
Mpd.StartCommandsList();
|
||||
for (auto it = list.begin(); it != list.end(); ++it)
|
||||
swap_fun(Mpd, it->base() - begin, it->base() - begin + 1);
|
||||
swap_fun(&Mpd, it->base() - begin, it->base() - begin + 1);
|
||||
Mpd.CommitCommandsList();
|
||||
if (list.size() > 1)
|
||||
{
|
||||
@@ -253,7 +253,7 @@ void moveSelectedItemsTo(NC::Menu<MPD::Song> &m, F move_fun)
|
||||
pos -= list.size();
|
||||
size_t i = list.size()-1;
|
||||
for (auto it = list.rbegin(); it != list.rend(); ++it, --i)
|
||||
move_fun(Mpd, *it - begin, pos+i);
|
||||
move_fun(&Mpd, *it - begin, pos+i);
|
||||
Mpd.CommitCommandsList();
|
||||
i = list.size()-1;
|
||||
for (auto it = list.rbegin(); it != list.rend(); ++it, --i)
|
||||
@@ -266,7 +266,7 @@ void moveSelectedItemsTo(NC::Menu<MPD::Song> &m, F move_fun)
|
||||
{
|
||||
size_t i = 0;
|
||||
for (auto it = list.begin(); it != list.end(); ++it, ++i)
|
||||
move_fun(Mpd, *it - begin, pos+i);
|
||||
move_fun(&Mpd, *it - begin, pos+i);
|
||||
Mpd.CommitCommandsList();
|
||||
i = 0;
|
||||
for (auto it = list.begin(); it != list.end(); ++it, ++i)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/locale/conversion.hpp>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
@@ -38,8 +39,6 @@
|
||||
#include "title.h"
|
||||
#include "screen_switcher.h"
|
||||
|
||||
using namespace std::placeholders;
|
||||
|
||||
using Global::MainHeight;
|
||||
using Global::MainStartY;
|
||||
using Global::myScreen;
|
||||
@@ -183,7 +182,7 @@ MediaLibrary::MediaLibrary()
|
||||
Songs.centeredCursor(Config.centered_cursor);
|
||||
Songs.setSelectedPrefix(Config.selected_item_prefix);
|
||||
Songs.setSelectedSuffix(Config.selected_item_suffix);
|
||||
Songs.setItemDisplayer(std::bind(Display::Songs, _1, songsProxyList(), Config.song_library_format));
|
||||
Songs.setItemDisplayer(boost::bind(Display::Songs, _1, songsProxyList(), Config.song_library_format));
|
||||
|
||||
w = &Tags;
|
||||
}
|
||||
@@ -590,7 +589,7 @@ void MediaLibrary::applyFilter(const std::string &filter)
|
||||
else if (isActiveWindow(Albums))
|
||||
{
|
||||
Albums.showAll();
|
||||
auto fun = std::bind(AlbumEntryMatcher, _1, _2, true);
|
||||
auto fun = boost::bind(AlbumEntryMatcher, _1, _2, true);
|
||||
auto rx = RegexItemFilter<AlbumEntry>(
|
||||
boost::regex(filter, Config.regex_type), fun);
|
||||
Albums.filter(Albums.begin(), Albums.end(), rx);
|
||||
@@ -636,7 +635,7 @@ bool MediaLibrary::search(const std::string &constraint)
|
||||
}
|
||||
else if (isActiveWindow(Albums))
|
||||
{
|
||||
auto fun = std::bind(AlbumEntryMatcher, _1, _2, false);
|
||||
auto fun = boost::bind(AlbumEntryMatcher, _1, _2, false);
|
||||
auto rx = RegexItemFilter<AlbumEntry>(
|
||||
boost::regex(constraint, Config.regex_type), fun);
|
||||
result = Albums.search(Albums.begin(), Albums.end(), rx);
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/bind.hpp>
|
||||
#include <sstream>
|
||||
|
||||
#include "display.h"
|
||||
@@ -34,8 +35,6 @@
|
||||
#include "utility/comparators.h"
|
||||
#include "title.h"
|
||||
|
||||
using namespace std::placeholders;
|
||||
|
||||
using Global::MainHeight;
|
||||
using Global::MainStartY;
|
||||
|
||||
@@ -61,9 +60,9 @@ Playlist::Playlist()
|
||||
w.setSelectedPrefix(Config.selected_item_prefix);
|
||||
w.setSelectedSuffix(Config.selected_item_suffix);
|
||||
if (Config.columns_in_playlist)
|
||||
w.setItemDisplayer(std::bind(Display::SongsInColumns, _1, proxySongList()));
|
||||
w.setItemDisplayer(boost::bind(Display::SongsInColumns, _1, proxySongList()));
|
||||
else
|
||||
w.setItemDisplayer(std::bind(Display::Songs, _1, proxySongList(), Config.song_list_format));
|
||||
w.setItemDisplayer(boost::bind(Display::Songs, _1, proxySongList(), Config.song_list_format));
|
||||
}
|
||||
|
||||
void Playlist::switchTo()
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
#include <boost/bind.hpp>
|
||||
#include <cassert>
|
||||
|
||||
#include "charset.h"
|
||||
#include "display.h"
|
||||
@@ -36,8 +37,6 @@
|
||||
#include "title.h"
|
||||
#include "screen_switcher.h"
|
||||
|
||||
using namespace std::placeholders;
|
||||
|
||||
using Global::MainHeight;
|
||||
using Global::MainStartY;
|
||||
|
||||
@@ -79,9 +78,9 @@ PlaylistEditor::PlaylistEditor()
|
||||
Content.setSelectedPrefix(Config.selected_item_prefix);
|
||||
Content.setSelectedSuffix(Config.selected_item_suffix);
|
||||
if (Config.columns_in_playlist_editor)
|
||||
Content.setItemDisplayer(std::bind(Display::SongsInColumns, _1, contentProxyList()));
|
||||
Content.setItemDisplayer(boost::bind(Display::SongsInColumns, _1, contentProxyList()));
|
||||
else
|
||||
Content.setItemDisplayer(std::bind(Display::Songs, _1, contentProxyList(), Config.song_list_format));
|
||||
Content.setItemDisplayer(boost::bind(Display::Songs, _1, contentProxyList(), Config.song_list_format));
|
||||
|
||||
w = &Playlists;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include <array>
|
||||
#include <boost/bind.hpp>
|
||||
#include <iomanip>
|
||||
|
||||
#include "display.h"
|
||||
@@ -34,8 +35,6 @@
|
||||
#include "title.h"
|
||||
#include "screen_switcher.h"
|
||||
|
||||
using namespace std::placeholders;
|
||||
|
||||
using Global::MainHeight;
|
||||
using Global::MainStartY;
|
||||
|
||||
@@ -108,7 +107,7 @@ SearchEngine::SearchEngine()
|
||||
w.setHighlightColor(Config.main_highlight_color);
|
||||
w.cyclicScrolling(Config.use_cyclic_scrolling);
|
||||
w.centeredCursor(Config.centered_cursor);
|
||||
w.setItemDisplayer(std::bind(Display::SEItems, _1, proxySongList()));
|
||||
w.setItemDisplayer(boost::bind(Display::SEItems, _1, proxySongList()));
|
||||
w.setSelectedPrefix(Config.selected_item_prefix);
|
||||
w.setSelectedSuffix(Config.selected_item_suffix);
|
||||
SearchMode = &SearchModes[Config.search_engine_default_search_mode];
|
||||
@@ -273,7 +272,7 @@ void SearchEngine::applyFilter(const std::string &filter)
|
||||
try
|
||||
{
|
||||
w.showAll();
|
||||
auto fun = std::bind(SEItemEntryMatcher, _1, _2, true);
|
||||
auto fun = boost::bind(SEItemEntryMatcher, _1, _2, true);
|
||||
auto rx = RegexItemFilter<SEItem>(
|
||||
boost::regex(filter, Config.regex_type), fun);
|
||||
w.filter(w.begin(), w.end(), rx);
|
||||
@@ -297,7 +296,7 @@ bool SearchEngine::search(const std::string &constraint)
|
||||
}
|
||||
try
|
||||
{
|
||||
auto fun = std::bind(SEItemEntryMatcher, _1, _2, false);
|
||||
auto fun = boost::bind(SEItemEntryMatcher, _1, _2, false);
|
||||
auto rx = RegexItemFilter<SEItem>(
|
||||
boost::regex(constraint, Config.regex_type), fun);
|
||||
return w.search(w.begin(), w.end(), rx);
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
#include "browser.h"
|
||||
@@ -78,23 +79,23 @@ SelectedItemsAdder::SelectedItemsAdder()
|
||||
m_position_selector.setItemDisplayer(DisplayComponent);
|
||||
|
||||
m_position_selector.addItem(Entry("At the end of playlist",
|
||||
std::bind(&Self::addAtTheEndOfPlaylist, this)
|
||||
boost::bind(&Self::addAtTheEndOfPlaylist, this)
|
||||
));
|
||||
m_position_selector.addItem(Entry("At the beginning of playlist",
|
||||
std::bind(&Self::addAtTheBeginningOfPlaylist, this)
|
||||
boost::bind(&Self::addAtTheBeginningOfPlaylist, this)
|
||||
));
|
||||
m_position_selector.addItem(Entry("After current song",
|
||||
std::bind(&Self::addAfterCurrentSong, this)
|
||||
boost::bind(&Self::addAfterCurrentSong, this)
|
||||
));
|
||||
m_position_selector.addItem(Entry("After current album",
|
||||
std::bind(&Self::addAfterCurrentAlbum, this)
|
||||
boost::bind(&Self::addAfterCurrentAlbum, this)
|
||||
));
|
||||
m_position_selector.addItem(Entry("After highlighted item",
|
||||
std::bind(&Self::addAfterHighlightedSong, this)
|
||||
boost::bind(&Self::addAfterHighlightedSong, this)
|
||||
));
|
||||
m_position_selector.addSeparator();
|
||||
m_position_selector.addItem(Entry("Cancel",
|
||||
std::bind(&Self::cancel, this)
|
||||
boost::bind(&Self::cancel, this)
|
||||
));
|
||||
|
||||
w = &m_playlist_selector;
|
||||
@@ -186,11 +187,11 @@ void SelectedItemsAdder::populatePlaylistSelector(BaseScreen *old_screen)
|
||||
if (old_screen != myPlaylist)
|
||||
{
|
||||
m_playlist_selector.addItem(Entry("Current playlist",
|
||||
std::bind(&Self::addToCurrentPlaylist, this)
|
||||
boost::bind(&Self::addToCurrentPlaylist, this)
|
||||
));
|
||||
}
|
||||
m_playlist_selector.addItem(Entry("New playlist",
|
||||
std::bind(&Self::addToNewPlaylist, this)
|
||||
boost::bind(&Self::addToNewPlaylist, this)
|
||||
));
|
||||
m_playlist_selector.addSeparator();
|
||||
|
||||
@@ -200,7 +201,7 @@ void SelectedItemsAdder::populatePlaylistSelector(BaseScreen *old_screen)
|
||||
size_t begin = m_playlist_selector.size();
|
||||
Mpd.GetPlaylists([this](std::string playlist) {
|
||||
m_playlist_selector.addItem(Entry(playlist,
|
||||
std::bind(&Self::addToExistingPlaylist, this, playlist)
|
||||
boost::bind(&Self::addToExistingPlaylist, this, playlist)
|
||||
));
|
||||
});
|
||||
std::sort(m_playlist_selector.beginV()+begin, m_playlist_selector.endV(),
|
||||
@@ -209,7 +210,7 @@ void SelectedItemsAdder::populatePlaylistSelector(BaseScreen *old_screen)
|
||||
m_playlist_selector.addSeparator();
|
||||
}
|
||||
m_playlist_selector.addItem(Entry("Cancel",
|
||||
std::bind(&Self::cancel, this)
|
||||
boost::bind(&Self::cancel, this)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include "charset.h"
|
||||
#include "display.h"
|
||||
#include "global.h"
|
||||
@@ -47,41 +49,41 @@ SortPlaylistDialog::SortPlaylistDialog()
|
||||
});
|
||||
|
||||
w.addItem(Entry(std::make_pair("Artist", &MPD::Song::getArtist),
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Album", &MPD::Song::getAlbum),
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Disc", &MPD::Song::getDisc),
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Track", &MPD::Song::getTrack),
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Genre", &MPD::Song::getGenre),
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Date", &MPD::Song::getDate),
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Composer", &MPD::Song::getComposer),
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Performer", &MPD::Song::getPerformer),
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Title", &MPD::Song::getTitle),
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Filename", &MPD::Song::getURI),
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addSeparator();
|
||||
w.addItem(Entry(std::make_pair("Sort", static_cast<MPD::Song::GetFunction>(0)),
|
||||
std::bind(&Self::sort, this)
|
||||
boost::bind(&Self::sort, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Cancel", static_cast<MPD::Song::GetFunction>(0)),
|
||||
std::bind(&Self::cancel, this)
|
||||
boost::bind(&Self::cancel, this)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#ifdef HAVE_TAGLIB_H
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/locale/conversion.hpp>
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
@@ -40,8 +41,6 @@
|
||||
#include "tags.h"
|
||||
#include "screen_switcher.h"
|
||||
|
||||
using namespace std::placeholders;
|
||||
|
||||
using Global::myScreen;
|
||||
using Global::MainHeight;
|
||||
using Global::MainStartY;
|
||||
@@ -759,7 +758,7 @@ void TagEditor::applyFilter(const std::string &filter)
|
||||
if (w == Dirs)
|
||||
{
|
||||
Dirs->showAll();
|
||||
auto fun = std::bind(DirEntryMatcher, _1, _2, true);
|
||||
auto fun = boost::bind(DirEntryMatcher, _1, _2, true);
|
||||
auto rx = RegexFilter< std::pair<std::string, std::string> >(
|
||||
boost::regex(filter, Config.regex_type), fun);
|
||||
Dirs->filter(Dirs->begin(), Dirs->end(), rx);
|
||||
@@ -797,7 +796,7 @@ bool TagEditor::search(const std::string &constraint)
|
||||
bool result = false;
|
||||
if (w == Dirs)
|
||||
{
|
||||
auto fun = std::bind(DirEntryMatcher, _1, _2, false);
|
||||
auto fun = boost::bind(DirEntryMatcher, _1, _2, false);
|
||||
auto rx = RegexFilter< std::pair<std::string, std::string> >(
|
||||
boost::regex(constraint, Config.regex_type), fun);
|
||||
result = Dirs->search(Dirs->begin(), Dirs->end(), rx);
|
||||
|
||||
Reference in New Issue
Block a user