diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-28 16:02:50 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-28 16:02:50 -0400 |
| commit | 02d6a03ba3a657aa7b50d072771361236bb207a3 (patch) | |
| tree | 84b3f82db75150b88f31ef7547925c5f78664025 /dialog_windows.go | |
| parent | cd116033a380a119a3a025cb54873b5732cb3803 (diff) | |
Decided to make dialogs code-modal; will figure out how to get the behavior I want on Mac OS X - http://stackoverflow.com/questions/24468620/how-do-i-create-a-nested-run-loop-after-nsalert-beginsheetmodalforwindow-tha - Now to see if Windows works...
Diffstat (limited to 'dialog_windows.go')
| -rw-r--r-- | dialog_windows.go | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/dialog_windows.go b/dialog_windows.go index 5422f1c..18de661 100644 --- a/dialog_windows.go +++ b/dialog_windows.go @@ -38,20 +38,13 @@ func _msgBox(parent *Window, primarytext string, secondarytext string, uType uin 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)) } - w.sysData.winhandler.Event(Dismissed, &dialogret{ - res: dialogResponses[r1], - }) + return dialogResponses[r1] } func (w *Window) msgBox(primarytext string, secondarytext string) { - // send to uitask so the function can return immediately - touitask(func() { - _msgBox(w, primarytext, secondarytext, _MB_OK) - }) + _msgBox(w, primarytext, secondarytext, _MB_OK) } func (w *Window) msgBoxError(primarytext string, secondarytext string) { - touitask(func() { - _msgBox(w, primarytext, secondarytext, _MB_OK|_MB_ICONERROR) - }) + _msgBox(w, primarytext, secondarytext, _MB_OK|_MB_ICONERROR) } |
