Display notifications when a torrent is added. Closes #334 and #915.

This commit is contained in:
sledgehammer999
2016-04-17 22:56:51 +03:00
parent 31d04cffd9
commit ef6e848756
10 changed files with 70 additions and 23 deletions

View File

@@ -320,7 +320,7 @@ void SearchWidget::searchStarted()
// Error | Stopped by user | Finished normally
void SearchWidget::searchFinished(bool cancelled)
{
if (Preferences::instance()->useProgramNotification() && (m_mainWindow->currentTabWidget() != this))
if (m_mainWindow->isNotificationsEnabled() && (m_mainWindow->currentTabWidget() != this))
m_mainWindow->showNotificationBaloon(tr("Search Engine"), tr("Search has finished"));
if (m_activeSearchTab.isNull()) return; // The active tab was closed
@@ -338,7 +338,7 @@ void SearchWidget::searchFinished(bool cancelled)
void SearchWidget::searchFailed()
{
if (Preferences::instance()->useProgramNotification() && (m_mainWindow->currentTabWidget() != this))
if (m_mainWindow->isNotificationsEnabled() && (m_mainWindow->currentTabWidget() != this))
m_mainWindow->showNotificationBaloon(tr("Search Engine"), tr("Search has failed"));
if (m_activeSearchTab.isNull()) return; // The active tab was closed