X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce00f59b5b169752d2f05ce3bb1a88ddc1b38b4c..ccef4c3ad16fe5bf4365569c431f1208d79eb0ef:/src/osx/carbon/filedlg.cpp diff --git a/src/osx/carbon/filedlg.cpp b/src/osx/carbon/filedlg.cpp index c6503c8b91..fb953d1986 100644 --- a/src/osx/carbon/filedlg.cpp +++ b/src/osx/carbon/filedlg.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id$ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -26,6 +25,7 @@ #include "wx/filename.h" #include "wx/osx/private.h" +#include "wx/modalhook.h" #ifndef __DARWIN__ #include @@ -324,11 +324,11 @@ void OpenUserDataRec::MakeUserDataRec( const wxString& filter ) wxString extension = m_extensions[i]; // Remove leading '*' - if (extension.length() && (extension.GetChar(0) == '*')) + if ( !extension.empty() && (extension.GetChar(0) == '*') ) extension = extension.Mid( 1 ); // Remove leading '.' - if (extension.length() && (extension.GetChar(0) == '.')) + if ( !extension.empty() && (extension.GetChar(0) == '.') ) extension = extension.Mid( 1 ); if (wxFileName::MacFindDefaultTypeAndCreator( extension, &fileType, &creator )) @@ -455,12 +455,17 @@ static pascal void NavEventProc( } -wxFileDialog::wxFileDialog( +void wxFileDialog::Init() +{ +} + +void wxFileDialog::Create( wxWindow *parent, const wxString& message, const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard, long style, const wxPoint& pos, const wxSize& sz, const wxString& name) - : wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name) { + wxFileDialogBase::Create(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name); + wxASSERT_MSG( NavServicesAvailable() , wxT("Navigation Services are not running") ) ; } @@ -476,6 +481,8 @@ void wxFileDialog::SetupExtraControls(WXWindow nativeWindow) int wxFileDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + m_paths.Empty(); m_fileNames.Empty();