mirror of
https://github.com/szymon-jozef/libnotify-rs.git
synced 2026-10-27 19:20:43 +01:00
feat: implement set_app_name
This commit is contained in:
@@ -160,8 +160,11 @@ unsafe fn c_str_to_rs_str_and_free(c_str: *mut std::os::raw::c_char) -> Option<S
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/// Sets the application name
|
/// Sets the application name
|
||||||
pub fn set_app_name(app_name: &str) {
|
pub fn set_app_name(app_name: &str) -> Result<(), Box<dyn std::error::Error>> {
|
||||||
todo!();
|
let app_name_c = std::ffi::CString::new(app_name)?;
|
||||||
|
unsafe { notify_set_app_name(app_name_c.as_ptr()) };
|
||||||
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the application icon.
|
/// Sets the application icon.
|
||||||
|
|||||||
Reference in New Issue
Block a user