File/dir dialog styles and other changes (patch 1488371):

- check invalid combinations of styles in wxFileDialogBase::Create()
- use wxFD_XXX naming convention for wxFileDialog styles
- replaces wxDD_NEW_DIR_BUTTON with wxDD_DIR_MUST_EXIST
- removes #ifdef __WXGTK24__ / #endif blocks from wxGTK code
- removes wxFileDialogBase::Get/SetStyle and wxFileDialogBase::m_fileName
- renames wxDirDialogGTK to wxDirDialog


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-05-28 23:32:12 +00:00
parent 55325d01e6
commit ff3e84ffdc
53 changed files with 273 additions and 310 deletions

View File

@@ -259,8 +259,8 @@ static pascal Boolean CrossPlatformFileFilter(CInfoPBPtr myCInfoPBPtr, void *dat
wxFileDialog::wxFileDialog(
wxWindow *parent, const wxString& message,
const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard,
long style, const wxPoint& pos)
: wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos)
long style, const wxPoint& pos, const wxSize& sz, const wxString& name)
: wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name)
{
wxASSERT_MSG( NavServicesAvailable() , wxT("Navigation Services are not running") ) ;
}
@@ -338,7 +338,7 @@ int wxFileDialog::ShowModal()
}
}
if (m_dialogStyle & wxSAVE)
if (HasFlag(wxFD_SAVE))
{
myData.saveMode = true;
@@ -352,7 +352,7 @@ int wxFileDialog::ShowModal()
dialogCreateOptions.optionFlags |= kNavPreserveSaveFileExtension;
#if TARGET_API_MAC_OSX
if (!(m_dialogStyle & wxOVERWRITE_PROMPT))
if (!(m_windowStyle & wxOVERWRITE_PROMPT))
dialogCreateOptions.optionFlags |= kNavDontConfirmReplacement;
#endif
@@ -413,7 +413,7 @@ int wxFileDialog::ShowModal()
if (err != noErr)
break;
if (m_dialogStyle & wxSAVE)
if (HasFlag(wxFD_SAVE))
thePath = wxMacFSRefToPath( &theFSRef, navReply.saveFileName );
else
thePath = wxMacFSRefToPath( &theFSRef );

View File

@@ -43,7 +43,7 @@ wxDirDialog::wxDirDialog(wxWindow *parent,
{
wxASSERT_MSG( NavServicesAvailable() , wxT("Navigation Services are not running") ) ;
m_message = message;
m_dialogStyle = style;
m_windowStyle = style;
m_parent = parent;
m_path = defaultPath;
}

View File

@@ -292,8 +292,8 @@ static pascal Boolean CrossPlatformFileFilter(CInfoPBPtr myCInfoPBPtr, void *dat
wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard,
long style, const wxPoint& pos)
:wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos)
long style, const wxPoint& pos, const wxSize& sz, const wxString& name)
:wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name)
{
wxASSERT_MSG( NavServicesAvailable() , wxT("Navigation Services are not running") ) ;
}
@@ -372,7 +372,7 @@ int wxFileDialog::ShowModal()
OpenUserDataRec myData;
myData.defaultLocation = m_dir;
if (m_dialogStyle & wxSAVE)
if (HasFlag(wxFD_SAVE))
{
dialogCreateOptions.optionFlags |= kNavNoTypePopup;
dialogCreateOptions.optionFlags |= kNavDontAutoTranslate;
@@ -445,7 +445,7 @@ int wxFileDialog::ShowModal()
break;
CFURLRef fullURLRef;
if (m_dialogStyle & wxSAVE)
if (HasFlag(wxFD_SAVE))
{
CFURLRef parentURLRef = ::CFURLCreateFromFSRef(NULL, &theFSRef);
@@ -562,7 +562,7 @@ int wxFileDialog::ShowModal()
wxMacStringToPascal( myData.name[i] , (StringPtr)(*mNavOptions.popupExtension)[i].menuItemName ) ;
}
}
if ( m_dialogStyle & wxSAVE )
if ( HasFlag(wxFD_SAVE) )
{
myData.saveMode = true ;
@@ -584,7 +584,7 @@ int wxFileDialog::ShowModal()
myData.saveMode = false ;
mNavFilterUPP = NewNavObjectFilterUPP( CrossPlatformFilterCallback ) ;
if ( m_dialogStyle & wxMULTIPLE )
if ( m_windowStyle & wxMULTIPLE )
mNavOptions.dialogOptionFlags |= kNavAllowMultipleFiles ;
else
mNavOptions.dialogOptionFlags &= ~kNavAllowMultipleFiles ;