Repository navigation
[0.16.x] gtk3: Don't use the message description as a format string - #353
Merged
PolyMeilex merged 1 commit intoOct 20, 2026
Merged
Conversation
Backport of PolyMeilex#344 (master commit 9eb59f2) to 0.16.x. The description is passed to gtk_message_dialog_format_secondary_text as the argument of a "%s" format instead of as the format itself. The format is written as b"%s\0", like the title format in the same file, rather than master's c"%s": C string literals need Rust 1.77, and 0.16 declares no minimum Rust version.
Contributor
Author
|
The remaining red check is the Ubuntu XDG cargo-deny job. It reports unmaintained-dependency advisories for The separate Ubuntu XDG build and tests pass on the same commit, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #344 to
0.16.x, for a 0.16.1.tauri-plugin-dialog2.8.3 and 3.0.0-alpha.4 both requirerfd ^0.16, so Tauri apps could pick up the fix withcargo update -p rfd.The change matches 9eb59f2 on
master, except that the format is written asb"%s\0", like the existing title format in the same function, instead ofc"%s". C string literals need Rust 1.77, and 0.16 doesn't declare a minimum Rust version, so I didn't want a patch release to need a newer compiler. Because of that, Clippy reports one newmanual_c_str_literalswarning, the same warning it already reports for the title format.The changelog entry is under Unreleased, so you can choose the version heading. I didn't bump the version.
Testing
I built a small binary against 0.16.0 from crates.io and against this branch with
default-features = false, features = ["gtk3"], and showed each description with bothMessageDialog::showandAsyncMessageDialog::showin a headless mutter session (GTK 3.24.52, GLib 2.90.1):Saved 100% of your files.Saved 10032f your files.Saved 100% of your files.100%%100%100%%%s%s%s%s%s%s%s%sThe sync and async paths gave the same results.
cargo buildandcargo testwith--no-default-features --features gtk3, andcargo build --no-default-features --features xdg-portal,tokio, pass.