Commit 5404caf6 authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Andreas Traczyk

utils: check registry to enable or disable system notification

Change-Id: I355ffa18f4f695faaee92a09a9da29e9e6d2d44c
parent 160106de
......@@ -275,8 +275,11 @@ Utils::setStackWidget(QStackedWidget* stack, QWidget* widget)
void Utils::showSystemNotification(QWidget* widget, const QString& message, long delay)
{
GlobalSystemTray::instance().showMessage(message, "", QIcon(":images/jami.png"));
QApplication::alert(widget, delay);
QSettings settings("jami.net", "Jami");
if (settings.value(SettingsKey::enableNotifications).toBool()) {
GlobalSystemTray::instance().showMessage(message, "", QIcon(":images/jami.png"));
QApplication::alert(widget, delay);
}
}
void Utils::showSystemNotification(QWidget* widget,
......@@ -284,8 +287,11 @@ void Utils::showSystemNotification(QWidget* widget,
const QString & message,
long delay)
{
GlobalSystemTray::instance().showMessage(sender, message, QIcon(":images/jami.png"));
QApplication::alert(widget, delay);
QSettings settings("jami.net", "Jami");
if (settings.value(SettingsKey::enableNotifications).toBool()) {
GlobalSystemTray::instance().showMessage(sender, message, QIcon(":images/jami.png"));
QApplication::alert(widget, delay);
}
}
QSize
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment