X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab1ce969dfb27f5d366ee6a0de3ff2bc0205b56a..6003de2fe44e4e019580bfb42f526b8310fbb610:/src/generic/filedlgg.cpp diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index 2bbe652c8d..5264d09285 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -24,6 +24,9 @@ #endif #ifndef WX_PRECOMP + #ifdef __WXMSW__ + #include "wx/msw/wrapwin.h" + #endif #include "wx/hash.h" #include "wx/intl.h" #include "wx/settings.h" @@ -31,13 +34,14 @@ #include "wx/msgdlg.h" #include "wx/bmpbuttn.h" #include "wx/checkbox.h" + #include "wx/choice.h" + #include "wx/stattext.h" + #include "wx/textctrl.h" + #include "wx/sizer.h" + #include "wx/filedlg.h" // wxFD_OPEN, wxFD_SAVE... #endif -#include "wx/textctrl.h" -#include "wx/choice.h" -#include "wx/stattext.h" #include "wx/longlong.h" -#include "wx/sizer.h" #include "wx/tokenzr.h" #include "wx/config.h" #include "wx/imaglist.h" @@ -45,7 +49,6 @@ #include "wx/artprov.h" #include "wx/filefn.h" #include "wx/file.h" // for wxS_IXXX constants only -#include "wx/filedlg.h" // wxFD_OPEN, wxFD_SAVE... #include "wx/generic/filedlgg.h" #include "wx/generic/dirctrlg.h" // for wxFileIconsTable @@ -67,7 +70,6 @@ #endif #ifdef __WINDOWS__ - #include "wx/msw/wrapwin.h" #include "wx/msw/mslu.h" #endif @@ -355,7 +357,7 @@ wxString wxFileData::GetHint() const else if (IsDrive()) s += _(""); else // plain file - s += wxString::Format(_("%ld bytes"), + s += wxString::Format(wxPLURAL("%ld byte", "%ld bytes", m_size), wxLongLong(m_size).ToString().c_str()); s += wxT(' '); @@ -733,7 +735,7 @@ void wxFileCtrl::GoToParentDir() { if (!IsTopMostDir(m_dirName)) { - size_t len = m_dirName.Len(); + size_t len = m_dirName.length(); if (wxEndsWithPathSeparator(m_dirName)) m_dirName.Remove( len-1, 1 ); wxString fname( wxFileNameFromPath(m_dirName) ); @@ -821,8 +823,8 @@ void wxFileCtrl::OnListEndLabelEdit( wxListEvent &event ) wxASSERT( fd ); if ((event.GetLabel().empty()) || - (event.GetLabel() == _(".")) || - (event.GetLabel() == _("..")) || + (event.GetLabel() == wxT(".")) || + (event.GetLabel() == wxT("..")) || (event.GetLabel().First( wxFILE_SEP_PATH ) != wxNOT_FOUND)) { wxMessageDialog dialog(this, _("Illegal directory name."), _("Error"), wxOK | wxICON_ERROR ); @@ -1027,7 +1029,7 @@ bool wxGenericFileDialog::Create( wxWindow *parent, m_dir = wxFILE_SEP_PATH; } - size_t len = m_dir.Len(); + size_t len = m_dir.length(); if ((len > 1) && (wxEndsWithPathSeparator(m_dir))) m_dir.Remove( len-1, 1 ); @@ -1627,10 +1629,10 @@ void wxGenericFileDialog::UpdateControls() #endif // defined(__DOS__) || defined(__WINDOWS__) || defined(__OS2__) } -#ifdef USE_GENERIC_FILEDIALOG +#ifdef wxUSE_GENERIC_FILEDIALOG IMPLEMENT_DYNAMIC_CLASS(wxFileDialog, wxGenericFileDialog) -#endif // USE_GENERIC_FILEDIALOG +#endif // wxUSE_GENERIC_FILEDIALOG #endif // wxUSE_FILEDLG