wx.FileDialog::GetPath(): does not return file extension with GTK3?

Hi!

I noticed that in e.g. the example code for a save dialog on https://wxpython.org/Phoenix/docs/html/wx.FileDialog.html, GetPath() does not append the selected wildcard on GTK. I.e., if my wildcard is set to *.txt and I go to /tmp and type “test” in the filename box sand click save, GetPath() returns “/tmp/test” instead of “/tmp/test.txt”. Is this intentional?

Using wxPython 4.0.3 on Fedora 29.

Maybe not intentional as in “designed that way” but perhaps due to “that’s the way the native dialog works.” ISTR some discussion about this allowing the user to not actually use the extension but just tell the application what kind of file to create. I usually do something like check for the expected extension and append it myself if it’s not there.

···

Robin

On Monday, November 26, 2018 at 4:07:18 PM UTC-8, madigens@gmail.com wrote:

Hi!

I noticed that in e.g. the example code for a save dialog on https://wxpython.org/Phoenix/docs/html/wx.FileDialog.html, GetPath() does not append the selected wildcard on GTK. I.e., if my wildcard is set to *.txt and I go to /tmp and type “test” in the filename box sand click save, GetPath() returns “/tmp/test” instead of “/tmp/test.txt”. Is this intentional?

Using wxPython 4.0.3 on Fedora 29.