Make messageboxes public

This commit is contained in:
idk
2020-05-11 19:57:58 -04:00
parent e5a77ddf79
commit 6561ff52f7
3 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ import (
"syscall"
)
func messageBox(title, text string) bool {
func MessageBox(title, text string) bool {
if runtime.GOOS == "linux" {
err := exec.Command("zenity", "--question", "--title", title, "--text", text).Run()
if err != nil {

View File

@ -31,7 +31,7 @@ import (
"unsafe"
)
func messageBox(title, text string) bool {
func MessageBox(title, text string) bool {
user32 := syscall.NewLazyDLL("user32.dll")
messageBoxW := user32.NewProc("MessageBoxW")
mbYesNo := 0x00000004

2
ui.go
View File

@ -150,7 +150,7 @@ func PromptDownload() {
text := "No Firefox installation was found. Would you like to download and install it now?"
// Ask user for confirmation
if !messageBox(title, text) {
if !MessageBox(title, text) {
return
}