[v3] use concrete *WebviewWindow

This commit is contained in:
Travis McLane
2023-09-29 11:40:43 -05:00
parent 7b84b1c79c
commit af54419a0b
6 changed files with 15 additions and 14 deletions
+6 -6
View File
@@ -2,16 +2,16 @@ package application
func (m *linuxApp) showAboutDialog(title string, message string, icon []byte) {
window := globalApplication.getWindowForID(m.getCurrentWindowID())
var parent pointer
var parent uintptr
if window != nil {
parent = (window.(*WebviewWindow).impl).(*linuxWebviewWindow).window
parent, _ = window.(*WebviewWindow).NativeWindowHandle()
}
about := newMessageDialog(InfoDialogType)
about.SetTitle(title).
SetMessage(message).
SetIcon(icon)
runQuestionDialog(
parent,
pointer(parent),
about,
)
}
@@ -23,12 +23,12 @@ type linuxDialog struct {
func (m *linuxDialog) show() {
windowId := getNativeApplication().getCurrentWindowID()
window := globalApplication.getWindowForID(windowId)
var parent pointer
var parent uintptr
if window != nil {
parent = (window.(*WebviewWindow).impl).(*linuxWebviewWindow).window
parent, _ = window.(*WebviewWindow).NativeWindowHandle()
}
response := runQuestionDialog(parent, m.dialog)
response := runQuestionDialog(pointer(parent), m.dialog)
if response >= 0 && response < len(m.dialog.Buttons) {
button := m.dialog.Buttons[response]
if button.Callback != nil {