Permalink
Browse files

Do not display non-urgent notifications in fallback mode

  • Loading branch information...
1 parent 4a3f183 commit 6f3b47cb3a1c591f2aa964dc2a3c2d5fa0c32e96 @amoskvin amoskvin committed Oct 24, 2012
Showing with 5 additions and 3 deletions.
  1. +4 −3 libraries/razorqt/razornotification.cpp
  2. +1 −0 razorqt-panel/plugin-volume/razorvolume.cpp
@@ -140,13 +140,14 @@ void RazorNotificationPrivate::update()
{
QDBusPendingReply<uint> reply = mInterface->Notify(qAppName(), mId, mIconName, mSummary, mBody, mActions, mHints, mTimeout);
reply.waitForFinished();
- if (reply.isError())
+ if (!reply.isError())
{
- QMessageBox::information(0, tr("Notifications Fallback"), mSummary + " \n\n " + mBody);
+ mId = reply.value();
}
else
{
- mId = reply.value();
+ if (mHints.contains("urgency") && mHints.value("urgency").toInt() != RazorNotification::UrgencyLow)
+ QMessageBox::information(0, tr("Notifications Fallback"), mSummary + " \n\n " + mBody);
}
}
@@ -92,6 +92,7 @@ RazorVolume::RazorVolume(const RazorPanelPluginStartInfo* startInfo, QWidget* pa
}
m_notification->setTimeout(1000);
+ m_notification->setUrgencyHint(RazorNotification::UrgencyLow);
connect(m_keyVolumeUp, SIGNAL(activated()), this, SLOT(handleShortcutVolumeUp()));
connect(m_keyVolumeDown, SIGNAL(activated()), this, SLOT(handleShortcutVolumeDown()));

0 comments on commit 6f3b47c

Please sign in to comment.