#if defined(__DOS__)
-static bool wxIsDriveAvailable(const wxString dirName)
+bool wxIsDriveAvailable(const wxString& dirName)
{
+ // FIXME_MGL - this method leads to hang up under Watcom for some reason
+#ifndef __WATCOMC__
if ( dirName.Len() == 3 && dirName[1u] == wxT(':') )
{
wxString dirNameLower(dirName.Lower());
wxPathExists(dirNameLower));
}
else
+#endif
return TRUE;
}
#endif // !GNUWIN32
}
-static bool wxIsDriveAvailable(const wxString dirName)
+bool wxIsDriveAvailable(const wxString& dirName)
{
#ifdef __WIN32__
UINT errorMode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
{
wxString *strFirst = (wxString *)first;
wxString *strSecond = (wxString *)second;
-
+
return strFirst->CmpNoCase(*strSecond);
}
return dir.HasSubDirs();
}
-bool wxDirItemData::HasFiles(const wxString& spec) const
+bool wxDirItemData::HasFiles(const wxString& WXUNUSED(spec)) const
{
if (m_path.IsEmpty())
return FALSE;
m_filterListCtrl = NULL;
}
+void wxGenericDirCtrl::ShowHidden( bool show )
+{
+ m_showHidden = show;
+
+ wxString path = GetPath();
+ m_treeCtrl->Collapse(m_treeCtrl->GetRootItem());
+ m_treeCtrl->Expand(m_treeCtrl->GetRootItem());
+ SetPath(path);
+}
+
void wxGenericDirCtrl::AddSection(const wxString& path, const wxString& name, int imageId)
{
wxDirItemData *dir_item = new wxDirItemData(path,name,TRUE);
if (d.IsOpened())
{
- if (d.GetFirst(& eachFilename, wxEmptyString, wxDIR_DIRS | wxDIR_HIDDEN))
+ int style = wxDIR_DIRS;
+ if (m_showHidden) style |= wxDIR_HIDDEN;
+ if (d.GetFirst(& eachFilename, wxEmptyString, style))
{
do
{