Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wiiznokes committed Sep 5, 2024
1 parent 10e5e55 commit f73b975
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 23 deletions.
24 changes: 4 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tracing-log = "0.2.0"
cosmic-config = { git = "https://github.com/pop-os/libcosmic" }
serde = { version = "1.0.152", features = ["derive"] }
freedesktop-desktop-entry = "0.7.4"
freedesktop-desktop-entry = "0.7.5"

[profile.release]
lto = "fat"
Expand Down
2 changes: 1 addition & 1 deletion cosmic-panel-button/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
license = "GPL-3.0"

[dependencies]
freedesktop-desktop-entry = "0.6.2"
freedesktop-desktop-entry.workspace = true
libcosmic.workspace = true
tracing-log.workspace = true
tracing-subscriber.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion cosmic-panel-button/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ pub fn main() -> iced::Result {
let filename = format!("{id}.desktop");
let mut desktop = None;
let locales = get_languages_from_env();

for mut path in freedesktop_desktop_entry::default_paths() {
path.push(&filename);
if let Ok(bytes) = fs::read_to_string(&path) {
if let Ok(entry) = DesktopEntry::from_str(&path, &bytes, &locales) {
if let Ok(entry) = DesktopEntry::from_str(&path, &bytes, Some(&locales)) {
desktop = Some(Desktop {
name: entry
.name(&locales)
Expand Down

0 comments on commit f73b975

Please sign in to comment.