Added start of new Medialib view
This commit is contained in:
parent
219327ca20
commit
d114edf75f
12 changed files with 194 additions and 27 deletions
|
@ -1,6 +1,7 @@
|
|||
#include <xmmsclient/xmmsclient++.h>
|
||||
|
||||
#include "XmmsQT4.h"
|
||||
#include "XMMSSocket.h"
|
||||
#include "XMMSHandler.h"
|
||||
|
||||
#include <cstdlib>
|
||||
|
@ -29,7 +30,7 @@ XMMSHandler &XMMSHandler::getInstance ()
|
|||
return singleton;
|
||||
}
|
||||
|
||||
XMMSHandler::XMMSHandler () : QObject (), m_client ("promoe")
|
||||
XMMSHandler::XMMSHandler () : QObject (), XMMSSocket ()
|
||||
{
|
||||
connect (std::getenv ( "XMMS_PATH" ));
|
||||
}
|
||||
|
@ -37,17 +38,8 @@ XMMSHandler::XMMSHandler () : QObject (), m_client ("promoe")
|
|||
bool
|
||||
XMMSHandler::connect (const char *path)
|
||||
{
|
||||
try {
|
||||
m_client.connect (path ? path : "");
|
||||
}
|
||||
catch (Xmms::connection_error& e) {
|
||||
QErrorMessage *err = new QErrorMessage ();
|
||||
err->showMessage ("Couldn't connect to XMMS2, please try again.");
|
||||
err->exec ();
|
||||
delete err;
|
||||
if (!XMMSSocket::connect (path))
|
||||
return false;
|
||||
}
|
||||
m_client.setMainloop (new XmmsQT4 (m_client.getConnection ()));
|
||||
|
||||
using Xmms::bind;
|
||||
m_client.playlist.list (bind (&XMMSHandler::playlist_list, this));
|
||||
|
@ -345,6 +337,3 @@ void XMMSHandler::prev ()
|
|||
m_client.playback.tickle (&log);
|
||||
}
|
||||
|
||||
XMMSHandler::~XMMSHandler ()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue