Skip to content

Commit

Permalink
Fix hints on dialog usage
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Aug 1, 2023
1 parent 0c031a5 commit 7eaa922
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dialog/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

// EntryDialog is a variation of a dialog which prompts the user to enter some text.
//
// Deprecated: Use dialog.NewFormDialog() or dialog.ShowFormDialog() with a widget.Entry inside instead.
// Deprecated: Use dialog.NewForm() or dialog.ShowForm() with a widget.Entry inside instead.
type EntryDialog struct {
*FormDialog

Expand Down Expand Up @@ -45,7 +45,7 @@ func (i *EntryDialog) SetOnClosed(callback func()) {
// onConfirm is a callback that runs when the user enters a string of
// text and clicks the "confirm" button. May be nil.
//
// Deprecated: Use dialog.NewFormDialog() with a widget.Entry inside instead.
// Deprecated: Use dialog.NewForm() with a widget.Entry inside instead.
func NewEntryDialog(title, message string, onConfirm func(string), parent fyne.Window) *EntryDialog {
i := &EntryDialog{entry: widget.NewEntry()}
items := []*widget.FormItem{widget.NewFormItem(message, i.entry)}
Expand All @@ -68,7 +68,7 @@ func NewEntryDialog(title, message string, onConfirm func(string), parent fyne.W

// ShowEntryDialog creates a new entry dialog and shows it immediately.
//
// Deprecated: Use dialog.ShowFormDialog() with a widget.Entry inside instead.
// Deprecated: Use dialog.ShowForm() with a widget.Entry inside instead.
func ShowEntryDialog(title, message string, onConfirm func(string), parent fyne.Window) {
NewEntryDialog(title, message, onConfirm, parent).Show()
}
2 changes: 1 addition & 1 deletion dialog/form.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (d *FormDialog) Submit() {
// state before checking all others to determine the net validation state. If the error passed is not nil, then the
// confirm button will be disabled. If the error parameter is nil, then all other Validatable widgets in items are
// checked as well to determine whether the confirm button should be disabled.
// This method is passed to each Validatable widget's SetOnValidationChanged method in items by NewFormDialog.
// This method is passed to each Validatable widget's SetOnValidationChanged method in items by NewForm.
func (d *FormDialog) validateItems(err error) {
if err != nil {
d.confirm.Disable()
Expand Down

0 comments on commit 7eaa922

Please sign in to comment.