Add option to disable notifications in desktop

This commit is contained in:
lupoDharkael
2017-06-14 19:52:29 +02:00
parent 246b5e7651
commit b1c86b9ba8
5 changed files with 40 additions and 8 deletions

View File

@@ -85,6 +85,7 @@ void Controller::initDefaults() {
if (!settings.value("initiated").toBool()) {
settings.setValue("initiated", true);
settings.setValue("showHelp", true);
settings.setValue("showDesktopNotification", true);
settings.setValue("drawColor", QColor(Qt::red));
//settings.setValue("mouseVisible", false);
settings.setValue("uiColor", QColor(116, 0, 150));
@@ -140,5 +141,8 @@ void Controller::openInfoWindow() {
}
void Controller::showMessage(QString msg) {
m_trayIcon->showMessage("Flameshot Info", msg);
bool showMessages = QSettings().value("showDesktopNotification").toBool();
if (showMessages) {
m_trayIcon->showMessage("Flameshot Info", msg);
}
}