aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Ui/skinned/mainwindow.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-12-14 15:12:20 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-12-14 15:12:20 +0000
commit92f1159a134f4d9dbd93176107afc48e4f77cb81 (patch)
tree4aa971c42e00d36cc8d588273f3ad0ff6b46fb16 /src/plugins/Ui/skinned/mainwindow.cpp
parent8351bd6fbf8b9b6b3360a0cfd6546127794d0b89 (diff)
downloadqmmp-92f1159a134f4d9dbd93176107afc48e4f77cb81.tar.gz
qmmp-92f1159a134f4d9dbd93176107afc48e4f77cb81.tar.bz2
qmmp-92f1159a134f4d9dbd93176107afc48e4f77cb81.zip
fixed saving of the playlist settings (Fixes issue 622)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3960 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Ui/skinned/mainwindow.cpp')
-rw-r--r--src/plugins/Ui/skinned/mainwindow.cpp32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/plugins/Ui/skinned/mainwindow.cpp b/src/plugins/Ui/skinned/mainwindow.cpp
index c1ec27841..378651079 100644
--- a/src/plugins/Ui/skinned/mainwindow.cpp
+++ b/src/plugins/Ui/skinned/mainwindow.cpp
@@ -36,6 +36,7 @@
#include <qmmpui/playlistmanager.h>
#include <qmmpui/mediaplayer.h>
#include <qmmpui/configdialog.h>
+#include <qmmpui/qmmpuisettings.h>
#include "hotkeyeditor.h"
#include "skinnedsettings.h"
#include "mainwindow.h"
@@ -68,6 +69,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
m_core = SoundCore::instance();
m_pl_manager = PlayListManager::instance();
m_uiHelper = UiHelper::instance();
+ m_ui_settings = QmmpUiSettings::instance();
//user interface
m_skin = new Skin(this);
@@ -99,8 +101,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
connect (m_playlist,SIGNAL(loadPlaylist()),SLOT(loadPlaylist()));
connect (m_playlist,SIGNAL(savePlaylist()),SLOT(savePlaylist()));
- connect(m_display,SIGNAL(shuffleToggled(bool)),m_pl_manager,SLOT(setShuffle(bool)));
- connect(m_display,SIGNAL(repeatableToggled(bool)),m_pl_manager,SLOT(setRepeatableList(bool)));
+ connect(m_display,SIGNAL(shuffleToggled(bool)),m_ui_settings,SLOT(setShuffle(bool)));
+ connect(m_display,SIGNAL(repeatableToggled(bool)),m_ui_settings,SLOT(setRepeatableList(bool)));
connect(m_core, SIGNAL(stateChanged(Qmmp::State)), SLOT(showState(Qmmp::State)));
connect(m_core, SIGNAL(elapsedChanged(qint64)),m_playlist, SLOT(setTime(qint64)));
@@ -241,10 +243,12 @@ void MainWindow::readSettings()
m_equalizer->setVisible(settings.value("eq_visible",true).toBool());
qApp->processEvents();
// Repeat/Shuffle
- m_display->setIsRepeatable(m_pl_manager->isRepeatableList());
- m_display->setIsShuffle(m_pl_manager->isShuffle());
- ACTION(ActionManager::REPEAT_ALL)->setChecked(m_pl_manager->isRepeatableList());
- ACTION(ActionManager::SHUFFLE)->setChecked(m_pl_manager->isShuffle());
+ m_display->setIsRepeatable(m_ui_settings->isRepeatableList());
+ m_display->setIsShuffle(m_ui_settings->isShuffle());
+ ACTION(ActionManager::REPEAT_ALL)->setChecked(m_ui_settings->isRepeatableList());
+ ACTION(ActionManager::SHUFFLE)->setChecked(m_ui_settings->isShuffle());
+ ACTION(ActionManager::REPEAT_TRACK)->setChecked(m_ui_settings->isRepeatableTrack());
+ ACTION(ActionManager::NO_PL_ADVANCE)->setChecked(m_ui_settings->isNoPlaylistAdvance());
m_update = true;
}
else
@@ -379,21 +383,21 @@ void MainWindow::createActions()
viewMenu->addAction(SET_ACTION(ActionManager::WM_DOUBLE_SIZE, this, SLOT(updateSettings())));
QMenu *plMenu = m_mainMenu->addMenu(tr("Playlist"));
- plMenu->addAction(SET_ACTION(ActionManager::REPEAT_ALL, m_pl_manager, SLOT(setRepeatableList(bool))));
- plMenu->addAction(SET_ACTION(ActionManager::REPEAT_TRACK, m_player, SLOT(setRepeatable(bool))));
- plMenu->addAction(SET_ACTION(ActionManager::SHUFFLE, m_pl_manager, SLOT(setShuffle(bool))));
- plMenu->addAction(SET_ACTION(ActionManager::NO_PL_ADVANCE, m_player,
+ plMenu->addAction(SET_ACTION(ActionManager::REPEAT_ALL, m_ui_settings, SLOT(setRepeatableList(bool))));
+ plMenu->addAction(SET_ACTION(ActionManager::REPEAT_TRACK, m_ui_settings, SLOT(setRepeatableTrack(bool))));
+ plMenu->addAction(SET_ACTION(ActionManager::SHUFFLE, m_ui_settings, SLOT(setShuffle(bool))));
+ plMenu->addAction(SET_ACTION(ActionManager::NO_PL_ADVANCE, m_ui_settings,
SLOT(setNoPlaylistAdvance(bool))));
plMenu->addAction(SET_ACTION(ActionManager::STOP_AFTER_SELECTED, m_pl_manager,
SLOT(stopAfterSelected())));
plMenu->addAction(SET_ACTION(ActionManager::CLEAR_QUEUE, m_pl_manager, SLOT(clearQueue())));
- connect(m_pl_manager, SIGNAL(repeatableListChanged(bool)),
+ connect(m_ui_settings, SIGNAL(repeatableListChanged(bool)),
ACTION(ActionManager::REPEAT_ALL), SLOT(setChecked(bool)));
- connect(m_player, SIGNAL (repeatableChanged(bool)),
+ connect(m_ui_settings, SIGNAL (repeatableTrackChanged(bool)),
ACTION(ActionManager::REPEAT_TRACK), SLOT(setChecked(bool)));
- connect(m_player, SIGNAL (noPlaylistAdvanceChanged(bool)),
+ connect(m_ui_settings, SIGNAL (noPlaylistAdvanceChanged(bool)),
ACTION(ActionManager::NO_PL_ADVANCE), SLOT(setChecked(bool)));
- connect(m_pl_manager, SIGNAL(shuffleChanged(bool)),
+ connect(m_ui_settings, SIGNAL(shuffleChanged(bool)),
ACTION(ActionManager::SHUFFLE), SLOT(setChecked(bool)));
QMenu *audioMenu = m_mainMenu->addMenu(tr("Audio"));