Commit a50ca080 authored by Scott Wheeler's avatar Scott Wheeler

Here are a few bugfixes for bugs that I introduced in my recent cleanup.

svn path=/trunk/kdemultimedia/juk/; revision=194820
parent 70fb715d
......@@ -79,6 +79,7 @@ void JuK::setupLayout()
statusBar()->addWidget(statusLabel, 1);
connect(splitter, SIGNAL(selectedPlaylistCountChanged(int)), statusLabel, SLOT(setPlaylistCount(int)));
connect(statusLabel, SIGNAL(jumpButtonClicked()), splitter, SLOT(selectPlaying()));
updatePlaylistInfo();
......@@ -270,15 +271,6 @@ void JuK::updatePlaylistInfo()
statusLabel->setPlaylistInfo(splitter->selectedPlaylistName(), splitter->selectedPlaylistCount());
}
////////////////////////////////////////////////////////////////////////////////
// private action slot implementations - file menu
////////////////////////////////////////////////////////////////////////////////
void JuK::quit()
{
close();
}
////////////////////////////////////////////////////////////////////////////////
// player menu
////////////////////////////////////////////////////////////////////////////////
......@@ -377,33 +369,13 @@ void JuK::pollPlay()
// want to make sure that our adjustments
noSeek = true;
if(!player.playing()) {
playTimer->stop();
if(!player.paused()) {
QString nextFile = splitter->playNextFile();
if(!nextFile.isEmpty()) {
backAction->setEnabled(true);
sliderAction->getTrackPositionSlider()->setValue(0);
player.play(nextFile, player.getVolume());
// Check to make sure that the file actually starts playing.
if(player.playing())
playTimer->start(pollInterval);
else
stopFile();
}
else
stopFile();
}
if(!player.paused())
playFile(splitter->playNextFile(randomPlayAction->isChecked()));
}
else if(!trackPositionDragging) {
sliderAction->getTrackPositionSlider()->setValue(player.position());
......@@ -447,6 +419,7 @@ void JuK::playFile(const QString &file)
backAction->setEnabled(true);
forwardAction->setEnabled(true);
sliderAction->getTrackPositionSlider()->setValue(0);
sliderAction->getTrackPositionSlider()->setEnabled(true);
playTimer->start(pollInterval);
......
......@@ -66,7 +66,7 @@ private slots:
void updatePlaylistInfo();
// file menu
void quit();
void quit() { close(); }
// edit menu
void copy() {};
......
......@@ -82,7 +82,7 @@ StatusLabel::StatusLabel(QWidget *parent, const char *name) : QHBox(parent, name
jumpButton->setFlat(true);
QToolTip::add(jumpButton, i18n("Jump to the currently playing item"));
connect(jumpButton, SIGNAL(clicked()), this, SLOT(jumpToPlayingItem()));
connect(jumpButton, SIGNAL(clicked()), this, SIGNAL(jumpButtonClicked()));
installEventFilter(this);
}
......@@ -168,7 +168,7 @@ bool StatusLabel::eventFilter(QObject *o, QEvent *e)
updateTime();
}
else
jumpToPlayingItem();
emit(jumpButtonClicked());
return(true);
}
......@@ -186,13 +186,4 @@ QString StatusLabel::formatTime(int minutes, int seconds) // static
return(m + ":" + s);
}
////////////////////////////////////////////////////////////////////////////////
// private slots
////////////////////////////////////////////////////////////////////////////////
void StatusLabel::jumpToPlayingItem() const
{
// PlaylistSplitter::setSelected(playingItem);
}
#include "statuslabel.moc"
......@@ -58,16 +58,15 @@ public slots:
void setItemTotalTime(int time) { itemTotalTime = time; }
void setItemCurrentTime(int time) { itemCurrentTime = time; updateTime(); }
signals:
void jumpButtonClicked();
private:
void updateTime();
virtual bool eventFilter(QObject *o, QEvent *e);
static QString formatTime(int minutes, int seconds);
private slots:
void jumpToPlayingItem() const;
private:
enum Mode { PlayingItemInfo, PlaylistInfo } mode;
QString playlistName;
......
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