X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/71f2fb52d502537fcfa9a110c7ecb59d7f9a5b6b..67edd0c796f1aef51bd00857e253c097de5f2c75:/src/generic/filedlgg.cpp diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index 4f6f0d3ec2..6eeb171d42 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -20,7 +20,7 @@ #pragma hdrstop #endif -#if wxUSE_FILEDLG && !defined(__WXGTK24__) +#if wxUSE_FILEDLG // NOTE : it probably also supports MAC, untested #if !defined(__UNIX__) && !defined(__DOS__) && !defined(__WIN32__) && !defined(__OS2__) @@ -140,7 +140,7 @@ int wxCALLBACK wxFileDataTimeCompare( long data1, long data2, long data) #endif #if defined(__DOS__) || defined(__WINDOWS__) || defined (__OS2__) -#define IsTopMostDir(dir) (dir.IsEmpty()) +#define IsTopMostDir(dir) (dir.empty()) #endif #if defined(__DOS__) || defined(__WINDOWS__) || defined(__OS2__) @@ -507,20 +507,20 @@ void wxFileCtrl::UpdateFiles() #if defined(__WINDOWS__) || defined(__DOS__) || defined(__WXMAC__) || defined(__OS2__) if ( IsTopMostDir(m_dirName) ) - { + { wxArrayString names, paths; wxArrayInt icons; size_t n, count = wxGetAvailableDrives(paths, names, icons); for (n=0; nSetFocus(); + + return true; } wxGenericFileDialog::~wxGenericFileDialog() { - if (wxConfig::Get(false)) + if (!m_bypassGenericImpl) { - wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ViewStyle"), - ms_lastViewStyle); - wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ShowHidden"), - ms_lastShowHidden); - } + if (wxConfig::Get(false)) + { + wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ViewStyle"), + ms_lastViewStyle); + wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ShowHidden"), + ms_lastShowHidden); + } - const int count = m_choice->GetCount(); - for ( int i = 0; i < count; i++ ) - { - delete (wxString *)m_choice->GetClientData(i); + const int count = m_choice->GetCount(); + for ( int i = 0; i < count; i++ ) + { + delete (wxString *)m_choice->GetClientData(i); + } } } @@ -1177,7 +1200,7 @@ void wxGenericFileDialog::HandleAction( const wxString &fn ) { wxString filename( fn ); wxString dir = m_list->GetDir(); - if (filename.IsEmpty()) return; + if (filename.empty()) return; if (filename == wxT(".")) return; // "some/place/" means they want to chdir not try to load "place" @@ -1416,5 +1439,5 @@ IMPLEMENT_DYNAMIC_CLASS(wxFileDialog, wxGenericFileDialog); #endif // USE_GENERIC_FILEDIALOG -#endif // wxUSE_FILEDLG && !defined(__WXGTK24__) +#endif // wxUSE_FILEDLG