wip: use desktop file stem for app id

This commit is contained in:
Ashley Wulber 2022-07-19 23:39:19 -04:00
parent 223c7855cf
commit adc02df64f
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
12 changed files with 209 additions and 146 deletions

View file

@ -95,7 +95,10 @@ impl DockObject {
if let Some(path) = path.to_str() {
if let Some(app_info) = gio::DesktopAppInfo::new(path) {
if app_info.should_show()
&& Some(&first.app_id) == app_info.id().map(|s| s.to_string()).as_ref()
&& Some(&first.app_id)
== app_info.filename().and_then(|p| p
.file_stem()
.and_then(|s| s.to_str().map(|s| s.to_string()))).as_ref()
{
return Some(app_info);
}
@ -109,7 +112,7 @@ impl DockObject {
} else {
None
};
// dbg!(&appinfo);
Object::new(&[("appinfo", &appinfo), ("active", &results)])
.expect("Failed to create `DockObject`.")
}