finally kill NC::List

master
Andrzej Rybczak 14 years ago
parent 5e8d1673e0
commit 684d871506
  1. 2
      src/browser.h
  2. 4
      src/clock.h
  3. 4
      src/help.h
  4. 4
      src/lastfm.h
  5. 4
      src/lyrics.h
  6. 12
      src/media_library.cpp
  7. 2
      src/media_library.h
  8. 15
      src/menu.h
  9. 4
      src/outputs.h
  10. 2
      src/playlist.h
  11. 13
      src/playlist_editor.cpp
  12. 2
      src/playlist_editor.h
  13. 4
      src/screen.h
  14. 2
      src/search_engine.h
  15. 4
      src/sel_items_adder.h
  16. 4
      src/server_info.h
  17. 4
      src/song_info.h
  18. 10
      src/tag_editor.cpp
  19. 2
      src/tag_editor.h
  20. 4
      src/tiny_tag_editor.h
  21. 4
      src/visualizer.h

@ -58,8 +58,6 @@ class Browser : public Screen< NC::Menu<MPD::Item> >, public Filterable, public
virtual void reverseSelection();
virtual MPD::SongList getSelectedSongs();
virtual NC::List *GetList() { return w; }
virtual bool isMergable() { return true; }
const std::string &CurrentDir() { return itsBrowsedDir; }

@ -44,10 +44,6 @@ class Clock : public Screen<NC::Window>
virtual void MouseButtonPressed(MEVENT) { }
virtual bool isTabbable() { return true; }
virtual bool allowsSelection() { return false; }
virtual NC::List *GetList() { return 0; }
virtual bool isMergable() { return true; }
protected:

@ -36,10 +36,6 @@ class Help : public Screen<NC::Scrollpad>
virtual void SpacePressed() { }
virtual bool isTabbable() { return true; }
virtual bool allowsSelection() { return false; }
virtual NC::List *GetList() { return 0; }
virtual bool isMergable() { return true; }
protected:

@ -46,10 +46,6 @@ class Lastfm : public Screen<NC::Scrollpad>
virtual void EnterPressed() { }
virtual void SpacePressed() { }
virtual bool allowsSelection() { return false; }
virtual NC::List *GetList() { return 0; }
virtual bool isMergable() { return true; }
void Refetch();

@ -47,10 +47,6 @@ class Lyrics : public Screen<NC::Scrollpad>
virtual void EnterPressed() { }
virtual void SpacePressed();
virtual bool allowsSelection() { return false; }
virtual NC::List *GetList() { return 0; }
virtual bool isMergable() { return true; }
void Edit();

@ -436,18 +436,6 @@ void MediaLibrary::MouseButtonPressed(MEVENT me)
}
}
NC::List *MediaLibrary::GetList()
{
if (w == Tags)
return Tags;
else if (w == Albums)
return Albums;
else if (w == Songs)
return Songs;
else // silence compiler
return 0;
}
/***********************************************************************/
std::string MediaLibrary::currentFilter()

@ -56,8 +56,6 @@ class MediaLibrary : public Screen<NC::Window>, public Filterable, public HasSon
virtual void reverseSelection();
virtual MPD::SongList getSelectedSongs();
virtual NC::List *GetList();
virtual bool isMergable() { return true; }
int Columns();

@ -33,22 +33,9 @@
namespace NC {
/// List class is an interface for Menu class
struct List
{
/// @return currently highlighted position
virtual size_t Choice() const = 0;
/// @see Menu::Empty()
virtual bool Empty() const = 0;
/// @see Menu::Size()
virtual size_t Size() const = 0;
};
/// This template class is generic menu capable of
/// holding any std::vector compatible values.
template <typename T> struct Menu : public Window, public List
template <typename T> struct Menu : public Window
{
struct Item
{

@ -42,10 +42,6 @@ class Outputs : public Screen< NC::Menu<MPD::Output> >
virtual void MouseButtonPressed(MEVENT);
virtual bool isTabbable() { return true; }
virtual bool allowsSelection() { return false; }
virtual NC::List *GetList() { return w; }
virtual bool isMergable() { return true; }
void FetchList();

@ -61,8 +61,6 @@ class Playlist : public Screen<NC::Window>, public Filterable, public HasSongs,
virtual void reverseSelection();
virtual MPD::SongList getSelectedSongs();
virtual NC::List *GetList() { return w == Items ? Items : 0; }
virtual bool isMergable() { return true; }
bool isFiltered();

@ -564,19 +564,6 @@ void PlaylistEditor::Locate(const std::string &name)
SwitchTo();
}
NC::List *PlaylistEditor::GetList()
{
if (w == Playlists)
return Playlists;
else if (w == Content)
return Content;
else // silence compiler
{
assert(false);
return 0;
}
}
namespace {//
std::string SongToString(const MPD::Song &s)

@ -57,8 +57,6 @@ class PlaylistEditor : public Screen<NC::Window>, public Filterable, public HasS
virtual void Locate(const std::string &);
virtual NC::List *GetList();
virtual bool isMergable() { return true; }
void MoveSelectedItems(Playlist::Movement where);

@ -74,10 +74,6 @@ class BasicScreen
/// @see Screen::MouseButtonPressed()
virtual void MouseButtonPressed(MEVENT) { }
/// @return pointer to instantiation of Menu template class
/// cast to List if available or null pointer otherwise
virtual NC::List *GetList() = 0;
/// When this is overwritten with a function returning true, the
/// screen will be used in tab switching.

@ -102,8 +102,6 @@ class SearchEngine : public Screen< NC::Menu<SEItem> >, public Filterable, publi
virtual void reverseSelection();
virtual MPD::SongList getSelectedSongs();
virtual NC::List *GetList() { return w->Size() >= StaticOptions ? w : 0; }
virtual bool isMergable() { return true; }
void UpdateFoundList();

@ -38,10 +38,6 @@ class SelectedItemsAdder : public Screen< NC::Menu<std::string> >
virtual void SpacePressed() { }
virtual void MouseButtonPressed(MEVENT);
virtual bool allowsSelection() { return false; }
virtual NC::List *GetList() { return w; }
virtual bool isMergable() { return false; }
protected:

@ -36,10 +36,6 @@ class ServerInfo : public Screen<NC::Scrollpad>
virtual void EnterPressed() { }
virtual void SpacePressed() { }
virtual bool allowsSelection() { return false; }
virtual NC::List *GetList() { return 0; }
virtual bool isMergable() { return false; }
protected:

@ -42,10 +42,6 @@ class SongInfo : public Screen<NC::Scrollpad>
virtual void EnterPressed() { }
virtual void SpacePressed() { }
virtual bool allowsSelection() { return false; }
virtual NC::List *GetList() { return 0; }
virtual bool isMergable() { return true; }
static const Metadata Tags[];

@ -892,16 +892,6 @@ MPD::SongList TagEditor::getSelectedSongs()
/***********************************************************************/
NC::List *TagEditor::GetList()
{
if (w == LeftColumn)
return LeftColumn;
else if (w == Tags)
return Tags;
else
return 0;
}
bool TagEditor::isNextColumnAvailable()
{
if (w == LeftColumn)

@ -67,8 +67,6 @@ class TagEditor : public Screen<NC::Window>, public Filterable, public HasSongs,
virtual void reverseSelection();
virtual MPD::SongList getSelectedSongs();
virtual NC::List *GetList();
virtual bool isMergable() { return true; }
bool isNextColumnAvailable();

@ -43,10 +43,6 @@ class TinyTagEditor : public Screen< NC::Menu<NC::Buffer> >
virtual void SpacePressed() { }
virtual void MouseButtonPressed(MEVENT);
virtual bool allowsSelection() { return false; }
virtual NC::List *GetList() { return 0; }
virtual bool isMergable() { return true; }
void SetEdited(const MPD::Song &);

@ -48,10 +48,6 @@ class Visualizer : public Screen<NC::Window>
virtual void MouseButtonPressed(MEVENT) { }
virtual bool isTabbable() { return true; }
virtual NC::List *GetList() { return 0; }
virtual bool allowsSelection() { return false; }
virtual bool isMergable() { return true; }
void SetFD();

Loading…
Cancel
Save