fix(desktop): split categories by semi-colon terminator
This commit is contained in:
parent
d9228d78c6
commit
be00b0ec4b
1 changed files with 7 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ pub struct DesktopEntryData {
|
||||||
pub exec: Option<String>,
|
pub exec: Option<String>,
|
||||||
pub icon: IconSource,
|
pub icon: IconSource,
|
||||||
pub path: Option<PathBuf>,
|
pub path: Option<PathBuf>,
|
||||||
pub categories: String,
|
pub categories: Vec<String>,
|
||||||
pub desktop_actions: Vec<DesktopAction>,
|
pub desktop_actions: Vec<DesktopAction>,
|
||||||
pub mime_types: Vec<Mime>,
|
pub mime_types: Vec<Mime>,
|
||||||
pub prefers_dgpu: bool,
|
pub prefers_dgpu: bool,
|
||||||
|
|
@ -163,7 +163,12 @@ impl DesktopEntryData {
|
||||||
name,
|
name,
|
||||||
icon,
|
icon,
|
||||||
path: path.into(),
|
path: path.into(),
|
||||||
categories: de.categories().unwrap_or_default().to_string(),
|
categories: de
|
||||||
|
.categories()
|
||||||
|
.unwrap_or_default()
|
||||||
|
.split_terminator(';')
|
||||||
|
.map(|x| x.to_string())
|
||||||
|
.collect(),
|
||||||
desktop_actions: de
|
desktop_actions: de
|
||||||
.actions()
|
.actions()
|
||||||
.map(|actions| {
|
.map(|actions| {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue