/***************************************************************************
-* Copyright (C) 2005-08 by the Quassel Project *
+* Copyright (C) 2005-09 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
#include "clientsettings.h"
#include "networkmodel.h"
-DesktopNotificationBackend::DesktopNotificationBackend(QObject *parent) : AbstractNotificationBackend(parent) {
- _configWidget = new ConfigWidget();
-
+DesktopNotificationBackend::DesktopNotificationBackend(QObject *parent)
+ : AbstractNotificationBackend(parent)
+{
_dbusInterface = new org::freedesktop::Notifications(
"org.freedesktop.Notifications",
"/org/freedesktop/Notifications",
notificationSettings.notify("DesktopNotification/QueueNotifications", this, SLOT(queueNotificationsChanged(const QVariant &)));
}
-DesktopNotificationBackend::~DesktopNotificationBackend() {
- delete _configWidget;
-}
-
void DesktopNotificationBackend::enabledChanged(const QVariant &v) {
_enabled = v.toBool();
}
void DesktopNotificationBackend::desktopNotificationInvoked(uint id, const QString & action) {
Q_UNUSED(id); Q_UNUSED(action);
+ emit activated();
}
-SettingsPage *DesktopNotificationBackend::configWidget() const {
- return _configWidget;
+SettingsPage *DesktopNotificationBackend::createConfigWidget() const {
+ return new ConfigWidget();
}
/***************************************************************************/
NotificationSettings s;
enabled = s.value("DesktopNotification/Enabled", false).toBool();
useTimeout = s.value("DesktopNotification/UseTimeout", true).toBool();
- timeout = s.value("DesktopNotification/Timeout", 10).toInt();
+ timeout = s.value("DesktopNotification/Timeout", 10000).toInt();
useHints = s.value("DesktopNotification/UseHints", false).toBool();
xHint = s.value("DesktopNotification/XHint", 0).toInt();
yHint = s.value("DesktopNotification/YHint", 0).toInt();