Commit 8237fe93 authored by Scott Wheeler's avatar Scott Wheeler

Update the system tray when chaning the playing status via the DCOP interface.

svn path=/trunk/kdemultimedia/juk/; revision=304647
parent b101b77e
......@@ -215,6 +215,8 @@ void PlayerManager::play(const FileHandle &file)
m_sliderAction->trackPositionSlider()->setEnabled(true);
m_timer->start(m_pollInterval);
emit signalPlay();
}
void PlayerManager::play()
......@@ -236,6 +238,8 @@ void PlayerManager::pause()
action("pause")->setEnabled(false);
player()->pause();
emit signalPause();
}
void PlayerManager::stop()
......@@ -256,6 +260,8 @@ void PlayerManager::stop()
m_statusLabel->clear();
player()->stop();
emit signalStop();
}
void PlayerManager::setVolume(float volume)
......
......@@ -74,6 +74,11 @@ public slots:
void volumeDown();
void mute();
signals:
void signalPlay();
void signalPause();
void signalStop();
private:
Player *player() const;
void setup();
......
......@@ -17,6 +17,8 @@
#include <kiconloader.h>
#include <kpassivepopup.h>
#include <kiconeffect.h>
#include <kaction.h>
#include <kpopupmenu.h>
#include <kdebug.h>
#include <qhbox.h>
......@@ -25,7 +27,7 @@
#include "systemtray.h"
#include "actioncollection.h"
#include "juk.h"
#include "playermanager.h"
using namespace ActionCollection;
......@@ -53,9 +55,9 @@ SystemTray::SystemTray(QWidget *parent, const char *name) : KSystemTray(parent,
KPopupMenu *cm = contextMenu();
connect(action("play"), SIGNAL(activated()), this, SLOT(slotPlay()));
connect(action("pause"), SIGNAL(activated()), this, SLOT(slotPause()));
connect(action("stop"), SIGNAL(activated()), this, SLOT(slotStop()));
connect(PlayerManager::instance(), SIGNAL(signalPlay()), this, SLOT(slotPlay()));
connect(PlayerManager::instance(), SIGNAL(signalPause()), this, SLOT(slotPause()));
connect(PlayerManager::instance(), SIGNAL(signalStop()), this, SLOT(slotStop()));
action("play")->plug(cm);
action("pause")->plug(cm);
......
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