fix mac backend (in theory)

This commit is contained in:
Patrick von Reth 2015-04-23 12:39:59 +02:00
parent fa733c1c8e
commit db3295ba92
2 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
/*
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
it under the terms of the GNU Lesser General Public License as published by
@ -19,7 +19,7 @@
#ifndef OSXNOTIFICATIONCENTER_H
#define OSXNOTIFICATIONCENTER_H
#include "core/plugins/snorebackend.h"
#include "libsnore/plugins/snorebackend.h"
class OSXNotificationCenter : public Snore::SnoreBackend
{

View File

@ -1,5 +1,6 @@
#include "osxnotificationcenter.h"
#include "core/plugins/snorebackend.h"
#include "libsnore/plugins/snorebackend.h"
#include "libsnore/utils.h"
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
@ -36,8 +37,8 @@ bool OSXNotificationCenter::initialize(SnoreCore *snore)
void OSXNotificationCenter::slotNotify(Snore::Notification notification)
{
NSUserNotification *osx_notification = [[NSUserNotification alloc] init];
osx_notification.title = NSStringFromQString(Snore::toPlainText(notification.title()));
osx_notification.informativeText = NSStringFromQString(Snore::toPlainText(notification.text()));
osx_notification.title = NSStringFromQString(Utils::toPlainText(notification.title()));
osx_notification.informativeText = NSStringFromQString(Utils::toPlainText(notification.text()));
[notification_center deliverNotification: osx_notification];