Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog


## [0.5.2](https://github.com/allenbenz/winrt-notification/compare/v0.5.1...v0.5.2) - 2025-03-12

### Added

- feat: add tracing support and update dependencies in Cargo.toml

- Added tracing-subscriber and tracing dependencies for enhanced logging
- Integrated tracing initialization in multiple example files (image.rs,
reuse_arguments.rs, reuse_toast.rs, simple.rs, without_library.rs)
- Revised related documentation in lib.rs for clarity on tracing usage
- HORNERs Quality checks (fmt,fix,audit) [davehorner](https://github.com/davehorner)



## 0.5.1
- Re-export windows::runtime::Result
- Add support for scenarios
Expand Down Expand Up @@ -45,4 +60,4 @@
[i1]: https://github.com/allenbenz/winrt-notification/issues/1
[i2]: https://github.com/allenbenz/winrt-notification/issues/2
[i3]: https://github.com/allenbenz/winrt-notification/issues/3
[i4]: https://github.com/allenbenz/winrt-notification/issues/4
[i4]: https://github.com/allenbenz/winrt-notification/issues/4
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "winrt-notification"
version = "0.5.1"
version = "0.5.2"
authors = ["allenbenz"]
keywords = ["notification", "windows", "toast", "notify"]
readme = "README.md"
Expand All @@ -17,6 +17,8 @@ default-target = "x86_64-pc-windows-msvc"
[dependencies]
xml-rs = "0.8.4"
strum = { version = "0.22.0", features = ["derive"] }
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
tracing = "0.1.41"

[target.'cfg(target_env = "msvc")'.dependencies.windows]
version = "0.24.0"
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,8 @@ fn main() {
.expect("unable to toast");
}
```

## Contributors

Thanks to:
* v0.5.2 - feat: [add tracing support](https://github.com/allenbenz/winrt-notification/pull/27), quality checks (fmt,fix,audit), and update dependencies in Cargo.toml. [davehorner](https://github.com/davehorner)
8 changes: 3 additions & 5 deletions examples/image.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use winrt_notification::init_tracing;
extern crate winrt_notification;
use std::path::Path;
use winrt_notification::{
Expand All @@ -6,13 +7,10 @@ use winrt_notification::{
};

fn main() {
init_tracing();
Toast::new("application that needs a toast with an image")
.hero(&Path::new("C:\\absolute\\path\\to\\image.jpeg"), "alt text")
.icon(
&Path::new("c:/this/style/works/too/image.png"),
IconCrop::Circular,
"alt text",
)
.icon(&Path::new("c:/this/style/works/too/image.png"), IconCrop::Circular, "alt text")
.title("Lots of pictures here")
.text1("One above the text as the hero")
.text2("One to the left as an icon, and several below")
Expand Down
2 changes: 2 additions & 0 deletions examples/reuse_arguments.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use winrt_notification::init_tracing;
extern crate winrt_notification;
use winrt_notification::{
Duration,
Expand All @@ -6,6 +7,7 @@ use winrt_notification::{
};

fn main() {
init_tracing();
let duration = Duration::Short;
let sound = Some(Sound::SMS);

Expand Down
8 changes: 7 additions & 1 deletion examples/reuse_toast.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
use winrt_notification::init_tracing;
extern crate winrt_notification;
use winrt_notification::{Duration, Sound, Toast};
use winrt_notification::{
Duration,
Sound,
Toast,
};

fn main() {
init_tracing();
let duration = Duration::Short;
let sound = Some(Sound::SMS);

Expand Down
2 changes: 2 additions & 0 deletions examples/simple.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use winrt_notification::init_tracing;
extern crate winrt_notification;
use winrt_notification::{
Duration,
Expand All @@ -6,6 +7,7 @@ use winrt_notification::{
};

fn main() {
init_tracing();
Toast::new(Toast::POWERSHELL_APP_ID)
.title("Look at this flip!")
.text1("(╯°□°)╯︵ ┻━┻")
Expand Down
2 changes: 2 additions & 0 deletions examples/without_library.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use winrt_notification::init_tracing;
// How to create a toast without using this library

extern crate xml;
Expand All @@ -20,6 +21,7 @@ pub use windows::runtime::{
};

fn main() {
init_tracing();
do_toast().expect("not sure if this is actually failable");
// this is a hack to workaround toasts not showing up if the application closes too quickly
// you can put this in do_toast if you want.
Expand Down
Loading