Native notifications switched off by default. Libnotify supported.

This commit is contained in:
John Preston
2016-10-03 18:07:50 +03:00
parent 6db52f7fa9
commit c9288f2d0a
15 changed files with 348 additions and 85 deletions
@@ -22,6 +22,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "platform/linux/main_window_linux.h"
#include "platform/linux/linux_libs.h"
#include "platform/platform_notifications_manager.h"
#include "mainwindow.h"
#include "application.h"
#include "lang.h"
@@ -355,6 +356,10 @@ void MainWindow::psUpdateCounter() {
}
}
bool MainWindow::psHasNativeNotifications() {
return Notifications::supported();
}
void MainWindow::LibsLoaded() {
QString cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower();
noQtTrayIcon = (cdesktop == qstr("pantheon")) || (cdesktop == qstr("gnome"));