fixes
This commit is contained in:
parent
3e8c809089
commit
c9ebeca4d2
|
@ -20,6 +20,7 @@
|
||||||
#include "snore.h"
|
#include "snore.h"
|
||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
|
#include <QLabel>
|
||||||
|
|
||||||
|
|
||||||
using namespace Snore;
|
using namespace Snore;
|
||||||
|
@ -31,7 +32,7 @@ PluginSettingsWidget::PluginSettingsWidget(SnorePlugin *snorePlugin, QWidget *pa
|
||||||
m_enabled(new QCheckBox)
|
m_enabled(new QCheckBox)
|
||||||
{
|
{
|
||||||
setLayout(m_layout);
|
setLayout(m_layout);
|
||||||
addRow(snorePlugin->typeName(),nullptr);
|
addRow("Type:", new QLabel(snorePlugin->typeName()));
|
||||||
addRow("Enabled:",m_enabled);
|
addRow("Enabled:",m_enabled);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,13 +43,13 @@ FreedesktopFrontend::~FreedesktopFrontend()
|
||||||
dbus.unregisterService("org.freedesktop.Notifications");
|
dbus.unregisterService("org.freedesktop.Notifications");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FreedesktopFrontend::initialize(SnoreCore *snore)
|
bool FreedesktopFrontend::initialize()
|
||||||
{
|
{
|
||||||
m_adaptor = new NotificationsAdaptor(this);
|
m_adaptor = new NotificationsAdaptor(this);
|
||||||
QDBusConnection dbus = QDBusConnection::sessionBus();
|
QDBusConnection dbus = QDBusConnection::sessionBus();
|
||||||
if (dbus.registerService("org.freedesktop.Notifications") &&
|
if (dbus.registerService("org.freedesktop.Notifications") &&
|
||||||
dbus.registerObject("/org/freedesktop/Notifications", this)) {
|
dbus.registerObject("/org/freedesktop/Notifications", this)) {
|
||||||
return SnoreFrontend::initialize(snore);
|
return SnoreFrontend::initialize();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,11 +32,12 @@ class FreedesktopFrontend : public Snore::SnoreFrontend
|
||||||
public:
|
public:
|
||||||
FreedesktopFrontend();
|
FreedesktopFrontend();
|
||||||
~FreedesktopFrontend();
|
~FreedesktopFrontend();
|
||||||
virtual bool initialize(Snore::SnoreCore *snore);
|
virtual bool initialize() override;
|
||||||
virtual bool deinitialize();
|
virtual bool deinitialize() override;
|
||||||
|
|
||||||
|
void actionInvoked(Snore::Notification notification) override;
|
||||||
|
void notificationClosed(Snore::Notification notification) override;
|
||||||
|
|
||||||
void actionInvoked(Snore::Notification notification);
|
|
||||||
void notificationClosed(Snore::Notification notification);
|
|
||||||
uint Notify(const QString &app_name, uint replaces_id, const QString &app_icon, const QString &summary, const QString &body, const QStringList &actions, const QVariantMap &hints, int timeout);
|
uint Notify(const QString &app_name, uint replaces_id, const QString &app_icon, const QString &summary, const QString &body, const QStringList &actions, const QVariantMap &hints, int timeout);
|
||||||
void CloseNotification(uint id);
|
void CloseNotification(uint id);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue