showErrorDialog shows an error message.
(errorMessage string)
| 229 | |
| 230 | // showErrorDialog shows an error message. |
| 231 | func showErrorDialog(errorMessage string) { |
| 232 | if mainWindow != nil { |
| 233 | ch := make(chan bool) |
| 234 | err := errors.New(errorMessage) |
| 235 | errorDialog := dialog.NewError(err, mainWindow) |
| 236 | errorDialog.SetOnClosed(func() { |
| 237 | ch <- true |
| 238 | }) |
| 239 | errorDialog.Show() |
| 240 | <-ch |
| 241 | } else { |
| 242 | // no main windows - seem to be in command line mode. |
| 243 | Info.Println("Error: " + errorMessage) |
| 244 | } |
| 245 | |
| 246 | } |
| 247 | |
| 248 | // showInfoDialog shows an info message. |
| 249 | func showInfoDialog(infoMessage string) { |
no outgoing calls
no test coverage detected