diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-03-09 15:08:25 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-03-09 15:08:25 +0000 |
| commit | c17d0dff9aad1de684136b4902ac1e4bf4b844d4 (patch) | |
| tree | 7aa557635e8836063fd1090813eaa352df38655c /src/plugins/General/notifier/notifier.cpp | |
| parent | 149b790b31ad963e229f6ece2dfb26576d030bb6 (diff) | |
| download | qmmp-c17d0dff9aad1de684136b4902ac1e4bf4b844d4.tar.gz qmmp-c17d0dff9aad1de684136b4902ac1e4bf4b844d4.tar.bz2 qmmp-c17d0dff9aad1de684136b4902ac1e4bf4b844d4.zip | |
added playback resume notification (thanks to Adria Arrufat)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3302 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/notifier/notifier.cpp')
| -rw-r--r-- | src/plugins/General/notifier/notifier.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/plugins/General/notifier/notifier.cpp b/src/plugins/General/notifier/notifier.cpp index ed40ea9b9..8af0c8d6d 100644 --- a/src/plugins/General/notifier/notifier.cpp +++ b/src/plugins/General/notifier/notifier.cpp @@ -32,9 +32,11 @@ Notifier::Notifier(QObject *parent) : QObject(parent) m_popupWidget = 0; m_l = -1; m_r = -1; + m_isPaused = false; QSettings settings(Qmmp::configFile(), QSettings::IniFormat); settings.beginGroup("Notifier"); m_desktop = settings.value("song_notification", true).toBool(); + m_resumeNotification = settings.value("resume_notification", false).toBool(); m_showVolume = settings.value("volume_notification", true).toBool(); m_psi = settings.value("psi_notification", false).toBool(); settings.endGroup(); @@ -74,9 +76,31 @@ Notifier::~Notifier() void Notifier::setState(Qmmp::State state) { - if(state == Qmmp::Stopped) + switch ((uint) state) { + case Qmmp::Playing: + { + if (m_isPaused) + { + showMetaData(); + m_isPaused = false; + break; + } + } + case Qmmp::Paused: + { + if(m_resumeNotification) + m_isPaused = true; + break; + } + case Qmmp::Stopped: + { + m_isPaused = false; removePsiTuneFiles(); + break; + } + default: + m_isPaused = false; } } |
