Whitespace cleanups and replaceing a functon from XMMSHandler by one in xplayback

This commit is contained in:
Thomas Frauendorfer 2008-02-17 08:12:30 +01:00
parent 8dc34b1759
commit 6af763a954
8 changed files with 33 additions and 19 deletions

View file

@ -214,3 +214,14 @@ XCollection::playlistAddUrl (QUrl url, QString plsname)
return true;
}
bool
XCollection::playlistClear (QString name)
{
if (name == "") {
name = d->m_activePlaylist;
}
m_client->playlist ()->clear (XClient::qToStd (name));
return true;
}

View file

@ -34,10 +34,14 @@ class XCollection : public QObject
bool remove (QString name, QString ns);
// idlist specific
bool setActivePlaylist (QString name);
QString activePlaylist ();
public slots:
// idlist spesific
bool setActivePlaylist (QString name);
bool addIdlist (QString name);
bool playlistAddUrl (QUrl url, QString plsname = "");
bool playlistClear (QString name = "");
signals:
void collectionModified (QString collection, QString ns, int type,

View file

@ -69,7 +69,9 @@ XPlayback::next ()
m_client->playback ()->tickle ();
}
/*
* Seeking
*/
void
XPlayback::seekMs (uint milliseconds)
{
@ -85,4 +87,3 @@ XPlayback::seekMsRel (int milliseconds)
m_client->playback ()->seekMsRel (milliseconds);
}

View file

@ -14,6 +14,7 @@
*/
#include "XMMSHandler.h"
#include "xcollection.h"
#include "mainwindow.h"
#include "Display.h"
@ -88,7 +89,7 @@ SkinDisplay::fileOpen (void)
XMMSHandler &xmmsh = XMMSHandler::getInstance();
if (files.count() > 0) {
xmmsh.playlistClear ();
xmmsh.xcollection ()->playlistClear ();
}
for (int i = 0; i < files.count(); i++) {

View file

@ -273,8 +273,3 @@ XMMSHandler::volume_get (const Xmms::Dict &levels)
}
void XMMSHandler::playlistClear ()
{
m_client->playlist.clear () ();
}

View file

@ -67,7 +67,6 @@ class XMMSHandler : public XClient {
PlaylistModel *getPlaylistModel () {return m_playlist_model; }
public slots:
void playlistClear ();
void volumeSet (uint volume);
signals:

View file

@ -21,7 +21,9 @@
#include "playlistwindow.h"
#include "playlistwidget.h"
#include "playlistview.h"
#include "playlistmodel.h"
#include "xcollection.h"
#include "playlistshade.h"
#include "playlistmenu.h"
@ -240,7 +242,8 @@ PlaylistWidget::addButtons (void)
b = new PlaylistMenuButton (m_del, Skin::PLS_DEL_ALL_0,
Skin::PLS_DEL_ALL_1);
connect (b, SIGNAL (activated ()),
&XMMSHandler::getInstance(), SLOT (playlistClear ()));
XMMSHandler::getInstance().xcollection (),
SLOT (playlistClear ()));
b = new PlaylistMenuButton (m_del, Skin::PLS_DEL_CRP_0,
Skin::PLS_DEL_CRP_1);
connect (b, SIGNAL (activated ()),