fix mac backend (in theory)
This commit is contained in:
parent
fa733c1c8e
commit
db3295ba92
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
SnoreNotify is a Notification Framework based on Qt
|
SnoreNotify is a Notification Framework based on Qt
|
||||||
Copyright (C) 2013-2014 Patrick von Reth <vonreth@kde.org>
|
Copyright (C) 2013-2015 Patrick von Reth <vonreth@kde.org>
|
||||||
|
|
||||||
SnoreNotify is free software: you can redistribute it and/or modify
|
SnoreNotify is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
#ifndef OSXNOTIFICATIONCENTER_H
|
#ifndef OSXNOTIFICATIONCENTER_H
|
||||||
#define OSXNOTIFICATIONCENTER_H
|
#define OSXNOTIFICATIONCENTER_H
|
||||||
|
|
||||||
#include "core/plugins/snorebackend.h"
|
#include "libsnore/plugins/snorebackend.h"
|
||||||
|
|
||||||
class OSXNotificationCenter : public Snore::SnoreBackend
|
class OSXNotificationCenter : public Snore::SnoreBackend
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "osxnotificationcenter.h"
|
#include "osxnotificationcenter.h"
|
||||||
#include "core/plugins/snorebackend.h"
|
#include "libsnore/plugins/snorebackend.h"
|
||||||
|
#include "libsnore/utils.h"
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <objc/runtime.h>
|
#import <objc/runtime.h>
|
||||||
|
@ -36,8 +37,8 @@ bool OSXNotificationCenter::initialize(SnoreCore *snore)
|
||||||
void OSXNotificationCenter::slotNotify(Snore::Notification notification)
|
void OSXNotificationCenter::slotNotify(Snore::Notification notification)
|
||||||
{
|
{
|
||||||
NSUserNotification *osx_notification = [[NSUserNotification alloc] init];
|
NSUserNotification *osx_notification = [[NSUserNotification alloc] init];
|
||||||
osx_notification.title = NSStringFromQString(Snore::toPlainText(notification.title()));
|
osx_notification.title = NSStringFromQString(Utils::toPlainText(notification.title()));
|
||||||
osx_notification.informativeText = NSStringFromQString(Snore::toPlainText(notification.text()));
|
osx_notification.informativeText = NSStringFromQString(Utils::toPlainText(notification.text()));
|
||||||
|
|
||||||
[notification_center deliverNotification: osx_notification];
|
[notification_center deliverNotification: osx_notification];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue