Fix problem with utf-8 charactes in playlist names
If a playlist had utf-8 characters in it's name, promoe couldn't switch to it. Also move another function from XMMSHandler to class in lib
This commit is contained in:
parent
d1a98b5367
commit
c0ca792481
8 changed files with 14 additions and 15 deletions
5
README
5
README
|
@ -2,10 +2,7 @@ Required dependencys:
|
|||
* QT4.2.x http://www.trolltech.no/
|
||||
* XMMS2 http://xmms2.xmms.org/
|
||||
* XMMS2 C++ bindings (make sure to have boost_signals when compiling xmms2)
|
||||
- promoe should compile with DrK
|
||||
- if you compile against xmms2-devel
|
||||
make sure it isn't not older than 2008-05-15
|
||||
(and get the patch for bug 1973 if necessary)
|
||||
- promoe works with 0.4DrK and 0.5DrL
|
||||
|
||||
Optional dependencys:
|
||||
* Avahi http://www.avahi.org/
|
||||
|
|
|
@ -185,7 +185,7 @@ bool
|
|||
XCollection::setActivePlaylist (QString name) {
|
||||
if (!m_client->isConnected ()) return false;
|
||||
|
||||
m_client->playlist ()->load (name.toStdString ());
|
||||
m_client->playlist ()->load (XClient::qToStd (name));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -96,6 +96,15 @@ XPlayback::next ()
|
|||
m_client->playback ()->tickle ();
|
||||
}
|
||||
|
||||
void
|
||||
XPlayback::setPos (int pos)
|
||||
{
|
||||
if (!m_client->isConnected ()) return;
|
||||
|
||||
m_client->playlist ()->setNext (pos) ();
|
||||
m_client->playback ()->tickle () ();
|
||||
}
|
||||
|
||||
/*
|
||||
* Seeking
|
||||
*/
|
||||
|
|
|
@ -41,6 +41,7 @@ class XPlayback : public QObject {
|
|||
void stop ();
|
||||
void prev ();
|
||||
void next ();
|
||||
void setPos (int pos);
|
||||
|
||||
void seekMs (uint milliseconds);
|
||||
void seekMsRel (int milliseconds);
|
||||
|
|
|
@ -104,13 +104,6 @@ XMMSHandler::requestMediainfo (uint id)
|
|||
Xmms::bind (&XMMSHandler::medialib_info, this));
|
||||
}
|
||||
|
||||
void
|
||||
XMMSHandler::requestTrackChange (int pos)
|
||||
{
|
||||
m_client->playlist.setNext (pos) ();
|
||||
m_client->playback.tickle () ();
|
||||
}
|
||||
|
||||
bool
|
||||
XMMSHandler::playback_current_id (const unsigned int &id)
|
||||
{
|
||||
|
|
|
@ -42,7 +42,6 @@ class XMMSHandler : public XClient {
|
|||
bool volume_changed (const Xmms::Dict &levels);
|
||||
|
||||
void requestMediainfo (uint id);
|
||||
void requestTrackChange (int pos);
|
||||
void playlistAddURL (const QString& url);
|
||||
|
||||
/*
|
||||
|
|
|
@ -99,7 +99,7 @@ AbstractTimeDisplay::paintEvent (QPaintEvent *event)
|
|||
paint.drawPixmap (m_d3_x_pos, 0, m_pixmaps[sec/10]);
|
||||
paint.drawPixmap (m_d4_x_pos, 0, m_pixmaps[sec%10]);
|
||||
} else {
|
||||
// Just give up and draw '-' if min would become 100 or bigger
|
||||
// Just give up and draw '-' if min-variable would become 100 or bigger
|
||||
paint.drawPixmap (m_d1_x_pos, 0, m_pixmaps[11]);
|
||||
paint.drawPixmap (m_d2_x_pos, 0, m_pixmaps[11]);
|
||||
paint.drawPixmap (m_d3_x_pos, 0, m_pixmaps[11]);
|
||||
|
|
|
@ -277,7 +277,7 @@ PlaylistView::mouseDoubleClickEvent (QMouseEvent *event)
|
|||
}
|
||||
|
||||
XMMSHandler &xmmsh = XMMSHandler::getInstance ();
|
||||
xmmsh.requestTrackChange (index.row());
|
||||
xmmsh.xplayback ()->setPos (index.row());
|
||||
if (m_status == XMMS_PLAYBACK_STATUS_STOP ||
|
||||
m_status == XMMS_PLAYBACK_STATUS_PAUSE) {
|
||||
xmmsh.xplayback ()->play ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue