libsaria: Move the renderer into the playlist namespace
This makes more sense to me conceptually than having a class called PlaylistRenderer. I also commented out a lot of code, so the renderer doesn't do anything right now. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
59789ebc85
commit
b1eb47006d
|
@ -5,14 +5,29 @@
|
|||
|
||||
namespace libsaria
|
||||
{
|
||||
namespace playlist
|
||||
{
|
||||
|
||||
class PlaylistRenderer {
|
||||
class Renderer {
|
||||
private:
|
||||
unsigned int flags;
|
||||
Playlist *playlist;
|
||||
|
||||
public:
|
||||
Renderer(unsigned int);
|
||||
~Renderer();
|
||||
};
|
||||
|
||||
}; /* Namespace: playlist */
|
||||
|
||||
/*class PlaylistRenderer {
|
||||
private:
|
||||
unsigned int flags;
|
||||
Playlist *playlist;
|
||||
virtual void on_playlist_empty();
|
||||
|
||||
public:
|
||||
PlaylistRenderer();
|
||||
PlaylistRenderer(unsigned int);
|
||||
~PlaylistRenderer();
|
||||
|
||||
void set_playlist(Playlist *, bool);
|
||||
|
@ -22,7 +37,7 @@ namespace libsaria
|
|||
void fill();
|
||||
virtual void insert(Track *, unsigned int) = 0;
|
||||
virtual void index_removed(int) = 0;
|
||||
};
|
||||
};*/
|
||||
|
||||
}; /* Namespace: libsaria */
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class MenuItem
|
|||
GtkWidget *get_widget();
|
||||
};
|
||||
|
||||
class SongList : public libsaria::PlaylistRenderer
|
||||
class SongList : public libsaria::playlist::Renderer
|
||||
{
|
||||
private:
|
||||
list <MenuItem> *menu_items;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) 2012 Bryan Schumaker.
|
||||
#include <libsaria/playlist.h>
|
||||
#include <libsaria/renderer.h>
|
||||
//#include <libsaria/renderer.h>
|
||||
#include <libsaria/index.h>
|
||||
#include <libsaria/prefs.h>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <libsaria/index.h>
|
||||
#include <libsaria/library.h>
|
||||
#include <libsaria/playlist.h>
|
||||
#include <libsaria/renderer.h>
|
||||
//#include <libsaria/renderer.h>
|
||||
|
||||
/*static bool compare_tracks(libsaria::Track *one, libsaria::Track *two)
|
||||
{*/
|
||||
|
|
|
@ -4,19 +4,25 @@
|
|||
namespace libsaria
|
||||
{
|
||||
|
||||
PlaylistRenderer::PlaylistRenderer()
|
||||
namespace playlist
|
||||
{
|
||||
playlist = NULL;
|
||||
}
|
||||
|
||||
PlaylistRenderer::~PlaylistRenderer()
|
||||
{
|
||||
}
|
||||
Renderer::Renderer(unsigned int f)
|
||||
{
|
||||
playlist = NULL;
|
||||
flags = f;
|
||||
}
|
||||
|
||||
void PlaylistRenderer::set_playlist(Playlist *plist, bool del_render)
|
||||
Renderer::~Renderer()
|
||||
{
|
||||
}
|
||||
|
||||
}; /* Namespace: playlist */
|
||||
|
||||
/*void PlaylistRenderer::set_playlist(Playlist *plist, bool del_render)
|
||||
{
|
||||
/*playlist = plist;
|
||||
playlist->set_renderer(this, del_render);*/
|
||||
playlist = plist;
|
||||
playlist->set_renderer(this, del_render);
|
||||
}
|
||||
|
||||
Playlist *PlaylistRenderer::get_playlist()
|
||||
|
@ -37,12 +43,12 @@ namespace libsaria
|
|||
}
|
||||
|
||||
void PlaylistRenderer::on_playlist_empty()
|
||||
{
|
||||
{*/
|
||||
/*
|
||||
* This function is meant to be overridden by
|
||||
* inherited classes so they can do whatever
|
||||
* cleanup is necessary on the UI end.
|
||||
*/
|
||||
}
|
||||
//}
|
||||
|
||||
}; /* Namespace: libsaria */
|
||||
|
|
|
@ -29,10 +29,10 @@ namespace ocarina
|
|||
|
||||
void queue::new_playlist(libsaria::Playlist *plist)
|
||||
{
|
||||
queue_list = new SongList();
|
||||
/*queue_list = new SongList();
|
||||
queue_list->set_playlist(plist, true);
|
||||
queue_list->init("Queue", &queue_menu, false);
|
||||
queue_list->fill();
|
||||
queue_list->fill();*/
|
||||
}
|
||||
|
||||
void queue::init()
|
||||
|
|
|
@ -46,7 +46,7 @@ void SongList::insert(libsaria::Track *track, unsigned int index)
|
|||
void SongList::fill()
|
||||
{
|
||||
freeze();
|
||||
PlaylistRenderer::fill();
|
||||
//PlaylistRenderer::fill();
|
||||
thaw();
|
||||
set_label_text();
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <ocarina/body.h>
|
||||
#include "songlist.h"
|
||||
|
||||
SongList::SongList() {}
|
||||
SongList::SongList():libsaria::playlist::Renderer(0) {}
|
||||
SongList::~SongList() {}
|
||||
|
||||
struct column_info {
|
||||
|
|
Loading…
Reference in New Issue