From 8962da380bb73d7ebe6dc1ad033e521412002e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 14 Apr 2016 18:29:00 +0200 Subject: [PATCH] LibnotifyLoader: add notify_notification_set_hint_string --- brightray/browser/linux/libnotify_loader.cc | 10 ++++++++++ brightray/browser/linux/libnotify_loader.h | 1 + 2 files changed, 11 insertions(+) diff --git a/brightray/browser/linux/libnotify_loader.cc b/brightray/browser/linux/libnotify_loader.cc index f5c384db56..9720e64d8c 100644 --- a/brightray/browser/linux/libnotify_loader.cc +++ b/brightray/browser/linux/libnotify_loader.cc @@ -92,6 +92,15 @@ bool LibNotifyLoader::Load(const std::string& library_name) { return false; } + notify_notification_set_hint_string = + reinterpret_castnotify_notification_set_hint_string)>( + dlsym(library_, "notify_notification_set_hint_string")); + notify_notification_set_hint_string = &::notify_notification_set_hint_string; + if (!notify_notification_set_hint_string) { + CleanUp(true); + return false; + } + notify_notification_show = reinterpret_castnotify_notification_show)>( dlsym(library_, "notify_notification_show")); @@ -128,6 +137,7 @@ void LibNotifyLoader::CleanUp(bool unload) { notify_notification_add_action = NULL; notify_notification_set_image_from_pixbuf = NULL; notify_notification_set_timeout = NULL; + notify_notification_set_hint_string = NULL; notify_notification_show = NULL; notify_notification_close = NULL; } diff --git a/brightray/browser/linux/libnotify_loader.h b/brightray/browser/linux/libnotify_loader.h index 818b0ddae0..825a349b39 100644 --- a/brightray/browser/linux/libnotify_loader.h +++ b/brightray/browser/linux/libnotify_loader.h @@ -26,6 +26,7 @@ class LibNotifyLoader { decltype(&::notify_notification_add_action) notify_notification_add_action; decltype(&::notify_notification_set_image_from_pixbuf) notify_notification_set_image_from_pixbuf; decltype(&::notify_notification_set_timeout) notify_notification_set_timeout; + decltype(&::notify_notification_set_hint_string) notify_notification_set_hint_string; decltype(&::notify_notification_show) notify_notification_show; decltype(&::notify_notification_close) notify_notification_close;