Skip to content

Commit

Permalink
feat: add tray icon
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Noah committed Aug 13, 2024
1 parent ffcf206 commit 75f3212
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ serde = { version = "1.0.203", features = ["derive"] }
serde-xml-rs = "0.6.0"

[target.'cfg(windows)'.dependencies]
win32utils = "0.2.0"
# win32utils = "0.2.0"
win32utils = "0.3.0"

[target.'cfg(windows)'.dependencies.windows]
version = "0.58.0"
Expand Down
5 changes: 0 additions & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@ pub fn add_resource(name: String) {
}

#[cfg(target_os = "windows")]
#[cfg(not(debug_assertions))]
fn main() {
add_resource(String::from("resources"));
}

#[cfg(target_os = "windows")]
#[cfg(debug_assertions)]
fn main() {}

#[cfg(not(target_os = "windows"))]
fn main() {}
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ fn main() {
// Ensure the new process has time to start
thread::sleep(Duration::from_secs(2));
} else {
thread::spawn(|| {
win32utils::shell::tray_icon("Steam Screenshot Manager");
});

watch();
}
}
Expand Down

0 comments on commit 75f3212

Please sign in to comment.