The Browse dialog of the wxFilePickerCtrl(wxFLP_SAVE|wxFLP_USE_TEXT_CTRL) shows a blank Name field when a full path has been specified to a file that does not already exist
|Reported by:||jdagresta||Owned by:|
Using the wxGTK version of wxFilePickerCtrl(wxFLP_SAVE | wxFLP_USE_TEXT_CTRL), when a full path and filename have been entered in the wxTextCtrl field and you click on the Browse button, the Name field in the "Browse" dialog is blank if the specified file does not already exist.
You can see this with the widgets sample as shown in the following image:
When you click on the Browse button, this is the result (notice that the Name field is blank):
This is the result that should occur:
It appeared that the wxGtkFileChooser::SetPath() routine in filectrl.cpp was not calling the correct gtk routines for the SAVE flavor of wxFilePickerCtrl. I determined my proposed fix from looking at the code in wxGtkFileCtrl::Create() (in the same file) for what it did differently with the directory and filename arguments for the SAVE flavor versus the OPEN flavor of dialog.
My proposed changes can be seen in the mypatch.patch attachment.