From b201baa7da60fb611db32e2f3d9ceb8ac5f73bc0 Mon Sep 17 00:00:00 2001 From: szymon Date: Wed, 30 Sep 2026 02:08:45 +0200 Subject: [PATCH] feat: implement set_app_icon --- src/notification.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/notification.rs b/src/notification.rs index c096a40..89c8cbe 100644 --- a/src/notification.rs +++ b/src/notification.rs @@ -160,11 +160,14 @@ impl<'a> Notification { /// Sets the application icon for the notification. /// /// If this function is not called, the application icon will be set from the value set via - /// set_app_icon(). + /// `set_app_icon()`. /// /// Available since: 0.8.4 - pub fn set_app_icon(&mut self, app_icon: &str) { - todo!(); + pub fn set_app_icon(&mut self, app_icon: &str) -> Result<(), Box> { + let app_icon_c = std::ffi::CString::new(app_icon)?; + unsafe { notify_notification_set_app_icon(self.inner, app_icon_c.as_ptr()) }; + + Ok(()) } /// Sets the application name for the notification.