feat: implement set_app_name

This commit is contained in:
2026-09-30 02:11:06 +02:00
parent b201baa7da
commit 606af59a86

View File

@@ -173,8 +173,13 @@ impl<'a> Notification {
/// Sets the application name for the notification. /// Sets the application name for the notification.
/// ///
/// If this function is not called, the application name will be set from the value used in init() or overridden with set_app_name(). /// If this function is not called, the application name will be set from the value used in init() or overridden with set_app_name().
pub fn set_app_name(&mut self, app_name: &str) { ///
todo!(); /// Available since: 0.7.3
pub fn set_app_name(&mut self, app_name: &str) -> Result<(), std::ffi::NulError> {
let app_name_c = std::ffi::CString::new(app_name)?;
unsafe { notify_notification_set_app_name(self.inner, app_name_c.as_ptr()) };
Ok(())
} }
/// Sets the category of this notification. /// Sets the category of this notification.