Changeset View
Changeset View
Standalone View
Standalone View
src/qt/macnotificationhandler.mm
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | if(this->hasUserNotificationCenterSupport()) { | ||||
[notificationCenterInstance performSelector:@selector(deliverNotification:) withObject:userNotification]; | [notificationCenterInstance performSelector:@selector(deliverNotification:) withObject:userNotification]; | ||||
[titleMac release]; | [titleMac release]; | ||||
[textMac release]; | [textMac release]; | ||||
[userNotification release]; | [userNotification release]; | ||||
} | } | ||||
} | } | ||||
bool MacNotificationHandler::hasUserNotificationCenterSupport(void) | bool MacNotificationHandler::hasUserNotificationCenterSupport() | ||||
{ | { | ||||
Class possibleClass = NSClassFromString(@"NSUserNotificationCenter"); | Class possibleClass = NSClassFromString(@"NSUserNotificationCenter"); | ||||
// check if users OS has support for NSUserNotification | // check if users OS has support for NSUserNotification | ||||
if(possibleClass!=nil) { | if(possibleClass!=nil) { | ||||
return true; | return true; | ||||
} | } | ||||
return false; | return false; | ||||
Show All 19 Lines |