]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/dirdlgg.cpp
added renderer.h/.cpp
[wxWidgets.git] / src / generic / dirdlgg.cpp
index d7c41a33861912dd11ef41bfc93b0316fda46d0d..107967f5216e18444fcd8b76fee02e862cf515c6 100644 (file)
@@ -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++;