From 402a163fe7ced1f8dfeb9100c0e28e6fdb33a4bb Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Wed, 4 May 2022 23:22:19 +0100 Subject: [PATCH] Deprecate Icon. --- README.md | 4 ++++ cmd/zenity/build.sh | 2 +- zenity.go | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 778e29a..fdd90f6 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,10 @@ The `zenity` command on macOS/WSL using [Homebrew](https://brew.sh/): 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: go install github.com/ncruces/zenity/cmd/zenity@latest diff --git a/cmd/zenity/build.sh b/cmd/zenity/build.sh index 0447477..95ad0b7 100755 --- a/cmd/zenity/build.sh +++ b/cmd/zenity/build.sh @@ -1,7 +1,7 @@ #!/bin/bash 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 diff --git a/zenity.go b/zenity.go index b12a144..d093c8a 100644 --- a/zenity.go +++ b/zenity.go @@ -129,7 +129,7 @@ func ExtraButton(extra string) Option { 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 func (i DialogIcon) apply(o *options) { o.icon = i } @@ -146,6 +146,8 @@ const ( ) // Icon returns an Option to set the dialog icon. +// +// Deprecated: use DialogIcon directly. func Icon(icon DialogIcon) Option { return icon } // Context returns an Option to set a Context that can dismiss the dialog.