Commit 7d3f2e42 authored by Frerich Raabe's avatar Frerich Raabe

CVS_SILENT Indentation fixes.

svn path=/trunk/kdemultimedia/juk/; revision=217298
parent 28cf86c0
...@@ -163,10 +163,9 @@ void JuK::setupActions() ...@@ -163,10 +163,9 @@ void JuK::setupActions()
new KAction(i18n("Genre List Editor..."), 0, this, SLOT(slotShowGenreListEditor()), actionCollection(), "showGenreListEditor"); new KAction(i18n("Genre List Editor..."), 0, this, SLOT(slotShowGenreListEditor()), actionCollection(), "showGenreListEditor");
m_outputSelectAction = Player::playerSelectAction(actionCollection()); m_outputSelectAction = Player::playerSelectAction(actionCollection());
if(m_outputSelectAction) { if(m_outputSelectAction) {
m_outputSelectAction->setCurrentItem(0); m_outputSelectAction->setCurrentItem(0);
connect(m_outputSelectAction, SIGNAL(activated(int)), this, SLOT(slotSetOutput(int))); connect(m_outputSelectAction, SIGNAL(activated(int)), this, SLOT(slotSetOutput(int)));
} }
new KAction(i18n("&Tag Guesser..."), 0, 0, this, SLOT(slotConfigureTagGuesser()), actionCollection(), "tagGuesserConfig"); new KAction(i18n("&Tag Guesser..."), 0, 0, this, SLOT(slotConfigureTagGuesser()), actionCollection(), "tagGuesserConfig");
...@@ -188,23 +187,23 @@ void JuK::setupActions() ...@@ -188,23 +187,23 @@ void JuK::setupActions()
void JuK::setupSystemTray() void JuK::setupSystemTray()
{ {
if(m_toggleSystemTrayAction && m_toggleSystemTrayAction->isChecked()) { if(m_toggleSystemTrayAction && m_toggleSystemTrayAction->isChecked()) {
m_systemTray = new SystemTray(this, "systemTray"); m_systemTray = new SystemTray(this, "systemTray");
m_systemTray->show(); m_systemTray->show();
connect(this, SIGNAL(signalNewSong(const QString&)), m_systemTray, SLOT(slotNewSong(const QString&))); connect(this, SIGNAL(signalNewSong(const QString&)), m_systemTray, SLOT(slotNewSong(const QString&)));
if(m_player && m_player->paused()) if(m_player && m_player->paused())
m_systemTray->slotPause(); m_systemTray->slotPause();
else if(m_player && m_player->playing()) else if(m_player && m_player->playing())
m_systemTray->slotPlay(); m_systemTray->slotPlay();
m_toggleDockOnCloseAction->setEnabled(true); m_toggleDockOnCloseAction->setEnabled(true);
connect(m_systemTray, SIGNAL(quitSelected()), this, SLOT(slotQuit())); connect(m_systemTray, SIGNAL(quitSelected()), this, SLOT(slotQuit()));
} }
else { else {
m_systemTray = 0; m_systemTray = 0;
m_toggleDockOnCloseAction->setEnabled(false); m_toggleDockOnCloseAction->setEnabled(false);
} }
} }
...@@ -232,8 +231,8 @@ void JuK::setupPlayer() ...@@ -232,8 +231,8 @@ void JuK::setupPlayer()
int playerType = 0; int playerType = 0;
if(m_outputSelectAction) { if(m_outputSelectAction) {
playerType = m_outputSelectAction->currentItem(); playerType = m_outputSelectAction->currentItem();
connect(m_outputSelectAction, SIGNAL(activated(int)), this, SLOT(slotSetOutput(int))); connect(m_outputSelectAction, SIGNAL(activated(int)), this, SLOT(slotSetOutput(int)));
} }
m_player = Player::createPlayer(playerType); m_player = Player::createPlayer(playerType);
...@@ -264,7 +263,7 @@ void JuK::processArgs() ...@@ -264,7 +263,7 @@ void JuK::processArgs()
QStringList files; QStringList files;
for(int i = 0; i < args->count(); i++) for(int i = 0; i < args->count(); i++)
files.append(args->arg(i)); files.append(args->arg(i));
m_splitter->open(files); m_splitter->open(files);
} }
...@@ -272,7 +271,7 @@ void JuK::processArgs() ...@@ -272,7 +271,7 @@ void JuK::processArgs()
void JuK::keyPressEvent(QKeyEvent *e) void JuK::keyPressEvent(QKeyEvent *e)
{ {
if (e->key() >= Qt::Key_Back && e->key() <= Qt::Key_MediaLast) if (e->key() >= Qt::Key_Back && e->key() <= Qt::Key_MediaLast)
e->accept(); e->accept();
KMainWindow::keyPressEvent(e); KMainWindow::keyPressEvent(e);
} }
...@@ -285,8 +284,8 @@ void JuK::readSettings() ...@@ -285,8 +284,8 @@ void JuK::readSettings()
KConfig *config = KGlobal::config(); KConfig *config = KGlobal::config();
{ // general settings { // general settings
KConfigGroupSaver saver(config, "Settings"); KConfigGroupSaver saver(config, "Settings");
m_restore = config->readBoolEntry("RestoreOnLoad", true); m_restore = config->readBoolEntry("RestoreOnLoad", true);
m_showSplash = config->readBoolEntry("ShowSplashScreen", true); m_showSplash = config->readBoolEntry("ShowSplashScreen", true);
} }
} }
...@@ -302,32 +301,32 @@ void JuK::readConfig() ...@@ -302,32 +301,32 @@ void JuK::readConfig()
int volume = config->readNumEntry("Volume", m_sliderAction->getVolumeSlider()->maxValue()); int volume = config->readNumEntry("Volume", m_sliderAction->getVolumeSlider()->maxValue());
m_sliderAction->getVolumeSlider()->setValue(volume); m_sliderAction->getVolumeSlider()->setValue(volume);
} }
bool randomPlay = config->readBoolEntry("RandomPlay", false); bool randomPlay = config->readBoolEntry("RandomPlay", false);
m_randomPlayAction->setChecked(randomPlay); m_randomPlayAction->setChecked(randomPlay);
bool loopPlaylist = config->readBoolEntry("LoopPlaylist", false); bool loopPlaylist = config->readBoolEntry("LoopPlaylist", false);
m_loopPlaylistAction->setChecked(loopPlaylist); m_loopPlaylistAction->setChecked(loopPlaylist);
} }
{ // view settings { // view settings
KConfigGroupSaver saver(config, "View"); KConfigGroupSaver saver(config, "View");
bool showEditor = config->readBoolEntry("ShowEditor", false); bool showEditor = config->readBoolEntry("ShowEditor", false);
m_showEditorAction->setChecked(showEditor); m_showEditorAction->setChecked(showEditor);
m_splitter->slotSetEditorVisible(showEditor); m_splitter->slotSetEditorVisible(showEditor);
} }
{ // general settings { // general settings
KConfigGroupSaver saver(config, "Settings"); KConfigGroupSaver saver(config, "Settings");
bool dockInSystemTray = config->readBoolEntry("DockInSystemTray", true); bool dockInSystemTray = config->readBoolEntry("DockInSystemTray", true);
m_toggleSystemTrayAction->setChecked(dockInSystemTray); m_toggleSystemTrayAction->setChecked(dockInSystemTray);
bool dockOnClose = config->readBoolEntry("DockOnClose", true); bool dockOnClose = config->readBoolEntry("DockOnClose", true);
m_toggleDockOnCloseAction->setChecked(dockOnClose); m_toggleDockOnCloseAction->setChecked(dockOnClose);
bool showPopups = config->readBoolEntry("TrackPopup", false); bool showPopups = config->readBoolEntry("TrackPopup", false);
m_togglePopupsAction->setChecked(showPopups); m_togglePopupsAction->setChecked(showPopups);
if(m_outputSelectAction) if(m_outputSelectAction)
m_outputSelectAction->setCurrentItem(config->readNumEntry("MediaSystem", 0)); m_outputSelectAction->setCurrentItem(config->readNumEntry("MediaSystem", 0));
} }
m_restoreOnLoadAction->setChecked(m_restore); m_restoreOnLoadAction->setChecked(m_restore);
...@@ -341,24 +340,24 @@ void JuK::saveConfig() ...@@ -341,24 +340,24 @@ void JuK::saveConfig()
KConfigGroupSaver saver(config, "Player"); KConfigGroupSaver saver(config, "Player");
if(m_sliderAction && m_sliderAction->getVolumeSlider()) if(m_sliderAction && m_sliderAction->getVolumeSlider())
config->writeEntry("Volume", m_sliderAction->getVolumeSlider()->value()); config->writeEntry("Volume", m_sliderAction->getVolumeSlider()->value());
if(m_randomPlayAction) if(m_randomPlayAction)
config->writeEntry("RandomPlay", m_randomPlayAction->isChecked()); config->writeEntry("RandomPlay", m_randomPlayAction->isChecked());
if(m_loopPlaylistAction) if(m_loopPlaylistAction)
config->writeEntry("LoopPlaylist", m_loopPlaylistAction->isChecked()); config->writeEntry("LoopPlaylist", m_loopPlaylistAction->isChecked());
} }
{ // view settings { // view settings
KConfigGroupSaver saver(config, "View"); KConfigGroupSaver saver(config, "View");
config->writeEntry("ShowEditor", m_showEditorAction->isChecked()); config->writeEntry("ShowEditor", m_showEditorAction->isChecked());
} }
{ // general settings { // general settings
KConfigGroupSaver saver(config, "Settings"); KConfigGroupSaver saver(config, "Settings");
config->writeEntry("RestoreOnLoad", m_restoreOnLoadAction->isChecked()); config->writeEntry("RestoreOnLoad", m_restoreOnLoadAction->isChecked());
config->writeEntry("ShowSplashScreen", m_toggleSplashAction->isChecked()); config->writeEntry("ShowSplashScreen", m_toggleSplashAction->isChecked());
config->writeEntry("DockInSystemTray", m_toggleSystemTrayAction->isChecked()); config->writeEntry("DockInSystemTray", m_toggleSystemTrayAction->isChecked());
config->writeEntry("DockOnClose", m_toggleDockOnCloseAction->isChecked()); config->writeEntry("DockOnClose", m_toggleDockOnCloseAction->isChecked());
config->writeEntry("TrackPopup", m_togglePopupsAction->isChecked()); config->writeEntry("TrackPopup", m_togglePopupsAction->isChecked());
if(m_outputSelectAction) if(m_outputSelectAction)
config->writeEntry("MediaSystem", m_outputSelectAction->currentItem()); config->writeEntry("MediaSystem", m_outputSelectAction->currentItem());
} }
config->sync(); config->sync();
} }
...@@ -392,13 +391,13 @@ void JuK::invokeEditSlot( const char *slotName, const char *slot ) ...@@ -392,13 +391,13 @@ void JuK::invokeEditSlot( const char *slotName, const char *slot )
QObject *object = focusWidget(); QObject *object = focusWidget();
if(!object || !slotName || !slot) if(!object || !slotName || !slot)
return; return;
QMetaObject *meta = object->metaObject(); QMetaObject *meta = object->metaObject();
QStrList l = meta->slotNames(true); QStrList l = meta->slotNames(true);
if(l.find(slotName) == -1) if(l.find(slotName) == -1)
return; return;
connect(this, SIGNAL(signalEdit()), object, slot); connect(this, SIGNAL(signalEdit()), object, slot);
emit signalEdit(); emit signalEdit();
...@@ -410,9 +409,9 @@ QString JuK::playingString() const ...@@ -410,9 +409,9 @@ QString JuK::playingString() const
QString s; QString s;
if(m_splitter->playingArtist().isEmpty()) if(m_splitter->playingArtist().isEmpty())
s = m_splitter->playingTrack().simplifyWhiteSpace(); s = m_splitter->playingTrack().simplifyWhiteSpace();
else else
s = m_splitter->playingArtist().simplifyWhiteSpace() + " - " + m_splitter->playingTrack().simplifyWhiteSpace(); s = m_splitter->playingArtist().simplifyWhiteSpace() + " - " + m_splitter->playingTrack().simplifyWhiteSpace();
return s; return s;
} }
...@@ -425,37 +424,37 @@ void JuK::updatePlaylistInfo() ...@@ -425,37 +424,37 @@ void JuK::updatePlaylistInfo()
void JuK::play(const QString &file) void JuK::play(const QString &file)
{ {
if(!m_player) if(!m_player)
return; return;
float volume = float(m_sliderAction->getVolumeSlider()->value()) / float(m_sliderAction->getVolumeSlider()->maxValue()); float volume = float(m_sliderAction->getVolumeSlider()->value()) / float(m_sliderAction->getVolumeSlider()->maxValue());
if(m_player->paused()) if(m_player->paused())
m_player->stop(); m_player->stop();
m_player->play(file, volume); m_player->play(file, volume);
// Make sure that the m_player actually starts before doing anything. // Make sure that the m_player actually starts before doing anything.
if(m_player->playing()) { if(m_player->playing()) {
m_pauseAction->setEnabled(true); m_pauseAction->setEnabled(true);
m_stopAction->setEnabled(true); m_stopAction->setEnabled(true);
m_backAction->setEnabled(true); m_backAction->setEnabled(true);
m_forwardAction->setEnabled(true); m_forwardAction->setEnabled(true);
m_sliderAction->getTrackPositionSlider()->setValue(0); m_sliderAction->getTrackPositionSlider()->setValue(0);
m_sliderAction->getTrackPositionSlider()->setEnabled(true); m_sliderAction->getTrackPositionSlider()->setEnabled(true);
m_playTimer->start(m_pollInterval); m_playTimer->start(m_pollInterval);
m_statusLabel->setPlayingItemInfo(playingString(), m_splitter->playingList()); m_statusLabel->setPlayingItemInfo(playingString(), m_splitter->playingList());
emit signalNewSong(playingString()); emit signalNewSong(playingString());
if(m_systemTray) if(m_systemTray)
m_systemTray->slotPlay(); m_systemTray->slotPlay();
} }
else else
stop(); stop();
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
...@@ -465,16 +464,16 @@ void JuK::play(const QString &file) ...@@ -465,16 +464,16 @@ void JuK::play(const QString &file)
void JuK::slotPlaylistChanged() void JuK::slotPlaylistChanged()
{ {
if(m_splitter->collectionListSelected()) { if(m_splitter->collectionListSelected()) {
m_savePlaylistAction->setEnabled(false); m_savePlaylistAction->setEnabled(false);
m_saveAsPlaylistAction->setEnabled(false); m_saveAsPlaylistAction->setEnabled(false);
m_renamePlaylistAction->setEnabled(false); m_renamePlaylistAction->setEnabled(false);
m_deleteItemPlaylistAction->setEnabled(false); m_deleteItemPlaylistAction->setEnabled(false);
} }
else { else {
m_savePlaylistAction->setEnabled(true); m_savePlaylistAction->setEnabled(true);
m_saveAsPlaylistAction->setEnabled(true); m_saveAsPlaylistAction->setEnabled(true);
m_renamePlaylistAction->setEnabled(true); m_renamePlaylistAction->setEnabled(true);
m_deleteItemPlaylistAction->setEnabled(true); m_deleteItemPlaylistAction->setEnabled(true);
} }
updatePlaylistInfo(); updatePlaylistInfo();
...@@ -516,7 +515,7 @@ void JuK::selectAll() ...@@ -516,7 +515,7 @@ void JuK::selectAll()
void JuK::play() void JuK::play()
{ {
if(!m_player) if(!m_player)
return; return;
if(m_player->paused()) { if(m_player->paused()) {
m_player->play(); m_player->play();
......
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