Tweaks.
This commit is contained in:
parent
80459ed6ff
commit
c214d2b6ff
2 changed files with 14 additions and 4 deletions
|
@ -1,12 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
GOOS=windows GOARCH=386 go build -ldflags="-s -w" &&
|
||||
GOOS=windows GOARCH=386 go build -ldflags="-s -w" -trimpath &&
|
||||
zip -9 zenity_win32.zip zenity.exe
|
||||
|
||||
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" &&
|
||||
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -trimpath &&
|
||||
zip -9 zenity_win64.zip zenity.exe
|
||||
|
||||
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" &&
|
||||
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -trimpath &&
|
||||
zip -9 zenity_macos.zip zenity
|
||||
|
||||
go build
|
||||
|
|
|
@ -129,7 +129,7 @@ func setupFlags() {
|
|||
|
||||
// Message options
|
||||
flag.StringVar(&text, "text", "", "Set the dialog text")
|
||||
flag.StringVar(&icon, "icon-name", "", "Set the dialog icon (error, info, question, warning)")
|
||||
flag.StringVar(&icon, "icon-name", "", "Set the dialog icon (dialog-error, dialog-information, dialog-question, dialog-warning)")
|
||||
flag.StringVar(&okLabel, "ok-label", "", "Set the label of the OK button")
|
||||
flag.StringVar(&cancelLabel, "cancel-label", "", "Set the label of the Cancel button")
|
||||
flag.StringVar(&extraButton, "extra-button", "", "Add an extra button")
|
||||
|
@ -202,6 +202,16 @@ func loadFlags() []zenity.Option {
|
|||
// Message options
|
||||
|
||||
var ico zenity.DialogIcon
|
||||
switch {
|
||||
case errorDlg:
|
||||
ico = zenity.ErrorIcon
|
||||
case infoDlg:
|
||||
ico = zenity.InfoIcon
|
||||
case warningDlg:
|
||||
ico = zenity.WarningIcon
|
||||
case questionDlg:
|
||||
ico = zenity.QuestionIcon
|
||||
}
|
||||
switch icon {
|
||||
case "error", "dialog-error":
|
||||
ico = zenity.ErrorIcon
|
||||
|
|
Loading…
Reference in a new issue