Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FolderOpenDialog SetOpenText and SetDismissText are ineffective #2830

Closed
BabySid opened this issue Mar 9, 2022 · 3 comments
Closed

FolderOpenDialog SetOpenText and SetDismissText are ineffective #2830

BabySid opened this issue Mar 9, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@BabySid
Copy link

BabySid commented Mar 9, 2022

Describe the bug:

As the title describes, when i use a folderopendialog, i cannot found any method that set the text of the OPEN button.
And, I call SetDismissText, but it does't have any effect.

To Reproduce:

Steps to reproduce the behaviour:

  • Run the code below

Screenshots:

图片

Example code:

func main() {
        myApp := app.NewWithID("go-fyne")

	myWindow := myApp.NewWindow("Widget")
	btn := widget.NewButton("Go", func() {
		fo := dialog.NewFolderOpen(func(uri fyne.ListableURI, err error) {
			if uri != nil {
				fmt.Println(uri.Path())
			}
		}, myWindow)
		fo.SetDismissText("Exit")
		fo.Show()
	})

	content := container.NewVBox(
		widget.NewEntry(),
	)

	myWindow.Resize(fyne.NewSize(800, 600))
	myWindow.SetContent(container.NewBorder(btn, nil, nil, nil, content))
	myWindow.CenterOnScreen()
	myWindow.ShowAndRun()
}

Device (please complete the following information):

  • OS: Windows10
  • Version: 19044
  • Go version: go1.17.5
  • Fyne version: 2.1.3
@BabySid BabySid added the unverified A bug that has been reported but not verified label Mar 9, 2022
@Jacalz Jacalz changed the title FolderOpenDialog cannot SetOpenText and SetDismissText is ineffective FolderOpenDialog SetOpenText and SetDismissText are ineffective Mar 9, 2022
@Jacalz Jacalz added bug Something isn't working and removed unverified A bug that has been reported but not verified labels Mar 9, 2022
@andydotxyz
Copy link
Member

Thanks for this.
We can resolve the SetDismissText not functioning in the next point release, but adding the setting of save text will have to wait a little longer as we don't add API (which this requires) in bug-fix releases.
I will open a PR with SetConfirmText as this matches other dialogs, and works for save/open equally.

@andydotxyz
Copy link
Member

The SetDismissText oversight is fixed pending v2.1.4

andydotxyz added a commit to andydotxyz/fyne that referenced this issue Mar 10, 2022
@andydotxyz
Copy link
Member

The bug fix is released, the new API for SetConfirmText will be in v2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants