Deprecate Icon.

This commit is contained in:
Nuno Cruces 2022-05-04 23:22:19 +01:00
parent 9c94cda0a4
commit 402a163fe7
3 changed files with 8 additions and 2 deletions

View file

@ -35,6 +35,10 @@ The `zenity` command on macOS/WSL using [Homebrew](https://brew.sh/):
brew install ncruces/tap/zenity brew install ncruces/tap/zenity
The `zenity` command on Windows using [Scoop](https://scoop.sh/):
scoop install https://ncruces.github.io/scoop/zenity.json
The `zenity` command on macOS/Windows if you have Go: The `zenity` command on macOS/Windows if you have Go:
go install github.com/ncruces/zenity/cmd/zenity@latest go install github.com/ncruces/zenity/cmd/zenity@latest

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
TAG=$(git tag --points-at HEAD) TAG=$(git tag --points-at HEAD)
echo 'package main; const tag = "'$TAG'"' > tag.go echo 'package main; const tag = "'$TAG'"' | gofmt > tag.go
go run github.com/josephspurrier/goversioninfo/cmd/goversioninfo go run github.com/josephspurrier/goversioninfo/cmd/goversioninfo

View file

@ -129,7 +129,7 @@ func ExtraButton(extra string) Option {
return funcOption(func(o *options) { o.extraButton = &extra }) return funcOption(func(o *options) { o.extraButton = &extra })
} }
// DialogIcon is the enumeration for dialog icons. // DialogIcon is an Option that sets the dialog icon.
type DialogIcon int type DialogIcon int
func (i DialogIcon) apply(o *options) { o.icon = i } func (i DialogIcon) apply(o *options) { o.icon = i }
@ -146,6 +146,8 @@ const (
) )
// Icon returns an Option to set the dialog icon. // Icon returns an Option to set the dialog icon.
//
// Deprecated: use DialogIcon directly.
func Icon(icon DialogIcon) Option { return icon } func Icon(icon DialogIcon) Option { return icon }
// Context returns an Option to set a Context that can dismiss the dialog. // Context returns an Option to set a Context that can dismiss the dialog.