diff --git a/src/qtgui/guiutils.cpp b/src/qtgui/guiutils.cpp
index 79ef724f..41085fcd 100644
--- a/src/qtgui/guiutils.cpp
+++ b/src/qtgui/guiutils.cpp
@@ -305,6 +305,7 @@ void rwSettings(bool writing)
Bool, false);
SETTING_RW(prefs.showTrayIcon, "/Recoll/prefs/showTrayIcon", Bool, false);
SETTING_RW(prefs.closeToTray, "/Recoll/prefs/closeToTray", Bool, false);
+ SETTING_RW(prefs.trayMessages, "/Recoll/prefs/trayMessages", Bool, false);
SETTING_RW(prefs.showTempFileWarning, "Recoll/prefs/showTempFileWarning",
Int, -1);
diff --git a/src/qtgui/guiutils.h b/src/qtgui/guiutils.h
index 2d3ec863..60d5e99b 100644
--- a/src/qtgui/guiutils.h
+++ b/src/qtgui/guiutils.h
@@ -141,7 +141,8 @@ class PrefsPack {
bool showTrayIcon{false};
bool closeToTray{false};
-
+ bool trayMessages{false};
+
int showTempFileWarning;
// Advanced search window clause list state
diff --git a/src/qtgui/rclmain_w.cpp b/src/qtgui/rclmain_w.cpp
index 97a569c6..0597d360 100644
--- a/src/qtgui/rclmain_w.cpp
+++ b/src/qtgui/rclmain_w.cpp
@@ -637,7 +637,7 @@ void RclMain::adjustPrefsMenu()
void RclMain::showTrayMessage(const QString& text)
{
- if (m_trayicon)
+ if (m_trayicon && prefs.trayMessages)
m_trayicon->showMessage("Recoll", text,
QSystemTrayIcon::Information, 1000);
}
diff --git a/src/qtgui/uiprefs.ui b/src/qtgui/uiprefs.ui
index 228f2166..5a103701 100644
--- a/src/qtgui/uiprefs.ui
+++ b/src/qtgui/uiprefs.ui
@@ -351,6 +351,16 @@
+ -
+
+
+ Generate desktop notifications.
+
+
+ false
+
+
+
-
diff --git a/src/qtgui/uiprefs_w.cpp b/src/qtgui/uiprefs_w.cpp
index 879a4585..3d6f18ff 100644
--- a/src/qtgui/uiprefs_w.cpp
+++ b/src/qtgui/uiprefs_w.cpp
@@ -143,12 +143,17 @@ void UIPrefsDialog::setFromPrefs()
initStartAdvCB->setChecked(prefs.startWithAdvSearchOpen);
keepSortCB->setChecked(prefs.keepSort);
+
showTrayIconCB->setChecked(prefs.showTrayIcon);
if (!prefs.showTrayIcon) {
prefs.closeToTray = false;
+ prefs.trayMessages = false;
}
closeToTrayCB->setEnabled(showTrayIconCB->checkState());
+ trayMessagesCB->setEnabled(showTrayIconCB->checkState());
closeToTrayCB->setChecked(prefs.closeToTray);
+ trayMessagesCB->setChecked(prefs.trayMessages);
+
showTempFileWarningCB->setChecked(prefs.showTempFileWarning == -1);
anchorTamilHackCB->setChecked(settings.value("anchorSpcHack", 0).toBool());
previewHtmlCB->setChecked(prefs.previewHtml);
@@ -339,6 +344,8 @@ void UIPrefsDialog::accept()
prefs.showTrayIcon = showTrayIconCB->isChecked();
m_mainWindow->enableTrayIcon(prefs.showTrayIcon);
prefs.closeToTray = closeToTrayCB->isChecked();
+ prefs.trayMessages = trayMessagesCB->isChecked();
+
prefs.showTempFileWarning = showTempFileWarningCB->isChecked() ?
-1 : 1024;
settings.setValue("anchorSpcHack", anchorTamilHackCB->isChecked());
@@ -598,8 +605,10 @@ void UIPrefsDialog::on_showTrayIconCB_clicked()
{
if (!showTrayIconCB->checkState()) {
closeToTrayCB->setChecked(false);
+ trayMessagesCB->setChecked(false);
}
closeToTrayCB->setEnabled(showTrayIconCB->checkState());
+ trayMessagesCB->setEnabled(showTrayIconCB->checkState());
}
/**