Commit 1d1ae438 authored by Scott Wheeler's avatar Scott Wheeler

Don't open Konqueror when clicking on the links. A real implementation

of doing something with the links will follow shortly.

svn path=/trunk/kdemultimedia/juk/; revision=362772
parent b9717533
......@@ -166,7 +166,7 @@ TrackItem::TrackItem(NowPlaying *parent) :
QVBoxLayout *layout = new QVBoxLayout(this);
m_label = new KActiveLabel(this);
m_label = new LinkLabel(this);
m_label->setLinkUnderline(false);
layout->addStretch();
......@@ -203,7 +203,7 @@ void TrackItem::update(const FileHandle &file)
////////////////////////////////////////////////////////////////////////////////
HistoryItem::HistoryItem(NowPlaying *parent) :
KActiveLabel(parent, "HistoryItem"),
LinkLabel(parent, "HistoryItem"),
NowPlayingItem(parent)
{
setFixedHeight(parent->height() - parent->layout()->margin() * 2);
......
......@@ -78,6 +78,17 @@ private:
FileHandle m_file;
};
/**
* A link label that doesn't automatically open Konqueror.
*/
class LinkLabel : public KActiveLabel
{
public:
LinkLabel(QWidget *parent, const char *name = 0) : KActiveLabel(parent, name) {}
virtual void openLink(const QString &) {}
};
/**
* Show the text information on the current track and provides links to the
* album and artist of the currently playing item.
......@@ -90,14 +101,14 @@ public:
virtual void update(const FileHandle &file);
private:
KActiveLabel *m_label;
LinkLabel *m_label;
};
/**
* Shows up to 10 items of history and links to those items.
*/
class HistoryItem : public KActiveLabel, public NowPlayingItem
class HistoryItem : public LinkLabel, public NowPlayingItem
{
public:
HistoryItem(NowPlaying *parent);
......@@ -105,7 +116,7 @@ public:
private:
FileHandleList m_history;
KActiveLabel *m_label;
LinkLabel *m_label;
};
#endif
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