Revert all changes to dialog_windows.go because it's interfering with my fixup of sysdata_windows.go.
This commit is contained in:
parent
dbf2d8fde7
commit
17a6c94e90
|
@ -28,20 +28,23 @@ func _msgBox(parent *Window, primarytext string, secondarytext string, uType uin
|
||||||
}
|
}
|
||||||
retchan := make(chan int)
|
retchan := make(chan int)
|
||||||
go func() {
|
go func() {
|
||||||
ret := make(chan int)
|
ret := make(chan uiret)
|
||||||
defer close(ret)
|
defer close(ret)
|
||||||
uitask <- func() {
|
uitask <- &uimsg{
|
||||||
r1, _, err := _messageBox.Call(
|
call: _messageBox,
|
||||||
|
p: []uintptr{
|
||||||
uintptr(parenthwnd),
|
uintptr(parenthwnd),
|
||||||
utf16ToArg(ptext),
|
utf16ToArg(ptext),
|
||||||
utf16ToArg(ptitle),
|
utf16ToArg(ptitle),
|
||||||
uintptr(uType))
|
uintptr(uType),
|
||||||
if r1 == 0 { // failure
|
},
|
||||||
panic(fmt.Sprintf("error displaying message box to user: %v\nstyle: 0x%08X\ntitle: %q\ntext:\n%s", err, uType, os.Args[0], text))
|
ret: ret,
|
||||||
}
|
|
||||||
ret <- int(r1) // so as to not hang up uitask
|
|
||||||
}
|
}
|
||||||
retchan <- <-ret
|
r := <-ret
|
||||||
|
if r.ret == 0 { // failure
|
||||||
|
panic(fmt.Sprintf("error displaying message box to user: %v\nstyle: 0x%08X\ntitle: %q\ntext:\n%s", r.err, uType, os.Args[0], text))
|
||||||
|
}
|
||||||
|
retchan <- int(r.ret)
|
||||||
}()
|
}()
|
||||||
return retchan
|
return retchan
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue