Commit pickers-fixes.patch added to 1472329 (Francesco Montorsi)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Wetherell
2006-06-02 12:00:30 +00:00
parent 7ba03e3cd2
commit 556151f5ff
14 changed files with 179 additions and 66 deletions

View File

@@ -55,6 +55,19 @@ bool wxFileDirPickerCtrlBase::CreateBase( wxWindow *parent, wxWindowID id,
style, validator, name))
return false;
if (!HasFlag(wxFLP_OPEN) && !HasFlag(wxFLP_SAVE))
m_windowStyle |= wxFLP_OPEN; // wxFD_OPEN is the default
// check that the styles are not contradictory
wxASSERT_MSG( !(HasFlag(wxFLP_SAVE) && HasFlag(wxFLP_OPEN)),
_T("can't specify both wxFLP_SAVE and wxFLP_OPEN at once") );
wxASSERT_MSG( !HasFlag(wxFLP_SAVE) || !HasFlag(wxFLP_FILE_MUST_EXIST),
_T("wxFLP_FILE_MUST_EXIST can't be used with wxFLP_SAVE" ) );
wxASSERT_MSG( !HasFlag(wxFLP_OPEN) || !HasFlag(wxFLP_OVERWRITE_PROMPT),
_T("wxFLP_OVERWRITE_PROMPT can't be used with wxFLP_OPEN") );
// create a wxFilePickerWidget or a wxDirPickerWidget...
if (!CreatePicker(this, path, message, wildcard))
return false;