mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[v3 linux] dialog fixes
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package application
|
||||
|
||||
import "fmt"
|
||||
|
||||
func (m *linuxApp) showAboutDialog(title string, message string, icon []byte) {
|
||||
window := globalApplication.getWindowForID(m.getCurrentWindowID())
|
||||
var parent pointer
|
||||
@@ -31,8 +29,7 @@ func (m *linuxDialog) show() {
|
||||
}
|
||||
|
||||
response := runQuestionDialog(parent, m.dialog)
|
||||
if response >= 0 {
|
||||
fmt.Println("Response: ", response)
|
||||
if response >= 0 && response < len(m.dialog.Buttons) {
|
||||
button := m.dialog.Buttons[response]
|
||||
if button.Callback != nil {
|
||||
go button.Callback()
|
||||
|
||||
@@ -30,12 +30,12 @@ const (
|
||||
GdkWindowStateFullscreen = 1 << 4
|
||||
|
||||
// https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/gtkmessagedialog.h#L87
|
||||
GtkButtonsNone int = iota
|
||||
GtkButtonsOk
|
||||
GtkButtonsClose
|
||||
GtkButtonsCancel
|
||||
GtkButtonsYesNo
|
||||
GtkButtonsOkCancel
|
||||
GtkButtonsNone int = 0
|
||||
GtkButtonsOk = 1
|
||||
GtkButtonsClose = 2
|
||||
GtkButtonsCancel = 3
|
||||
GtkButtonsYesNo = 4
|
||||
GtkButtonsOkCancel = 5
|
||||
|
||||
// https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/gtkdialog.h#L36
|
||||
GtkDialogModal = 1 << 0
|
||||
@@ -45,10 +45,10 @@ const (
|
||||
GtkOrientationVertical = 1
|
||||
|
||||
// enum GtkMessageType
|
||||
GtkMessageInfo = iota
|
||||
GtkMessageWarning
|
||||
GtkMessageQuestion
|
||||
GtkMessageError
|
||||
GtkMessageInfo = 0
|
||||
GtkMessageWarning = 1
|
||||
GtkMessageQuestion = 2
|
||||
GtkMessageError = 3
|
||||
)
|
||||
|
||||
type GdkGeometry struct {
|
||||
|
||||
Reference in New Issue
Block a user