]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filesys.cpp
allow changing the page from keyboard in property sheet like controls even when the...
[wxWidgets.git] / src / common / filesys.cpp
index 61ec083da446e7c3728772e64bf26b7faca0f6bb..405598e9c2aca71d01dbfe54cae8f2741a51f9f3 100644 (file)
@@ -482,9 +482,23 @@ bool wxFileSystem::FindFileInPath(wxString *pStr,
 
 void wxFileSystem::AddHandler(wxFileSystemHandler *handler)
 {
-    m_Handlers.Append(handler);
+    // prepend the handler to the beginning of the list because handlers added
+    // last should have the highest priority to allow overriding them
+    m_Handlers.Insert((size_t)0, handler);
 }
 
+bool wxFileSystem::HasHandlerForPath(const wxString &location)
+{
+    for ( wxList::compatibility_iterator node = m_Handlers.GetFirst();
+           node; node = node->GetNext() )
+    {
+        wxFileSystemHandler *h = (wxFileSystemHandler*) node->GetData();
+        if (h->CanOpen(location))
+            return true;
+    }
+
+    return false;
+}
 
 void wxFileSystem::CleanUpHandlers()
 {