sqweek / dialog

Simple cross-platform dialog API for go-lang
ISC License
509 stars 77 forks source link

feat: support predefined filenames #66

Closed redraskal closed 2 years ago

redraskal commented 2 years ago

Solves #26

I added the function SetStartFile to FileBuilder so that a predefined filename could be displayed on save dialogs. One use case for this is download managers. The user would not want to type out the file name since they are wanting to download a specific file, but instead they might want to rename part of it.

redraskal commented 2 years ago

@sqweek Could you test the linux implementation? This PR functions on Windows 11/macOS Monterey. I referenced https://docs.gtk.org/gtk3/method.FileChooser.set_filename.html for linux

sqweek commented 2 years ago

@redraskal thank you! Sorry this took me awhile to get to, the last few months have not left me with many spare cycles.

FYI I landed this with minor changes: