Commit 43a589b4 authored by Daniel Molkentin's avatar Daniel Molkentin

swap forward and back actions in systray and popup as discussed with wheels

svn path=/trunk/kdemultimedia/juk/; revision=316079
parent e9518c4f
......@@ -27,6 +27,7 @@ namespace MediaFiles {
static const char mp3Type[] = "audio/x-mp3";
static const char oggType[] = "application/ogg";
static const char flacType[] = "audio/x-flac";
static const char plsType[] = "audio/x-scpls";
static const char m3uType[] = "audio/mpegurl";
static const char playlistExtension[] = ".m3u";
......@@ -69,7 +70,7 @@ bool MediaFiles::isMediaFile(const QString &fileName)
bool MediaFiles::isPlaylistFile(const QString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
return result->is(m3uType);
return result->is(m3uType) || result->is(plsType);
}
bool MediaFiles::isMP3(const QString &fileName)
......@@ -94,7 +95,7 @@ QStringList MediaFiles::mimeTypes()
{
QStringList l;
l << mp3Type << oggType << flacType << m3uType;
l << mp3Type << oggType << flacType << m3uType << plsType;
return l;
}
......@@ -70,8 +70,8 @@ SystemTray::SystemTray(QWidget *parent, const char *name) : KSystemTray(parent,
m_playPix = createPixmap("player_play");
m_pausePix = createPixmap("player_pause");
m_backPix = loadIcon("player_start");
m_forwardPix = loadIcon("player_end");
m_backPix = loadIcon("player_start");
setPixmap(m_appPix);
......@@ -86,8 +86,8 @@ SystemTray::SystemTray(QWidget *parent, const char *name) : KSystemTray(parent,
action("play")->plug(cm);
action("pause")->plug(cm);
action("stop")->plug(cm);
action("back")->plug(cm);
action("forward")->plug(cm);
action("back")->plug(cm);
cm->insertSeparator();
......@@ -217,14 +217,15 @@ void SystemTray::createPopup(bool addButtons)
buttonBox = new QVBox(box);
buttonBox->setSpacing(3);
}
QPushButton *forwardButton = new QPushButton(m_forwardPix, 0, buttonBox, "popup_forward");
forwardButton->setFlat(true);
connect(forwardButton, SIGNAL(clicked()), action("forward"), SLOT(activate()));
QPushButton *backButton = new QPushButton(m_backPix, 0, buttonBox, "popup_back");
backButton->setFlat(true);
connect(backButton, SIGNAL(clicked()), action("back"), SLOT(activate()));
QPushButton *forwardButton = new QPushButton(m_forwardPix, 0, buttonBox, "popup_forward");
forwardButton->setFlat(true);
connect(forwardButton, SIGNAL(clicked()), action("forward"), SLOT(activate()));
}
// We don't want an autodelete popup. There are times when it will need
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment