diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-12-14 15:12:20 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-12-14 15:12:20 +0000 |
| commit | 92f1159a134f4d9dbd93176107afc48e4f77cb81 (patch) | |
| tree | 4aa971c42e00d36cc8d588273f3ad0ff6b46fb16 /src/plugins/General/mpris/mpris1/playerobject.cpp | |
| parent | 8351bd6fbf8b9b6b3360a0cfd6546127794d0b89 (diff) | |
| download | qmmp-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/General/mpris/mpris1/playerobject.cpp')
| -rw-r--r-- | src/plugins/General/mpris/mpris1/playerobject.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/plugins/General/mpris/mpris1/playerobject.cpp b/src/plugins/General/mpris/mpris1/playerobject.cpp index 8d6d0e165..27c9ca9fa 100644 --- a/src/plugins/General/mpris/mpris1/playerobject.cpp +++ b/src/plugins/General/mpris/mpris1/playerobject.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2009 by Ilya Kotov * + * Copyright (C) 2008-2013 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -25,7 +25,7 @@ #include <qmmp/metadatamanager.h> #include <qmmpui/mediaplayer.h> #include <qmmpui/playlistmanager.h> - +#include <qmmpui/qmmpuisettings.h> #include "playerobject.h" @@ -59,12 +59,13 @@ PlayerObject::PlayerObject(QObject *parent) : QObject(parent) m_core = SoundCore::instance(); m_player = MediaPlayer::instance(); m_pl_manager = m_player->playListManager(); + m_ui_settings = QmmpUiSettings::instance(); connect(m_core, SIGNAL(stateChanged (Qmmp::State)), SLOT(updateCaps())); connect(m_core, SIGNAL(metaDataChanged ()), SLOT(updateTrack())); connect(m_core, SIGNAL(stateChanged (Qmmp::State)), SLOT(updateStatus())); - connect(m_pl_manager, SIGNAL(repeatableListChanged(bool)), SLOT(updateStatus())); - connect(m_pl_manager, SIGNAL(shuffleChanged(bool)), SLOT(updateStatus())); - connect(m_player, SIGNAL(repeatableChanged(bool)), SLOT(updateStatus())); + connect(m_ui_settings, SIGNAL(repeatableListChanged(bool)), SLOT(updateStatus())); + connect(m_ui_settings, SIGNAL(shuffleChanged(bool)), SLOT(updateStatus())); + connect(m_ui_settings, SIGNAL(repeatableTrackChanged(bool)), SLOT(updateStatus())); } PlayerObject::~PlayerObject() @@ -97,7 +98,7 @@ void PlayerObject::Play() void PlayerObject::Repeat(bool in0) { - m_player->setRepeatable(in0); + m_ui_settings->setRepeatableTrack(in0); } PlayerStatus PlayerObject::GetStatus() @@ -117,9 +118,9 @@ PlayerStatus PlayerObject::GetStatus() case Qmmp::Paused: st.state = 1; }; - st.random = int(m_pl_manager->isShuffle()); - st.repeat = int(m_player->isRepeatable()); - st.repeatPlayList = int(m_pl_manager->isRepeatableList()); + st.random = int(m_ui_settings->isShuffle()); + st.repeat = int(m_ui_settings->isRepeatableTrack()); + st.repeatPlayList = int(m_ui_settings->isRepeatableList()); return st; } |
