feat: implement set_app_icon

This commit is contained in:
2026-09-29 14:59:09 +02:00
parent fe9260e51f
commit bda1d6e675

View File

@@ -169,8 +169,13 @@ pub fn set_app_name(app_name: &str) -> Result<(), Box<dyn std::error::Error>> {
/// Sets the application icon. /// Sets the application icon.
/// Available since: 0.8.4 /// Available since: 0.8.4
pub fn set_app_icon(app_icon: &str) { ///
todo!(); /// app_icon is icon name or path to an image
pub fn set_app_icon(app_icon: &str) -> Result<(), Box<dyn std::error::Error>> {
let app_icon_c = std::ffi::CString::new(app_icon)?;
unsafe { notify_set_app_icon(app_icon_c.as_ptr()) };
Ok(())
} }
#[cfg(test)] #[cfg(test)]