X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/99006e446eb2156fe1c61e69926248901e399547..1978421a6d8b81c1f8a961da4b8ddf544fec7b1b:/src/generic/dirdlgg.cpp?ds=sidebyside diff --git a/src/generic/dirdlgg.cpp b/src/generic/dirdlgg.cpp index d7c41a3386..9adf9232db 100644 --- a/src/generic/dirdlgg.cpp +++ b/src/generic/dirdlgg.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "dirdlgg.h" #endif @@ -45,6 +45,8 @@ // wxGenericDirDialog //----------------------------------------------------------------------------- +IMPLEMENT_DYNAMIC_CLASS(wxGenericDirDialog, wxDialog) + static const int ID_DIRCTRL = 1000; static const int ID_TEXTCTRL = 1001; static const int ID_OK = 1002; @@ -271,7 +273,7 @@ void wxGenericDirDialog::OnNew( wxCommandEvent& WXUNUSED(event) ) wxString new_name( _("NewName") ); wxString path( data->m_path ); - if (path.Last() != wxFILE_SEP_PATH) + if (!wxEndsWithPathSeparator(path)) path += wxFILE_SEP_PATH; path += new_name; if (wxFileExists(path)) @@ -285,7 +287,7 @@ void wxGenericDirDialog::OnNew( wxCommandEvent& WXUNUSED(event) ) new_name += num; path = data->m_path; - if (path.Last() != wxFILE_SEP_PATH) + if (!wxEndsWithPathSeparator(path)) path += wxFILE_SEP_PATH; path += new_name; i++;