Update Tomo API
This commit is contained in:
@@ -75,8 +75,7 @@ func NewDialog (kind DialogKind, parent tomo.Window, title, message string, opti
|
||||
// NewDialogOk creates a new dialog window with an OK option.
|
||||
func NewDialogOk (kind DialogKind, parent tomo.Window, title, message string, onOk func ()) (*Dialog, error) {
|
||||
okButton := NewButton("OK")
|
||||
// FIXME: need dialog accept/reject action icons
|
||||
// okButton.SetIcon(tomo.IconStatusOkay)
|
||||
okButton.SetIcon(tomo.IconDialogOkay)
|
||||
okButton.OnClick(func () {
|
||||
if onOk != nil { onOk() }
|
||||
})
|
||||
@@ -88,12 +87,10 @@ func NewDialogOk (kind DialogKind, parent tomo.Window, title, message string, on
|
||||
// NewDialogOkCancel creates a new dialog window with OK and Cancel options.
|
||||
func NewDialogOkCancel (kind DialogKind, parent tomo.Window, title, message string, onOk func ()) (*Dialog, error) {
|
||||
cancelButton := NewButton("Cancel")
|
||||
// FIXME: need dialog accept/reject action icons
|
||||
// cancelButton.SetIcon(tomo.IconStatusCancel)
|
||||
cancelButton.SetIcon(tomo.IconDialogCancel)
|
||||
|
||||
okButton := NewButton("OK")
|
||||
// FIXME: need dialog accept/reject action icons
|
||||
// okButton.SetIcon(tomo.IconStatusOkay)
|
||||
okButton.SetIcon(tomo.IconDialogOkay)
|
||||
okButton.OnClick(func () {
|
||||
if onOk != nil { onOk() }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user