Remove dbus from Windows build

This commit is contained in:
lupoDharkael
2017-12-26 02:00:07 +01:00
parent fc9c576c1f
commit 77aa604127
7 changed files with 77 additions and 15 deletions

View File

@@ -35,9 +35,13 @@ Controller::Controller() : m_captureWindow(nullptr)
qApp->setQuitOnLastWindowClosed(false);
// init tray icon
#ifdef Q_OS_LINUX
if (!ConfigHandler().disabledTrayIconValue()) {
enableTrayIcon();
}
#else
enableTrayIcon();
#endif
initDefaults();
@@ -123,10 +127,22 @@ void Controller::enableTrayIcon() {
}
void Controller::disableTrayIcon() {
#ifdef Q_OS_LINUX
if (m_trayIcon) {
m_trayIcon->deleteLater();
}
ConfigHandler().setDisabledTrayIcon(true);
#endif
}
void Controller::sendTrayNotification(
const QString &text,
const QString &title,
const int timeout)
{
if (m_trayIcon) {
m_trayIcon->showMessage(title, text, QSystemTrayIcon::Information, timeout);
}
}
void Controller::updateConfigComponents() {